|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.biojava.bio.program.tagvalue.TagValueWrapper
org.biojava.bio.program.tagvalue.ValueChanger
Intercept the values associated with some tags and change them systematically.
The two forms of changes that can be made are:
For a given tag, changers take precendence over splitters, and explicitly registered changers or splitters take precendence over the default handlers. If there is not a specific handler for a tag and there is no default set, then the value is passed on unchanged.
Constructor Summary | |
ValueChanger(TagValueListener delegate)
|
|
ValueChanger(TagValueListener delegate,
ChangeTable changeTable)
Create a new changer that will pass the modified event stream to a delegate. |
Method Summary | |
ChangeTable |
getChangeTable()
|
ChangeTable.Changer |
getDefaultChanger()
Get the changer that will be applied to values of tags with no specific handler registered. |
ChangeTable.Splitter |
getDefaultSplitter()
Get the splitter that will be applied to values of tags with no specific handler registered. |
void |
setChangeTable(ChangeTable changeTable)
|
void |
setDefaultChanger(ChangeTable.Changer c)
The changer that will be applied to the values of tags not registered explicitly to any changer or splitter instance. |
void |
setDefaultSplitter(ChangeTable.Splitter s)
The splitter that will be applied to the values of tags not registered explicitly to any changer or splitter instance. |
void |
startTag(java.lang.Object tag)
Start a new tag. |
void |
value(TagValueContext ctxt,
java.lang.Object value)
A value has been seen. |
Methods inherited from class org.biojava.bio.program.tagvalue.TagValueWrapper |
endRecord, endTag, getDelegate, setDelegate, startRecord |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ValueChanger(TagValueListener delegate)
public ValueChanger(TagValueListener delegate, ChangeTable changeTable)
delegate
- the TagValueListener that will receive the eventsMethod Detail |
public void setDefaultChanger(ChangeTable.Changer c)
c
- the default ChangeTable.Changerpublic ChangeTable.Changer getDefaultChanger()
public void setDefaultSplitter(ChangeTable.Splitter s)
public ChangeTable.Splitter getDefaultSplitter()
public ChangeTable getChangeTable()
public void setChangeTable(ChangeTable changeTable)
public void startTag(java.lang.Object tag) throws ParserException
TagValueListener
startTag
in interface TagValueListener
startTag
in class TagValueWrapper
ParserException
public void value(TagValueContext ctxt, java.lang.Object value) throws ParserException
TagValueListener
value
in interface TagValueListener
value
in class TagValueWrapper
ParserException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |