org.biojava.bio.program.tagvalue
Class TagRenamer

java.lang.Object
  extended byorg.biojava.bio.program.tagvalue.TagValueWrapper
      extended byorg.biojava.bio.program.tagvalue.TagRenamer
All Implemented Interfaces:
TagValueListener

public class TagRenamer
extends 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
TagRenamer(TagValueListener delegate, TagMapper mapper)
          Build a new TagRenamer with a delegate and mapper.
 
Method Summary
 TagMapper getMapper()
          Retrieve the mapper used to rename tags
 void startTag(java.lang.Object tag)
          Start a new tag.
 
Methods inherited from class org.biojava.bio.program.tagvalue.TagValueWrapper
endRecord, endTag, getDelegate, setDelegate, startRecord, value
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TagRenamer

public TagRenamer(TagValueListener delegate,
                  TagMapper mapper)
Build a new TagRenamer with a delegate and mapper.

Parameters:
delegate - TagValueListener to pass mapped events onto
mapper - TagMapper used to rename tags
Method Detail

getMapper

public TagMapper getMapper()
Retrieve the mapper used to rename tags

Returns:
the current mapper

startTag

public void startTag(java.lang.Object tag)
              throws ParserException
Description copied from interface: TagValueListener
Start a new tag.

Specified by:
startTag in interface TagValueListener
Overrides:
startTag in class TagValueWrapper
Throws:
ParserException