Package org.biojavax.bio.phylo.io.nexus
Class CharactersBlockBuilder
java.lang.Object
org.biojavax.bio.phylo.io.nexus.NexusBlockBuilder.Abstract
org.biojavax.bio.phylo.io.nexus.CharactersBlockBuilder
- All Implemented Interfaces:
CharactersBlockListener,NexusBlockBuilder,NexusBlockListener
- Direct Known Subclasses:
DataBlockBuilder
public class CharactersBlockBuilder
extends NexusBlockBuilder.Abstract
implements CharactersBlockListener
Builds Nexus characters 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 TypeMethodDescriptionvoidaddCharLabel(String charLabel) voidaddCharState(String charState) voidaddCharStateKeyword(String charState, String keyword) protected voidaddComment(NexusComment comment) Tell the builder to add the given comment at the current location.voidvoidvoidaddMatrixEntry(String taxa) voidvoidaddStateLabel(String state, String label) voidvoidaddTaxLabel(String taxLabel) Add a TAXLABEL.voidappendMatrixData(String taxa, Object data) voidendBlock()Notifies the parser that a block is ending.voidClosing a line (semi-colon encountered).protected CharactersBlockprotected voidAllowed to be called by DATA subclass.voidsetCharStateLabel(String charState, String label) voidsetDataType(String dataType) voidsetDimensionsNChar(int dimensionsNChar) Set the NCHAR value.voidsetDimensionsNTax(int dimensionsNTax) Set the NTAX value.voidsetEliminateEnd(int eliminateEnd) voidsetEliminateStart(int eliminateStart) voidvoidsetInterleaved(boolean interleaved) voidsetLabels(boolean labels) voidsetMatchChar(String matchChar) voidsetMissing(String missing) voidsetRespectCase(boolean respectCase) voidsetStatesFormat(String statesFormat) voidsetTokens(boolean tokens) voidsetTransposed(boolean transposed) protected NexusBlockTell 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, startBlockMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.biojavax.bio.phylo.io.nexus.NexusBlockListener
beginComment, commentText, endComment, startBlock
-
Constructor Details
-
CharactersBlockBuilder
public CharactersBlockBuilder()
-
-
Method Details
-
addComment
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.
-
makeNewBlock
-
startBlockObject
Description copied from class:NexusBlockBuilder.AbstractTell the builder to start a new block object.- Specified by:
startBlockObjectin classNexusBlockBuilder.Abstract
-
resetStatus
Allowed to be called by DATA subclass. -
endBlock
Description copied from interface:NexusBlockListenerNotifies the parser that a block is ending.- Specified by:
endBlockin interfaceNexusBlockListener
-
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
-
addCharLabel
- Specified by:
addCharLabelin interfaceCharactersBlockListener
-
addCharState
- Specified by:
addCharStatein interfaceCharactersBlockListener
-
addCharStateKeyword
- Specified by:
addCharStateKeywordin interfaceCharactersBlockListener
-
addEquate
- Specified by:
addEquatein interfaceCharactersBlockListener
-
addItem
- Specified by:
addItemin interfaceCharactersBlockListener
-
addMatrixEntry
- Specified by:
addMatrixEntryin interfaceCharactersBlockListener
-
addState
- Specified by:
addStatein interfaceCharactersBlockListener
-
addStateLabel
- Specified by:
addStateLabelin interfaceCharactersBlockListener
-
addSymbol
- Specified by:
addSymbolin interfaceCharactersBlockListener
-
addTaxLabel
Description copied from interface:CharactersBlockListenerAdd a TAXLABEL. If it already exists, or is a number that refers to an index position that already exists, an exception is thrown.- Specified by:
addTaxLabelin interfaceCharactersBlockListener- Parameters:
taxLabel- the label to add.- Throws:
ParseException- if the label cannot be added.
-
appendMatrixData
- Specified by:
appendMatrixDatain interfaceCharactersBlockListener
-
setCharStateLabel
- Specified by:
setCharStateLabelin interfaceCharactersBlockListener
-
setDataType
- Specified by:
setDataTypein interfaceCharactersBlockListener
-
setDimensionsNChar
Description copied from interface:CharactersBlockListenerSet the NCHAR value.- Specified by:
setDimensionsNCharin interfaceCharactersBlockListener- Parameters:
dimensionsNChar- the NCHAR value.
-
setDimensionsNTax
Description copied from interface:CharactersBlockListenerSet the NTAX value.- Specified by:
setDimensionsNTaxin interfaceCharactersBlockListener- Parameters:
dimensionsNTax- the NTAX value.
-
setEliminateEnd
- Specified by:
setEliminateEndin interfaceCharactersBlockListener
-
setEliminateStart
- Specified by:
setEliminateStartin interfaceCharactersBlockListener
-
setGap
- Specified by:
setGapin interfaceCharactersBlockListener
-
setInterleaved
- Specified by:
setInterleavedin interfaceCharactersBlockListener
-
setLabels
- Specified by:
setLabelsin interfaceCharactersBlockListener
-
setMatchChar
- Specified by:
setMatchCharin interfaceCharactersBlockListener
-
setMissing
- Specified by:
setMissingin interfaceCharactersBlockListener
-
setRespectCase
- Specified by:
setRespectCasein interfaceCharactersBlockListener
-
setStatesFormat
- Specified by:
setStatesFormatin interfaceCharactersBlockListener
-
setTokens
- Specified by:
setTokensin interfaceCharactersBlockListener
-
setTransposed
- Specified by:
setTransposedin interfaceCharactersBlockListener
-