org.oddjob.values.types
Class TokenizerType

java.lang.Object
  extended by org.oddjob.values.types.TokenizerType
All Implemented Interfaces:
ArooaValue

public class TokenizerType
extends Object
implements ArooaValue

Description

Tokenizes text. This type provides conversion to an array or list of strings.

The delimiter can be provided as either plain text or a regular expression. The default delimiter is the regular expression \s*,\s* which is CSV with optional white space either side.

Example

Tokenize comma separated values.

java.io.IOException: No Resource found: org/oddjob/values/types/TokenizeExample.xml

Author:
rob

Nested Class Summary
static class TokenizerType.Conversions
           
 
Field Summary
static String DEFAULT_DELIMITER_REGEXP
           
static ArooaElement ELEMENT
           
 
Constructor Summary
TokenizerType()
           
 
Method Summary
 String getDelimiter()
           
 Character getEscape()
           
 Character getQuote()
           
 String getRegexp()
           
 String getText()
           
 String[] parse()
           
 void setDelimiter(String delimiter)
           
 void setEscape(Character escape)
           
 void setQuote(Character quote)
           
 void setRegexp(String regexp)
           
 void setText(String text)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ELEMENT

public static final ArooaElement ELEMENT

DEFAULT_DELIMITER_REGEXP

public static final String DEFAULT_DELIMITER_REGEXP
See Also:
Constant Field Values
Constructor Detail

TokenizerType

public TokenizerType()
Method Detail

parse

public String[] parse()
               throws ParseException
Throws:
ParseException

getDelimiter

public String getDelimiter()

setDelimiter

public void setDelimiter(String delimiter)

getRegexp

public String getRegexp()

setRegexp

public void setRegexp(String regexp)

getEscape

public Character getEscape()

setEscape

public void setEscape(Character escape)

getQuote

public Character getQuote()

setQuote

public void setQuote(Character quote)

getText

public String getText()

setText

public void setText(String text)