public class RegexFieldFinder extends SimpleTagValueWrapper
Constructor and Description |
---|
RegexFieldFinder(TagValueListener delegate,
Pattern pattern,
String[] tags,
boolean inLine)
Creates a new RegexFiledFinder.
|
Modifier and Type | Method and Description |
---|---|
void |
endTag()
End the current tag.
|
void |
startTag(Object tag)
Start a new tag.
|
void |
value(TagValueContext ctxt,
Object val)
A value has been seen.
|
endRecord, getDelegate, setDelegate, startRecord
public RegexFieldFinder(TagValueListener delegate, Pattern pattern, String[] tags, boolean inLine)
delegate
- the TagValueListener to forward events topattern
- a Pattern to match to valuestags
- an array of Strings giving tag names for each group in the
patterninLine
- if false, an entire sub-document will be generated for
the parent tagpublic void startTag(Object tag) throws ParserException
TagValueListener
startTag
in interface TagValueListener
startTag
in class SimpleTagValueWrapper
tag
- the Object representing the new tagParserException
- 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 val) throws ParserException
TagValueListener
value
in interface TagValueListener
value
in class SimpleTagValueWrapper
ctxt
- a TagValueContext that could be used to push a sub-documentval
- the value Object observedParserException
- if the value could not be processedCopyright © 2014 BioJava. All rights reserved.