|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jmw.tzap.AbstractFilter
com.jmw.tzap.SplitFilter
com.jmw.tzap.filters.SplitByRegexFilter
public class SplitByRegexFilter
Splits a file each time a regex is encountered.
There are several options for this filter.
| Field Summary | |
|---|---|
protected boolean |
before
|
protected boolean |
drop
|
protected java.lang.StringBuffer |
header
|
protected java.util.regex.Pattern |
pattern
|
protected boolean |
repeatHeader
|
protected boolean |
saveHeaderAlone
|
| Fields inherited from class com.jmw.tzap.SplitFilter |
|---|
count, endStr, initialCount, totalCount |
| Fields inherited from class com.jmw.tzap.AbstractFilter |
|---|
encoding, MSG_DEBUG, MSG_ERR, MSG_INFO, MSG_VERBOSE, MSG_WARN, task |
| Constructor Summary | |
|---|---|
SplitByRegexFilter()
|
|
| Method Summary | |
|---|---|
void |
setCutBefore(boolean b)
Sets the CutBefore flag, which indicates if the split should be performed before or after the regex. |
void |
setDropRegexText(boolean b)
Sets the DropRegexText flag, which indicates if the regex should be droped from the split files. |
void |
setRegex(java.lang.String regex)
Sets the regex used in spliting the file. |
void |
setRepeatHeaderInEachFile(boolean b)
Sets the RepeatHeaderInEachFile flag, which indicates if the header should be repeated in each newly generated file. |
void |
setSaveHeaderAlone(boolean b)
Sets the SaveHeaderAlone flag, which indicates if the header should be saved in its own file. |
java.util.ArrayList |
split(FilterFile file)
Splits a FilterFile into smaller ones. |
void |
unload()
Does any clean up after the filter has been finished. |
void |
validateParameters()
Validates any parameters needed by the child filters. |
| Methods inherited from class com.jmw.tzap.SplitFilter |
|---|
execute, load, setCount, setEndString |
| Methods inherited from class com.jmw.tzap.AbstractFilter |
|---|
getName, log, log, setEncoding, setTask |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected boolean before
protected boolean drop
protected boolean saveHeaderAlone
protected boolean repeatHeader
protected java.util.regex.Pattern pattern
protected java.lang.StringBuffer header
| Constructor Detail |
|---|
public SplitByRegexFilter()
| Method Detail |
|---|
public void setCutBefore(boolean b)
b - the flag value.public void setDropRegexText(boolean b)
b - the flag value.public void setSaveHeaderAlone(boolean b)
b - the flag value.public void setRepeatHeaderInEachFile(boolean b)
b - the flag value.public void setRegex(java.lang.String regex)
regex - the split regex
public void validateParameters()
throws java.lang.Exception
AbstractFilter
validateParameters in class AbstractFilterjava.lang.Exceptionpublic void unload()
AbstractFilter
unload in class SplitFilterpublic java.util.ArrayList split(FilterFile file)
SplitFilter
split in class SplitFilterfile - the FilterFile to be split
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||