org.biojavax.bio.phylo.io.nexus
Class TaxaBlockBuilder

java.lang.Object
  extended by org.biojavax.bio.phylo.io.nexus.NexusBlockBuilder.Abstract
      extended by org.biojavax.bio.phylo.io.nexus.TaxaBlockBuilder
All Implemented Interfaces:
NexusBlockBuilder, NexusBlockListener, TaxaBlockListener

public class TaxaBlockBuilder
extends NexusBlockBuilder.Abstract
implements TaxaBlockListener

Builds Nexus taxa blocks.

Since:
1.6
Author:
Richard Holland, Tobias Thierer, Jim Balhoff

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.biojavax.bio.phylo.io.nexus.NexusBlockBuilder
NexusBlockBuilder.Abstract
 
Constructor Summary
TaxaBlockBuilder()
           
 
Method Summary
protected  void addComment(NexusComment comment)
          Tell the builder to add the given comment at the current location.
 void addTaxLabel(java.lang.String taxLabel)
          Add another value after the TAXLABEL tag.
 void endBlock()
          Notifies the parser that a block is ending.
 void endTokenGroup()
          Closing a line (semi-colon encountered).
 void setDimensionsNTax(int dimensionsNTax)
          Set the DIMENSIONS NTAX value.
protected  NexusBlock startBlockObject()
          Tell the builder to start a new block object.
 
Methods inherited from class org.biojavax.bio.phylo.io.nexus.NexusBlockBuilder.Abstract
beginComment, commentText, endComment, getBlockName, getNexusBlock, startBlock
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.biojavax.bio.phylo.io.nexus.NexusBlockListener
beginComment, commentText, endComment, startBlock
 

Constructor Detail

TaxaBlockBuilder

public TaxaBlockBuilder()
Method Detail

addTaxLabel

public void addTaxLabel(java.lang.String taxLabel)
                 throws ParseException
Description copied from interface: TaxaBlockListener
Add another value after the TAXLABEL tag.

Specified by:
addTaxLabel in interface TaxaBlockListener
Parameters:
taxLabel - the new taxa to add.
Throws:
ParseException - if the label is invalid.

setDimensionsNTax

public void setDimensionsNTax(int dimensionsNTax)
Description copied from interface: TaxaBlockListener
Set the DIMENSIONS NTAX value.

Specified by:
setDimensionsNTax in interface TaxaBlockListener
Parameters:
dimensionsNTax - the new value.

addComment

protected void addComment(NexusComment comment)
Description copied from class: NexusBlockBuilder.Abstract
Tell the builder to add the given comment at the current location.

Specified by:
addComment in class NexusBlockBuilder.Abstract
Parameters:
comment - the comment to add.

startBlockObject

protected NexusBlock startBlockObject()
Description copied from class: NexusBlockBuilder.Abstract
Tell the builder to start a new block object.

Specified by:
startBlockObject in class NexusBlockBuilder.Abstract

endBlock

public void endBlock()
Description copied from interface: NexusBlockListener
Notifies the parser that a block is ending.

Specified by:
endBlock in interface NexusBlockListener

endTokenGroup

public void endTokenGroup()
Description copied from interface: NexusBlockListener
Closing a line (semi-colon encountered). This indicates that anything received after it is on the next logical line of the block.

Specified by:
endTokenGroup in interface NexusBlockListener