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
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 -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addComment
(NexusComment comment) Tell the builder to add the given comment at the current location.void
addTranslation
(String label, String taxa) Add a translation.void
addTree
(String label, TreesBlock.NewickTreeString tree) Adds a tree.void
endBlock()
Notifies the parser that a block is ending.void
Closing a line (semi-colon encountered).protected NexusBlock
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 Details
-
TreesBlockBuilder
public TreesBlockBuilder()
-
-
Method Details
-
addComment
Description copied from class:NexusBlockBuilder.Abstract
Tell the builder to add the given comment at the current location.- Specified by:
addComment
in classNexusBlockBuilder.Abstract
- Parameters:
comment
- the comment to add.
-
startBlockObject
Description copied from class:NexusBlockBuilder.Abstract
Tell the builder to start a new block object.- Specified by:
startBlockObject
in classNexusBlockBuilder.Abstract
-
endBlock
Description copied from interface:NexusBlockListener
Notifies the parser that a block is ending.- Specified by:
endBlock
in interfaceNexusBlockListener
-
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 interfaceNexusBlockListener
-
addTranslation
Description copied from interface:TreesBlockListener
Add a translation.- Specified by:
addTranslation
in interfaceTreesBlockListener
- Parameters:
label
- the label to add.taxa
- the taxa name this label will represent.
-
addTree
Description copied from interface:TreesBlockListener
Adds a tree.- Specified by:
addTree
in interfaceTreesBlockListener
- Parameters:
label
- the label to give the tree.tree
- the tree to add.
-