Package org.biojavax.bio.phylo.io.nexus
Class TreesBlockBuilder
- java.lang.Object
-
- org.biojavax.bio.phylo.io.nexus.NexusBlockBuilder.Abstract
-
- org.biojavax.bio.phylo.io.nexus.TreesBlockBuilder
-
- All Implemented Interfaces:
NexusBlockBuilder,NexusBlockListener,TreesBlockListener
public class TreesBlockBuilder extends NexusBlockBuilder.Abstract implements TreesBlockListener
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
Constructors Constructor Description TreesBlockBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddComment(NexusComment comment)Tell the builder to add the given comment at the current location.voidaddTranslation(String label, String taxa)Add a translation.voidaddTree(String label, TreesBlock.NewickTreeString tree)Adds a tree.voidendBlock()Notifies the parser that a block is ending.voidendTokenGroup()Closing a line (semi-colon encountered).protected NexusBlockstartBlockObject()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
-
TreesBlockBuilder
public TreesBlockBuilder()
-
-
Method Detail
-
addComment
protected void addComment(NexusComment comment)
Description copied from class:NexusBlockBuilder.AbstractTell the builder to add the given comment at the current location.- Specified by:
addCommentin classNexusBlockBuilder.Abstract- Parameters:
comment- the comment to add.
-
startBlockObject
protected NexusBlock startBlockObject()
Description copied from class:NexusBlockBuilder.AbstractTell the builder to start a new block object.- Specified by:
startBlockObjectin classNexusBlockBuilder.Abstract
-
endBlock
public void endBlock()
Description copied from interface:NexusBlockListenerNotifies the parser that a block is ending.- Specified by:
endBlockin interfaceNexusBlockListener
-
endTokenGroup
public void endTokenGroup()
Description copied from interface:NexusBlockListenerClosing a line (semi-colon encountered). This indicates that anything received after it is on the next logical line of the block.- Specified by:
endTokenGroupin interfaceNexusBlockListener
-
addTranslation
public void addTranslation(String label, String taxa)
Description copied from interface:TreesBlockListenerAdd a translation.- Specified by:
addTranslationin interfaceTreesBlockListener- Parameters:
label- the label to add.taxa- the taxa name this label will represent.
-
addTree
public void addTree(String label, TreesBlock.NewickTreeString tree)
Description copied from interface:TreesBlockListenerAdds a tree.- Specified by:
addTreein interfaceTreesBlockListener- Parameters:
label- the label to give the tree.tree- the tree to add.
-
-