|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.biojava.bio.program.tagvalue.LineSplitParser
public class LineSplitParser
A parser that splits a line into tag/value at a given column number. The GENBANK and EMBL constants are parsers pre-configured for genbank and embl style files respectively.
There are many properties of the parser that can be set to change how lines are split, and how the tag and value is produced from that split.
Field Summary | |
---|---|
static LineSplitParser |
EMBL
A LineSplitParser pre-configured to process EMBL-style flat files. |
static LineSplitParser |
GENBANK
A LineSplitParser pre-configured to process GENBANK-style flat files. |
Fields inherited from interface org.biojava.bio.program.tagvalue.TagValueParser |
---|
EMPTY_LINE_EOR |
Constructor Summary | |
---|---|
LineSplitParser()
|
|
LineSplitParser(LineSplitParser parser)
|
Method Summary | |
---|---|
Object |
clone()
|
boolean |
getContinueOnEmptyTag()
See if empty tags are treated as a continuation of previous tags or as a new tag with the value of the empty string. |
String |
getEndOfRecord()
Get the current string indicating that a record has ended. |
boolean |
getMergeSameTag()
See if tags are being merged. |
int |
getSplitOffset()
Get the current offset at which lines are split. |
boolean |
getTrimTag()
See if tag trimming is enabled. |
boolean |
getTrimValue()
See if value trimming is enabled. |
TagValue |
parse(Object o)
|
void |
setContinueOnEmptyTag(boolean continueOnEmptyTag)
Choose whether to treat empty tags as a continuation of previous tags or as a new tag with the value of the empty string. |
void |
setEndOfRecord(String endOfRecord)
Set the string indicating that a record has ended. |
void |
setMergeSameTag(boolean mergeSameTag)
Enable or disable treating runs of identical tags as a single tag start event with multiple values or each as a separate tag start, value, and tag end. |
void |
setSplitOffset(int splitOffset)
Set the offset to split lines at. |
void |
setTrimTag(boolean trimTag)
Enable or disable trimming of tags. |
void |
setTrimValue(boolean trimValue)
Enable or disable trimming of values. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final LineSplitParser EMBL
public static final LineSplitParser GENBANK
Constructor Detail |
---|
public LineSplitParser()
public LineSplitParser(LineSplitParser parser)
Method Detail |
---|
public void setEndOfRecord(String endOfRecord)
endOfRecord
- the new String delimiting recordspublic String getEndOfRecord()
public void setSplitOffset(int splitOffset)
splitOffset
- the new offset to split atpublic int getSplitOffset()
public void setTrimTag(boolean trimTag)
trimTag
- true if tags should be trimmed, otherwise falsepublic boolean getTrimTag()
public void setTrimValue(boolean trimValue)
trimValue
- true if values should be trimmed, otherwise falsepublic boolean getTrimValue()
public void setContinueOnEmptyTag(boolean continueOnEmptyTag)
continueOnEmptyTag
- true to enable empty tags to be treated as a
continuation of the previous tag, false otherwisepublic boolean getContinueOnEmptyTag()
public void setMergeSameTag(boolean mergeSameTag)
mergeSameTag
- true if tags should be merged, false otherwisepublic boolean getMergeSameTag()
public TagValue parse(Object o)
parse
in interface TagValueParser
public Object clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |