Package org.biojava.bio.program.tagvalue
Class RegexFieldFinder
java.lang.Object
org.biojava.bio.program.tagvalue.SimpleTagValueWrapper
org.biojava.bio.program.tagvalue.RegexFieldFinder
- All Implemented Interfaces:
TagValueListener
,TagValueWrapper
-
Constructor Summary
ConstructorsConstructorDescriptionRegexFieldFinder
(TagValueListener delegate, Pattern pattern, String[] tags, boolean inLine) Creates a new RegexFiledFinder. -
Method Summary
Methods inherited from class org.biojava.bio.program.tagvalue.SimpleTagValueWrapper
endRecord, getDelegate, setDelegate, startRecord
-
Constructor Details
-
RegexFieldFinder
Creates a new RegexFiledFinder.- Parameters:
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 tag
-
-
Method Details
-
startTag
Description copied from interface:TagValueListener
Start a new tag.- Specified by:
startTag
in interfaceTagValueListener
- Overrides:
startTag
in classSimpleTagValueWrapper
- Parameters:
tag
- the Object representing the new tag- Throws:
ParserException
- if the tag could not be started
-
endTag
Description copied from interface:TagValueListener
End the current tag.- Specified by:
endTag
in interfaceTagValueListener
- Overrides:
endTag
in classSimpleTagValueWrapper
- Throws:
ParserException
- if the tag could not be ended
-
value
Description copied from interface:TagValueListener
A value has been seen.- Specified by:
value
in interfaceTagValueListener
- Overrides:
value
in classSimpleTagValueWrapper
- Parameters:
ctxt
- a TagValueContext that could be used to push a sub-documentval
- the value Object observed- Throws:
ParserException
- if the value could not be processed
-