Class Taxonomy

java.lang.Object
org.forester.phylogeny.data.Taxonomy
All Implemented Interfaces:
Comparable<Taxonomy>, MultipleUris, PhylogenyData

public class Taxonomy extends Object implements PhylogenyData, MultipleUris, Comparable<Taxonomy>
  • Constructor Details

    • Taxonomy

      public Taxonomy()
  • Method Details

    • asSimpleText

      public StringBuffer asSimpleText()
      Specified by:
      asSimpleText in interface PhylogenyData
    • getUri

      public Uri getUri(int index)
      Specified by:
      getUri in interface MultipleUris
    • addUri

      public void addUri(Uri uri)
      Specified by:
      addUri in interface MultipleUris
    • 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()
    • getUris

      public List<Uri> getUris()
      Specified by:
      getUris in interface MultipleUris
    • 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) throws PhyloXmlDataFormatException
      Throws:
      PhyloXmlDataFormatException
    • setScientificName

      public void setScientificName(String scientific_name)
    • setTaxonomyCode

      public void setTaxonomyCode(String taxonomy_code) throws PhyloXmlDataFormatException
      Throws:
      PhyloXmlDataFormatException
    • setUris

      public void setUris(List<Uri> uris)
      Specified by:
      setUris in interface MultipleUris
    • 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
    • compareTo

      public int compareTo(Taxonomy o)
      Specified by:
      compareTo in interface Comparable<Taxonomy>
    • setLineage

      public void setLineage(List<String> lineage)
    • getLineage

      public List<String> getLineage()