Package org.forester.phylogeny.data
Class Taxonomy
java.lang.Object
org.forester.phylogeny.data.Taxonomy
- All Implemented Interfaces:
Comparable<Taxonomy>
,MultipleUris
,PhylogenyData
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
asText()
int
copy()
Creates a new PhylogenyData object with identical values as this PhylogenyData.boolean
getRank()
getUri
(int index) getUris()
int
hashCode()
void
init()
boolean
isEmpty()
boolean
isEqual
(PhylogenyData data) If this and taxonomy 'data' has an identifier, comparison will be based on that.void
setAuthority
(String authority) void
setCommonName
(String common_name) void
setIdentifier
(Identifier identifier) void
setLineage
(List<String> lineage) void
void
setScientificName
(String scientific_name) void
setTaxonomyCode
(String taxonomy_code) void
toNHX()
void
toPhyloXML
(Writer writer, int level, String indentation) Writes a phyloXML representation of this phylogeny data.toString()
-
Constructor Details
-
Taxonomy
public Taxonomy()
-
-
Method Details
-
asSimpleText
- Specified by:
asSimpleText
in interfacePhylogenyData
-
getUri
- Specified by:
getUri
in interfaceMultipleUris
-
addUri
- Specified by:
addUri
in interfaceMultipleUris
-
asText
- Specified by:
asText
in interfacePhylogenyData
-
copy
Description copied from interface:PhylogenyData
Creates a new PhylogenyData object with identical values as this PhylogenyData. This ~should~ return a deep copy, but not there yet.- Specified by:
copy
in interfacePhylogenyData
- Returns:
- a ~deep~ copy of this PhylogenyData
-
equals
-
getAuthority
-
getCommonName
-
getIdentifier
-
getRank
-
getScientificName
-
getSynonyms
-
getTaxonomyCode
-
getUris
- Specified by:
getUris
in interfaceMultipleUris
-
hashCode
public int hashCode() -
init
public void init() -
isEmpty
public boolean isEmpty() -
isEqual
If this and taxonomy 'data' has an identifier, comparison will be based on that. Otherwise, if this and taxonomy 'data' has a code, comparison will be based on that. Otherwise, if Taxonomy 'data' has a scientific name, comparison will be based on that (case insensitive!). Otherwise, if Taxonomy 'data' has a common name, comparison will be based on that (case insensitive!). (Note. This is important and should not be change without a very good reason.)- Specified by:
isEqual
in interfacePhylogenyData
- Returns:
- in general, true if and only if all fiels are exactly identical, false otherwise
-
setAuthority
-
setCommonName
-
setIdentifier
-
setRank
- Throws:
PhyloXmlDataFormatException
-
setScientificName
-
setTaxonomyCode
- Throws:
PhyloXmlDataFormatException
-
setUris
- Specified by:
setUris
in interfaceMultipleUris
-
toNHX
- Specified by:
toNHX
in interfacePhylogenyData
-
toPhyloXML
Description copied from interface:PhylogenyData
Writes a phyloXML representation of this phylogeny data.- Specified by:
toPhyloXML
in interfacePhylogenyData
- Throws:
IOException
-
toString
-
compareTo
- Specified by:
compareTo
in interfaceComparable<Taxonomy>
-
setLineage
-
getLineage
-