Class TaxonomyDocument.Taxon
- java.lang.Object
-
- com.biomatters.geneious.publicapi.documents.types.TaxonomyDocument.Taxon
-
- Enclosing interface:
- TaxonomyDocument
public static final class TaxonomyDocument.Taxon extends java.lang.Object
A taxon (element of a taxonomy) consisting of its scientific name (e.g. Homo sapiens or Mammalia), its taxonomic level (e.g. Species or Class), its parent taxon, and any other names that it is known by.
-
-
Constructor Summary
Constructors Constructor Description Taxon(java.lang.String scientificName, TaxonomyDocument.TaxonomicLevel taxonomicLevel, TaxonomyDocument.Taxon parent, java.util.List<java.lang.String> otherNames)
Construct a new Taxon.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
java.util.List<java.lang.String>
getOtherNames()
Get any other names that this taxon is known by.TaxonomyDocument.Taxon
getParent()
Get the parent taxon (if any).java.lang.String
getScientificName()
Get the scientific name of this taxon (e.g.TaxonomyDocument.TaxonomicLevel
getTaxonomicLevel()
Get the taxonomic level of this taxon (e.g.int
hashCode()
java.lang.String
toString()
Convert this Taxon and all of its ancestors to a String (i.e.
-
-
-
Constructor Detail
-
Taxon
public Taxon(java.lang.String scientificName, TaxonomyDocument.TaxonomicLevel taxonomicLevel, TaxonomyDocument.Taxon parent, java.util.List<java.lang.String> otherNames)
Construct a new Taxon.- Parameters:
scientificName
- the scientific name of this taxon (e.g. Homo sapiens or Mammalia)taxonomicLevel
- the taxonomic level of this taxon (e.g. Species or Class); must not be nullparent
- the parent taxon or null if this is a top-level Taxon. For example, the parent of "Homo sapiens (Species)" is "Homo (Genus)"otherNames
- any other names that this taxon is known by. May be null or empty to indicate no other names. For example. "Homo sapiens" is also known as "Human" and "Man".
-
-
Method Detail
-
getTaxonomicLevel
public TaxonomyDocument.TaxonomicLevel getTaxonomicLevel()
Get the taxonomic level of this taxon (e.g. Species or Class)- Returns:
- the taxonomic level of this taxon (e.g. Species or Class)
-
getScientificName
public java.lang.String getScientificName()
Get the scientific name of this taxon (e.g. Homo sapiens or Mammalia)- Returns:
- the scientific name of this taxon (e.g. Homo sapiens or Mammalia)
-
getParent
public TaxonomyDocument.Taxon getParent()
Get the parent taxon (if any). For example, the parent of "Homo sapiens (Species)" is "Homo (Genus)"- Returns:
- the parent taxon, or null if this is a top-level Taxon.
-
getOtherNames
public java.util.List<java.lang.String> getOtherNames()
Get any other names that this taxon is known by. For example. "Homo sapiens" is also known as "Human" and "Man".- Returns:
- any other names that this taxon is known by as an unmodifialble list. It will be an empty list if it has no other names.
-
toString
public java.lang.String toString()
Convert this Taxon and all of its ancestors to a String (i.e. the String will contain the name of all elements of the taxonomy on the path from the root to this Taxon). Currently this is of the form Eukaryota (NoRank); Fungi/Metazoa group (NoRank); Metazoa (Kingdom); Eumetazoa (NoRank); Bilateria (NoRank); Coelomata (NoRank); Deuterostomia (NoRank); Chordata (Phylum); Craniata (Subphylum); Vertebrata (NoRank); Gnathostomata (Superclass); Teleostomi (NoRank); Euteleostomi (NoRank); Sarcopterygii (NoRank); Tetrapoda (NoRank); Amniota (NoRank); Sauropsida (NoRank); Sauria (NoRank); Archosauria (NoRank); Dinosauria (NoRank); Saurischia (NoRank); Theropoda (NoRank); Coelurosauria (NoRank); Aves (Class); Neognathae (SuperOrder); Falconiformes (Order); Falconidae (Family); Falco (Genus); Falco columbarius (Species) But this is not guaranteed to remain in this format.- Overrides:
toString
in classjava.lang.Object
- Returns:
- a string representation of this Taxon and all of its ancestors
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-