|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.biojava.bio.program.tagvalue.SimpleTagValueWrapper
org.biojava.bio.program.tagvalue.TagDropper
public class TagDropper
Silently drop all tags except those specified, and pass the rest onto a delegate.
Constructor Summary | |
---|---|
TagDropper()
|
|
TagDropper(TagValueListener tvl)
Create a new TagDropper that will pass on all retained tags and values to tvl. |
Method Summary | |
---|---|
void |
addTag(Object tag)
Add a tag to retain. |
boolean |
doRetain()
Find out if known tags are retained or dropped. |
void |
endTag()
End the current tag. |
Set |
getTags()
Get the complete set of tags that are currently recognized. |
void |
removeTag(Object tag)
Remove a tag so that it will not be retained. |
void |
setRetain(boolean retain)
Set wether known tags are to be retained or dropped. |
void |
startTag(Object tag)
Start a new tag. |
void |
value(TagValueContext ctxt,
Object value)
A value has been seen. |
Methods inherited from class org.biojava.bio.program.tagvalue.SimpleTagValueWrapper |
---|
endRecord, getDelegate, setDelegate, startRecord |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TagDropper()
public TagDropper(TagValueListener tvl)
tvl
- the TagValueListener to inform of all surviving eventsMethod Detail |
---|
public void addTag(Object tag)
tag
- a tag that will be forwarded to the delegatepublic void removeTag(Object tag)
tag
- a tag that will not be forwarded to the delegatepublic Set getTags()
public void setRetain(boolean retain)
If retain is true, then all known tags will be passed on and all other tags will be discarded. If retain is true, then all known tags will be dropped and all others passed on.
retain
- true if the tags are to be retainedpublic boolean doRetain()
public void startTag(Object tag) throws ParserException
TagValueListener
startTag
in interface TagValueListener
startTag
in class SimpleTagValueWrapper
tag
- the Object representing the new tag
ParserException
- if the tag could not be startedpublic void endTag() throws ParserException
TagValueListener
endTag
in interface TagValueListener
endTag
in class SimpleTagValueWrapper
ParserException
- if the tag could not be endedpublic void value(TagValueContext ctxt, Object value) throws ParserException
TagValueListener
value
in interface TagValueListener
value
in class SimpleTagValueWrapper
ctxt
- a TagValueContext that could be used to push a sub-documentvalue
- the value Object observed
ParserException
- if the value could not be processed
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |