public class TagDropper extends SimpleTagValueWrapper
| Constructor and Description |
|---|
TagDropper() |
TagDropper(TagValueListener tvl)
Create a new TagDropper that will pass on all retained tags and values to
tvl.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addTag(java.lang.Object tag)
Add a tag to retain.
|
boolean |
doRetain()
Find out if known tags are retained or dropped.
|
void |
endTag()
End the current tag.
|
java.util.Set |
getTags()
Get the complete set of tags that are currently recognized.
|
void |
removeTag(java.lang.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(java.lang.Object tag)
Start a new tag.
|
void |
value(TagValueContext ctxt,
java.lang.Object value)
A value has been seen.
|
endRecord, getDelegate, setDelegate, startRecordpublic TagDropper()
public TagDropper(TagValueListener tvl)
tvl - the TagValueListener to inform of all surviving eventspublic void addTag(java.lang.Object tag)
tag - a tag that will be forwarded to the delegatepublic void removeTag(java.lang.Object tag)
tag - a tag that will not be forwarded to the delegatepublic java.util.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(java.lang.Object tag)
throws ParserException
TagValueListenerstartTag in interface TagValueListenerstartTag in class SimpleTagValueWrappertag - the Object representing the new tagParserException - if the tag could not be startedpublic void endTag()
throws ParserException
TagValueListenerendTag in interface TagValueListenerendTag in class SimpleTagValueWrapperParserException - if the tag could not be endedpublic void value(TagValueContext ctxt, java.lang.Object value) throws ParserException
TagValueListenervalue in interface TagValueListenervalue in class SimpleTagValueWrapperctxt - a TagValueContext that could be used to push a sub-documentvalue - the value Object observedParserException - if the value could not be processed