Package org.biojava.bio.program.tagvalue
Class Aggregator
java.lang.Object
org.biojava.bio.program.tagvalue.SimpleTagValueWrapper
org.biojava.bio.program.tagvalue.Aggregator
- All Implemented Interfaces:
TagValueListener
,TagValueWrapper
Joins multipel values into single values.
Some properties have values spread across multiple lines. For example, the properties on EMBL features can be spread across multiple lines.
This class provides callbacks to allow event streams to be re-written so that they contain this information.
- Since:
- 1.4
- Author:
- Matthew Pocock
-
Constructor Summary
ConstructorsConstructorDescriptionAggregator
(TagValueListener listener, BoundaryFinder observer, String joiner) -
Method Summary
Modifier and TypeMethodDescriptionvoid
endTag()
End the current tag.void
setBoundaryFinder
(BoundaryFinder finder) void
void
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
-
Constructor Details
-
Aggregator
-
-
Method Details
-
getBoundaryFinder
-
setBoundaryFinder
-
getJoiner
-
setJoiner
-
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
-
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-documentvalue
- the value Object observed- Throws:
ParserException
- if the value could not be processed
-
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
-