org.forester.phylogeny.data
Class Taxonomy
java.lang.Object
org.forester.phylogeny.data.Taxonomy
- All Implemented Interfaces:
- PhylogenyData
public class Taxonomy
- extends Object
- implements PhylogenyData
Taxonomy
public Taxonomy()
asSimpleText
public StringBuffer asSimpleText()
- Specified by:
asSimpleText
in interface PhylogenyData
asText
public StringBuffer asText()
- Specified by:
asText
in interface PhylogenyData
copy
public PhylogenyData 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 interface PhylogenyData
- Returns:
- a ~deep~ copy of this PhylogenyData
equals
public boolean equals(Object o)
- Overrides:
equals
in class Object
getAuthority
public String getAuthority()
getCommonName
public String getCommonName()
getIdentifier
public Identifier getIdentifier()
getRank
public String getRank()
getScientificName
public String getScientificName()
getSynonyms
public List<String> getSynonyms()
getTaxonomyCode
public String getTaxonomyCode()
getUri
public Uri getUri()
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
init
public void init()
isEmpty
public boolean isEmpty()
isEqual
public boolean isEqual(PhylogenyData data)
- 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 interface PhylogenyData
- Returns:
- in general, true if and only if all fiels are exactly identical,
false otherwise
setAuthority
public void setAuthority(String authority)
setCommonName
public void setCommonName(String common_name)
setIdentifier
public void setIdentifier(Identifier identifier)
setRank
public void setRank(String rank)
setScientificName
public void setScientificName(String scientific_name)
setTaxonomyCode
public void setTaxonomyCode(String taxonomy_code)
setUri
public void setUri(Uri uri)
toNHX
public StringBuffer toNHX()
- Specified by:
toNHX
in interface PhylogenyData
toPhyloXML
public void toPhyloXML(Writer writer,
int level,
String indentation)
throws IOException
- Description copied from interface:
PhylogenyData
- Writes a phyloXML representation of this phylogeny data.
- Specified by:
toPhyloXML
in interface PhylogenyData
- Throws:
IOException
toString
public String toString()
- Overrides:
toString
in class Object