public class CharactersBlock extends NexusBlock.Abstract
NexusBlock.Abstract
Modifier and Type | Field and Description |
---|---|
static String |
CHARACTERS_BLOCK
A constant representing the name of Characters blocks.
|
Modifier | Constructor and Description |
---|---|
|
CharactersBlock()
Delegates to NexusBlock.Abstract constructor using
CharactersBlock.CHARACTERS_BLOCK as the name.
|
protected |
CharactersBlock(String replacementLabel)
For the DATA block subclass.
|
Modifier and Type | Method and Description |
---|---|
void |
addCharLabel(String charLabel) |
void |
addCharState(String charState) |
void |
addCharStateKeyword(String charState,
String keyword) |
void |
addComment(NexusComment comment)
Adds a comment.
|
void |
addEquate(String symbol,
List symbols) |
void |
addItem(String item) |
void |
addMatrixEntry(String taxa) |
void |
addState(String state) |
void |
addStateLabel(String state,
String label) |
void |
addSymbol(String symbol) |
void |
addTaxLabel(String taxLabel)
Add a TAXLABEL.
|
void |
appendMatrixData(String taxa,
Object data) |
boolean |
containsCharLabel(String charLabel) |
boolean |
containsTaxLabel(String taxLabel)
Checks to see if we contain the given TAXLABEL.
|
Set |
getAllCharStates() |
List |
getCharLabels() |
String |
getCharStateLabel(String charState) |
List |
getCharStateLabelKeywords(String charState) |
List |
getComments()
Returns all comments.
|
String |
getDataType() |
int |
getDimensionsNChar()
Get the NCHAR value.
|
int |
getDimensionsNTax()
Get the NTAX value.
|
int |
getEliminateEnd() |
int |
getEliminateStart() |
Map |
getEquates() |
String |
getGap() |
List |
getItems() |
String |
getMatchChar() |
List |
getMatrixData(String taxa) |
Collection |
getMatrixLabels() |
String |
getMissing() |
List |
getStateLabels(String state) |
String |
getStatesFormat() |
List |
getSymbols() |
List |
getTaxLabels()
Get the TAXLABEL values added so far.
|
boolean |
isInterleaved() |
boolean |
isLabels() |
boolean |
isRespectCase() |
boolean |
isTokens() |
boolean |
isTransposed() |
void |
removeAllItems() |
void |
removeAllSymbols() |
void |
removeCharLabel(String charLabel) |
void |
removeCharState(String charState) |
void |
removeComment(NexusComment comment)
Removes a comment.
|
void |
removeEquate(String symbol) |
void |
removeItem(String item) |
void |
removeState(String state) |
void |
removeSymbol(String symbol) |
void |
removeTaxLabel(String taxLabel)
Removes the given TAXLABEL.
|
void |
setCharStateLabel(String charState,
String label) |
void |
setDataType(String dataType) |
void |
setDimensionsNChar(int dimensionsNChar)
Set the NCHAR value.
|
void |
setDimensionsNTax(int dimensionsNTax)
Set the NTAX value.
|
void |
setEliminateEnd(int eliminateEnd) |
void |
setEliminateStart(int eliminateStart) |
void |
setGap(String gap) |
void |
setInterleaved(boolean interleaved) |
void |
setLabels(boolean labels) |
void |
setMatchChar(String matchChar) |
void |
setMissing(String missing) |
void |
setRespectCase(boolean respectCase) |
void |
setStatesFormat(String statesFormat) |
void |
setTokens(boolean tokens) |
void |
setTransposed(boolean transposed) |
protected void |
writeBlockContents(Writer writer)
Implement this to write out block contents, not including the BEGIN
and END tags.
|
getBlockName, writeObject, writeToken
public static final String CHARACTERS_BLOCK
public CharactersBlock()
protected CharactersBlock(String replacementLabel)
replacementLabel
- the different label to use.public void setDimensionsNTax(int dimensionsNTax)
dimensionsNTax
- the NTAX value.public int getDimensionsNTax()
public void setDimensionsNChar(int dimensionsNChar)
dimensionsNChar
- the NCHAR value.public int getDimensionsNChar()
public void setDataType(String dataType)
public String getDataType()
public void setRespectCase(boolean respectCase)
public boolean isRespectCase()
public void setMissing(String missing)
public String getMissing()
public void removeSymbol(String symbol)
public void removeAllSymbols()
public List getSymbols()
public void removeEquate(String symbol)
public Map getEquates()
public void setMatchChar(String matchChar)
public String getMatchChar()
public void setLabels(boolean labels)
public boolean isLabels()
public void setTransposed(boolean transposed)
public boolean isTransposed()
public void setInterleaved(boolean interleaved)
public boolean isInterleaved()
public void removeItem(String item)
public void removeAllItems()
public void setStatesFormat(String statesFormat)
public String getStatesFormat()
public void setTokens(boolean tokens)
public boolean isTokens()
public void setEliminateStart(int eliminateStart)
public int getEliminateStart()
public void setEliminateEnd(int eliminateEnd)
public int getEliminateEnd()
public void addTaxLabel(String taxLabel) throws ParseException
taxLabel
- the label to add.ParseException
- if the label cannot be added.public void removeTaxLabel(String taxLabel)
taxLabel
- the label to remove.public boolean containsTaxLabel(String taxLabel)
taxLabel
- the label to check for.public List getTaxLabels()
public void addCharState(String charState)
public void setCharStateLabel(String charState, String label)
public void addCharStateKeyword(String charState, String keyword)
public String getCharStateLabel(String charState)
public List getCharStateLabelKeywords(String charState)
public void removeCharState(String charState)
public Set getAllCharStates()
public void addCharLabel(String charLabel)
public void removeCharLabel(String charLabel)
public boolean containsCharLabel(String charLabel)
public List getCharLabels()
public void addStateLabel(String state, String label)
public List getStateLabels(String state)
public void removeState(String state)
public void addMatrixEntry(String taxa)
public void appendMatrixData(String taxa, Object data)
public List getMatrixData(String taxa)
public Collection getMatrixLabels()
public void addComment(NexusComment comment)
comment
- the comment to add.public void removeComment(NexusComment comment)
comment
- the comment to remove.public List getComments()
protected void writeBlockContents(Writer writer) throws IOException
NexusBlock.Abstract
writeBlockContents
in class NexusBlock.Abstract
writer
- the writer to write to.IOException
- if writing failed.Copyright © 2014 BioJava. All rights reserved.