Package org.biojava.bio.program.tagvalue
Class AbstractWrapper
java.lang.Object
org.biojava.bio.program.tagvalue.AbstractWrapper
- All Implemented Interfaces:
TagValueListener
,TagValueWrapper
An abstract TagValueWrapper that does nothing!
Useful for writing TagValueWrappers which only act on a subset of the events.
- Author:
- David Huen
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
The current record has ended.void
endTag()
End the current tag.get listener to which all calls will be delegatedvoid
setDelegate
(TagValueListener delegate) set listener to which all calls will be delegatedvoid
A new record is about to start.void
Start a new tag.void
value
(TagValueContext ctxt, Object value) A value has been seen.
-
Constructor Details
-
AbstractWrapper
public AbstractWrapper()
-
-
Method Details
-
setDelegate
Description copied from interface:TagValueWrapper
set listener to which all calls will be delegated- Specified by:
setDelegate
in interfaceTagValueWrapper
-
getDelegate
Description copied from interface:TagValueWrapper
get listener to which all calls will be delegated- Specified by:
getDelegate
in interfaceTagValueWrapper
-
startRecord
Description copied from interface:TagValueListener
A new record is about to start.- Specified by:
startRecord
in interfaceTagValueListener
- Throws:
ParserException
- if the record can not be started
-
startTag
Description copied from interface:TagValueListener
Start a new tag.- Specified by:
startTag
in interfaceTagValueListener
- 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
- Throws:
ParserException
- if the tag could not be ended
-
endRecord
Description copied from interface:TagValueListener
The current record has ended.- Specified by:
endRecord
in interfaceTagValueListener
- Throws:
ParserException
- if the record can not be ended
-
value
Description copied from interface:TagValueListener
A value has been seen.- Specified by:
value
in interfaceTagValueListener
- 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
-