|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcascading.scheme.util.DelimitedParser
public class DelimitedParser
Class DelimitedParser is not to be used directly but by platform specific Scheme
implementations.
TextDelimited
,
TextDelimited
,
Serialized FormField Summary | |
---|---|
protected java.util.regex.Pattern |
cleanPattern
Field cleanPattern |
protected java.util.regex.Pattern |
escapePattern
Field escapePattern |
protected java.util.regex.Pattern |
splitPattern
Field splitPattern |
Constructor Summary | |
---|---|
DelimitedParser(java.lang.String delimiter,
java.lang.String quote,
java.lang.Class[] types,
boolean strict,
boolean safe,
boolean skipHeader,
Fields sourceFields,
Fields sinkFields)
|
Method Summary | |
---|---|
static java.lang.Object[] |
cleanSplit(java.lang.Object[] split,
java.util.regex.Pattern cleanPattern,
java.util.regex.Pattern escapePattern,
java.lang.String quote)
Method cleanSplit will return a quote free array of String values, the given split array
will be updated in place. |
static java.util.regex.Pattern |
createCleanPatternFor(java.lang.String quote)
Method createCleanPatternFor creates a regex Pattern for removing quote characters from a String. |
static java.util.regex.Pattern |
createEscapePatternFor(java.lang.String quote)
Method createEscapePatternFor creates a regex Pattern cleaning quote escapes from a String. |
static java.lang.String[] |
createSplit(java.lang.String value,
java.util.regex.Pattern splitPattern,
int numValues)
Method createSplit will split the given value with the given splitPattern . |
static java.util.regex.Pattern |
createSplitPatternFor(java.lang.String delimiter,
java.lang.String quote)
Method createSplitPatternFor creates a regex Pattern for splitting a line of text into its component
parts using the given delimiter and quote Strings. |
java.lang.Appendable |
joinLine(java.lang.Iterable iterable,
java.lang.Appendable buffer)
|
Fields |
parseFirstLine(FlowProcess flowProcess,
Tap tap)
|
java.lang.Object[] |
parseLine(java.lang.String line)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.regex.Pattern splitPattern
protected java.util.regex.Pattern cleanPattern
protected java.util.regex.Pattern escapePattern
Constructor Detail |
---|
public DelimitedParser(java.lang.String delimiter, java.lang.String quote, java.lang.Class[] types, boolean strict, boolean safe, boolean skipHeader, Fields sourceFields, Fields sinkFields)
Method Detail |
---|
public static java.util.regex.Pattern createEscapePatternFor(java.lang.String quote)
Pattern
cleaning quote escapes from a String.
If quote
is null or empty, a null value will be returned;
quote
- of type String
public static java.util.regex.Pattern createCleanPatternFor(java.lang.String quote)
Pattern
for removing quote characters from a String.
If quote
is null or empty, a null value will be returned;
quote
- of type String
public static java.util.regex.Pattern createSplitPatternFor(java.lang.String delimiter, java.lang.String quote)
Pattern
for splitting a line of text into its component
parts using the given delimiter and quote Strings. quote
may be null.
delimiter
- of type Stringquote
- of type String
public static java.lang.String[] createSplit(java.lang.String value, java.util.regex.Pattern splitPattern, int numValues)
value
with the given splitPattern
.
value
- of type StringsplitPattern
- of type PatternnumValues
- of type int
public static java.lang.Object[] cleanSplit(java.lang.Object[] split, java.util.regex.Pattern cleanPattern, java.util.regex.Pattern escapePattern, java.lang.String quote)
split
array
will be updated in place.
If cleanPattern
is null, quote cleaning will not be performed, but all empty String values
will be replaces with a null
value.
split
- of type Object[]cleanPattern
- of type PatternescapePattern
- of type Patternquote
- of type String
public Fields parseFirstLine(FlowProcess flowProcess, Tap tap)
public java.lang.Object[] parseLine(java.lang.String line)
public java.lang.Appendable joinLine(java.lang.Iterable iterable, java.lang.Appendable buffer)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |