Package org.biojava.bio.program.tagvalue
Class TagRenamer
java.lang.Object
org.biojava.bio.program.tagvalue.SimpleTagValueWrapper
org.biojava.bio.program.tagvalue.TagRenamer
- All Implemented Interfaces:
TagValueListener
,TagValueWrapper
Rename tags using a TagMapper.
This will rename tags as they stream into this listener using a TagMapper. Once renamed, the events will be forwarded onto a delegate TagValueListener for further processing.
- Since:
- 1.2
- Author:
- Matthew Pocock
-
Constructor Summary
ConstructorsConstructorDescriptionTagRenamer
(TagValueListener delegate, PropertyChanger mapper) Build a new TagRenamer with a delegate and mapper. -
Method Summary
Modifier and TypeMethodDescriptionRetrieve the mapper used to rename tagsvoid
Start a new tag.Methods inherited from class org.biojava.bio.program.tagvalue.SimpleTagValueWrapper
endRecord, endTag, getDelegate, setDelegate, startRecord, value
-
Constructor Details
-
TagRenamer
Build a new TagRenamer with a delegate and mapper.- Parameters:
delegate
- TagValueListener to pass mapped events ontomapper
- TagMapper used to rename tags
-
-
Method Details
-
getMapper
Retrieve the mapper used to rename tags- Returns:
- the current mapper
-
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
-