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.
Constructor and Description |
---|
TagRenamer(TagValueListener delegate,
PropertyChanger mapper)
Build a new TagRenamer with a delegate and mapper.
|
Modifier and Type | Method and Description |
---|---|
PropertyChanger |
getMapper()
Retrieve the mapper used to rename tags
|
void |
startTag(Object tag)
Start a new tag.
|
endRecord, endTag, getDelegate, setDelegate, startRecord, value
public TagRenamer(TagValueListener delegate, PropertyChanger mapper)
delegate
- TagValueListener to pass mapped events ontomapper
- TagMapper used to rename tagspublic PropertyChanger getMapper()
public void startTag(Object tag) throws ParserException
TagValueListener
startTag
in interface TagValueListener
startTag
in class SimpleTagValueWrapper
tag
- the Object representing the new tagParserException
- if the tag could not be startedCopyright © 2014 BioJava. All rights reserved.