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
public class TagRenamer extends SimpleTagValueWrapper
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
Constructors Constructor Description TagRenamer(TagValueListener delegate, PropertyChanger mapper)Build a new TagRenamer with a delegate and mapper.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PropertyChangergetMapper()Retrieve the mapper used to rename tagsvoidstartTag(Object tag)Start a new tag.-
Methods inherited from class org.biojava.bio.program.tagvalue.SimpleTagValueWrapper
endRecord, endTag, getDelegate, setDelegate, startRecord, value
-
-
-
-
Constructor Detail
-
TagRenamer
public TagRenamer(TagValueListener delegate, PropertyChanger mapper)
Build a new TagRenamer with a delegate and mapper.- Parameters:
delegate- TagValueListener to pass mapped events ontomapper- TagMapper used to rename tags
-
-
Method Detail
-
getMapper
public PropertyChanger getMapper()
Retrieve the mapper used to rename tags- Returns:
- the current mapper
-
startTag
public void startTag(Object tag) throws ParserException
Description copied from interface:TagValueListenerStart a new tag.- Specified by:
startTagin interfaceTagValueListener- Overrides:
startTagin classSimpleTagValueWrapper- Parameters:
tag- the Object representing the new tag- Throws:
ParserException- if the tag could not be started
-
-