Class NameUsageSearchResult
- java.lang.Object
-
- org.gbif.api.model.checklistbank.search.NameUsageSearchResult
-
- All Implemented Interfaces:
LinneanClassification
,LinneanClassificationKeys
public class NameUsageSearchResult extends Object implements LinneanClassification, LinneanClassificationKeys
Class used for returning results of a full text search operation. This class contains additional attributes that are required for displaying/providing textual information.
-
-
Constructor Summary
Constructors Constructor Description NameUsageSearchResult()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
String
getAccepted()
Integer
getAcceptedKey()
String
getAccordingTo()
String
getAuthorship()
String
getBasionym()
Integer
getBasionymKey()
String
getCanonicalName()
Integer
getClassKey()
Return the class key for this usage.String
getClazz()
Return the class for this usage.UUID
getConstituentKey()
UUID
getDatasetKey()
@NotNull List<Description>
getDescriptions()
String
getFamily()
Return the family for this usage.Integer
getFamilyKey()
Return the family key for this usage.String
getGenus()
Return the genus for this usage.Integer
getGenusKey()
Return the genus key for this usage.List<Habitat>
getHabitats()
@NotNull LinkedHashMap<Integer,String>
getHigherClassificationMap()
An ordered map with entries for all higher Linnean ranks down to the actual direct parent of this usage.String
getHigherRank(Rank rank)
Gets a higher taxon property by passing the rank of it.Integer
getHigherRankKey(Rank rank)
Gets a higher taxon key by passing the rank of it.Integer
getKey()
String
getKingdom()
Return the kingdom for this usage.Integer
getKingdomKey()
Return the kingdom key for this usage.Integer
getNameKey()
NameType
getNameType()
List<NomenclaturalStatus>
getNomenclaturalStatus()
Integer
getNubKey()
int
getNumDescendants()
long
getNumOccurrences()
String
getOrder()
Return the order for this usage.Integer
getOrderKey()
Return the order key for this usage.Origin
getOrigin()
String
getParent()
Integer
getParentKey()
String
getPhylum()
Return the phylum for this usage.Integer
getPhylumKey()
Return the phylum key for this usage.String
getPublishedIn()
Rank
getRank()
String
getScientificName()
String
getSpecies()
Return the species for this usage.Integer
getSpeciesKey()
Return the species key for this usage.String
getSubgenus()
Return the canonical subgenus name for this usage.Integer
getSubgenusKey()
Return the subgenus key for this usage.String
getTaxonID()
TaxonomicStatus
getTaxonomicStatus()
List<ThreatStatus>
getThreatStatuses()
@NotNull List<VernacularName>
getVernacularNames()
int
hashCode()
Boolean
isExtinct()
boolean
isSynonym()
Convenience method using the taxonomicStatus field.void
setAccepted(String accepted)
void
setAcceptedKey(Integer acceptedKey)
void
setAccordingTo(String accordingTo)
void
setAuthorship(String authorship)
void
setBasionym(String basionym)
void
setBasionymKey(Integer basionymKey)
void
setCanonicalName(String canonicalName)
void
setClassKey(Integer classKey)
void
setClazz(String clazz)
void
setConstituentKey(UUID constituentKey)
void
setDatasetKey(UUID datasetKey)
void
setDescriptions(List<Description> descriptions)
void
setExtinct(Boolean extinct)
void
setFamily(String family)
void
setFamilyKey(Integer familyKey)
void
setGenus(String genus)
void
setGenusKey(Integer genusKey)
void
setHabitats(List<Habitat> habitats)
void
setKey(Integer key)
void
setKingdom(String kingdom)
void
setKingdomKey(Integer kingdomKey)
void
setNameKey(Integer nameKey)
void
setNameType(NameType nameType)
void
setNomenclaturalStatus(List<NomenclaturalStatus> nomenclaturalStatus)
void
setNubKey(Integer nubKey)
void
setNumDescendants(int numDescendants)
void
setNumOccurrences(long numOccurrences)
void
setOrder(String order)
void
setOrderKey(Integer orderKey)
void
setOrigin(Origin origin)
void
setParent(String parent)
void
setParentKey(Integer parentKey)
void
setPhylum(String phylum)
void
setPhylumKey(Integer phylumKey)
void
setPublishedIn(String publishedIn)
void
setRank(Rank rank)
void
setScientificName(String scientificName)
void
setSpecies(String species)
void
setSpeciesKey(Integer speciesKey)
void
setSubgenus(String subgenus)
void
setSubgenusKey(Integer subgenusKey)
void
setTaxonID(String taxonID)
void
setTaxonomicStatus(TaxonomicStatus taxonomicStatus)
void
setThreatStatuses(List<ThreatStatus> threatStatuses)
void
setVernacularNames(List<VernacularName> vernacularNames)
String
toString()
-
-
-
Constructor Detail
-
NameUsageSearchResult
public NameUsageSearchResult()
-
-
Method Detail
-
getNameKey
public Integer getNameKey()
- Returns:
- the name key for retrieving a parsed name object
-
setNameKey
public void setNameKey(Integer nameKey)
-
getAccepted
public String getAccepted()
-
setAccepted
public void setAccepted(String accepted)
-
getAcceptedKey
public Integer getAcceptedKey()
-
setAcceptedKey
public void setAcceptedKey(Integer acceptedKey)
-
getAccordingTo
public String getAccordingTo()
-
setAccordingTo
public void setAccordingTo(String accordingTo)
-
getAuthorship
public String getAuthorship()
-
setAuthorship
public void setAuthorship(String authorship)
-
getBasionym
public String getBasionym()
-
setBasionym
public void setBasionym(String basionym)
-
getBasionymKey
public Integer getBasionymKey()
-
setBasionymKey
public void setBasionymKey(Integer basionymKey)
-
getCanonicalName
public String getCanonicalName()
-
setCanonicalName
public void setCanonicalName(String canonicalName)
-
getDatasetKey
public UUID getDatasetKey()
-
setDatasetKey
public void setDatasetKey(UUID datasetKey)
-
getConstituentKey
public UUID getConstituentKey()
-
setConstituentKey
public void setConstituentKey(UUID constituentKey)
-
getDescriptions
@NotNull public @NotNull List<Description> getDescriptions()
- Returns:
- the list of Description
-
setDescriptions
public void setDescriptions(List<Description> descriptions)
- Parameters:
descriptions
- the list of Description
-
getNameType
public NameType getNameType()
-
setNameType
public void setNameType(NameType nameType)
-
getNumDescendants
public int getNumDescendants()
-
setNumDescendants
public void setNumDescendants(int numDescendants)
-
getNumOccurrences
public long getNumOccurrences()
-
setNumOccurrences
public void setNumOccurrences(long numOccurrences)
-
getParentKey
public Integer getParentKey()
-
setParentKey
public void setParentKey(Integer parentKey)
-
getPublishedIn
public String getPublishedIn()
-
setPublishedIn
public void setPublishedIn(String publishedIn)
-
getScientificName
public String getScientificName()
-
setScientificName
public void setScientificName(String scientificName)
-
getTaxonID
public String getTaxonID()
-
setTaxonID
public void setTaxonID(String taxonID)
-
getTaxonomicStatus
public TaxonomicStatus getTaxonomicStatus()
-
setTaxonomicStatus
public void setTaxonomicStatus(TaxonomicStatus taxonomicStatus)
-
getThreatStatuses
public List<ThreatStatus> getThreatStatuses()
-
setThreatStatuses
public void setThreatStatuses(List<ThreatStatus> threatStatuses)
-
getNomenclaturalStatus
public List<NomenclaturalStatus> getNomenclaturalStatus()
-
setNomenclaturalStatus
public void setNomenclaturalStatus(List<NomenclaturalStatus> nomenclaturalStatus)
-
getVernacularNames
@NotNull public @NotNull List<VernacularName> getVernacularNames()
- Returns:
- the list of VernacularName
-
setVernacularNames
public void setVernacularNames(List<VernacularName> vernacularNames)
- Parameters:
vernacularNames
- the VernacularName list to set
-
setExtinct
public void setExtinct(Boolean extinct)
-
getHabitats
public List<Habitat> getHabitats()
-
setHabitats
public void setHabitats(List<Habitat> habitats)
-
getKingdom
public String getKingdom()
Description copied from interface:LinneanClassification
Return the kingdom for this usage. If the usage is for something above the "kingdom" taxonomic level, return null.- Specified by:
getKingdom
in interfaceLinneanClassification
- Returns:
- the kingdom
-
setKingdom
public void setKingdom(String kingdom)
- Specified by:
setKingdom
in interfaceLinneanClassification
- Parameters:
kingdom
- the kingdom to set
-
getPhylum
public String getPhylum()
Description copied from interface:LinneanClassification
Return the phylum for this usage. If the usage is for something above the "phylum" taxonomic level, return null.- Specified by:
getPhylum
in interfaceLinneanClassification
- Returns:
- the phylum
-
setPhylum
public void setPhylum(String phylum)
- Specified by:
setPhylum
in interfaceLinneanClassification
- Parameters:
phylum
- the phylum to set
-
getClazz
public String getClazz()
Description copied from interface:LinneanClassification
Return the class for this usage. If the usage is for something above the "class" taxonomic level, return null.- Specified by:
getClazz
in interfaceLinneanClassification
- Returns:
- the class
-
setClazz
public void setClazz(String clazz)
- Specified by:
setClazz
in interfaceLinneanClassification
- Parameters:
clazz
- the clazz to set
-
getOrder
public String getOrder()
Description copied from interface:LinneanClassification
Return the order for this usage. If the usage is for something above the "order" taxonomic level, return null.- Specified by:
getOrder
in interfaceLinneanClassification
- Returns:
- the order
-
setOrder
public void setOrder(String order)
- Specified by:
setOrder
in interfaceLinneanClassification
- Parameters:
order
- the order to set
-
getFamily
public String getFamily()
Description copied from interface:LinneanClassification
Return the family for this usage. If the usage is for something above the "family" taxonomic level, return null.- Specified by:
getFamily
in interfaceLinneanClassification
- Returns:
- the family
-
setFamily
public void setFamily(String family)
- Specified by:
setFamily
in interfaceLinneanClassification
- Parameters:
family
- the family to set
-
getGenus
public String getGenus()
Description copied from interface:LinneanClassification
Return the genus for this usage. If the usage is for something above the "genus" taxonomic level, return null.- Specified by:
getGenus
in interfaceLinneanClassification
- Returns:
- the genus
-
setGenus
public void setGenus(String genus)
- Specified by:
setGenus
in interfaceLinneanClassification
- Parameters:
genus
- the genus to set
-
getSubgenus
public String getSubgenus()
Description copied from interface:LinneanClassification
Return the canonical subgenus name for this usage. If the usage is for something above the "subgenus" taxonomic level, return null.- Specified by:
getSubgenus
in interfaceLinneanClassification
- Returns:
- the subgenus name
-
setSubgenus
public void setSubgenus(String subgenus)
- Specified by:
setSubgenus
in interfaceLinneanClassification
- Parameters:
subgenus
- the subgenus canonical name
-
getSpecies
public String getSpecies()
Description copied from interface:LinneanClassification
Return the species for this usage. If the usage is for something above the "species" taxonomic level, return null.- Specified by:
getSpecies
in interfaceLinneanClassification
- Returns:
- the species
-
setSpecies
public void setSpecies(String species)
- Specified by:
setSpecies
in interfaceLinneanClassification
- Parameters:
species
- the species to set
-
getKingdomKey
public Integer getKingdomKey()
Description copied from interface:LinneanClassificationKeys
Return the kingdom key for this usage. If the usage is for something above the "kingdom" taxonomic level, return null.- Specified by:
getKingdomKey
in interfaceLinneanClassificationKeys
- Returns:
- the kingdomKey
-
setKingdomKey
public void setKingdomKey(Integer kingdomKey)
- Specified by:
setKingdomKey
in interfaceLinneanClassificationKeys
- Parameters:
kingdomKey
- the kingdomKey to set
-
getPhylumKey
public Integer getPhylumKey()
Description copied from interface:LinneanClassificationKeys
Return the phylum key for this usage. If the usage is for something above the "phylum" taxonomic level, return null.- Specified by:
getPhylumKey
in interfaceLinneanClassificationKeys
- Returns:
- the phylumKey
-
setPhylumKey
public void setPhylumKey(Integer phylumKey)
- Specified by:
setPhylumKey
in interfaceLinneanClassificationKeys
- Parameters:
phylumKey
- the phylumKey to set
-
getClassKey
public Integer getClassKey()
Description copied from interface:LinneanClassificationKeys
Return the class key for this usage. If the usage is for something above the "class" taxonomic level, return null.- Specified by:
getClassKey
in interfaceLinneanClassificationKeys
- Returns:
- the classKey
-
setClassKey
public void setClassKey(Integer classKey)
- Specified by:
setClassKey
in interfaceLinneanClassificationKeys
- Parameters:
classKey
- the classKey to set
-
getOrderKey
public Integer getOrderKey()
Description copied from interface:LinneanClassificationKeys
Return the order key for this usage. If the usage is for something above the "order" taxonomic level, return null.- Specified by:
getOrderKey
in interfaceLinneanClassificationKeys
- Returns:
- the orderKey
-
setOrderKey
public void setOrderKey(Integer orderKey)
- Specified by:
setOrderKey
in interfaceLinneanClassificationKeys
- Parameters:
orderKey
- the orderKey to set
-
getFamilyKey
public Integer getFamilyKey()
Description copied from interface:LinneanClassificationKeys
Return the family key for this usage. If the usage is for something above the "family" taxonomic level, return null.- Specified by:
getFamilyKey
in interfaceLinneanClassificationKeys
- Returns:
- the familyKey
-
setFamilyKey
public void setFamilyKey(Integer familyKey)
- Specified by:
setFamilyKey
in interfaceLinneanClassificationKeys
- Parameters:
familyKey
- the familyKey to set
-
getGenusKey
public Integer getGenusKey()
Description copied from interface:LinneanClassificationKeys
Return the genus key for this usage. If the usage is for something above the "genus" taxonomic level, return null.- Specified by:
getGenusKey
in interfaceLinneanClassificationKeys
- Returns:
- the genusKey
-
setGenusKey
public void setGenusKey(Integer genusKey)
- Specified by:
setGenusKey
in interfaceLinneanClassificationKeys
- Parameters:
genusKey
- the genusKey to set
-
getSubgenusKey
public Integer getSubgenusKey()
Description copied from interface:LinneanClassificationKeys
Return the subgenus key for this usage. If the usage is for something above the "subgenus" taxonomic level, return null.- Specified by:
getSubgenusKey
in interfaceLinneanClassificationKeys
- Returns:
- subgenusKey
-
setSubgenusKey
public void setSubgenusKey(Integer subgenusKey)
- Specified by:
setSubgenusKey
in interfaceLinneanClassificationKeys
- Parameters:
subgenusKey
- the subgenus usage key
-
getSpeciesKey
public Integer getSpeciesKey()
Description copied from interface:LinneanClassificationKeys
Return the species key for this usage. If the usage is for something above the "species" taxonomic level, return null.- Specified by:
getSpeciesKey
in interfaceLinneanClassificationKeys
- Returns:
- the speciesKey
-
setSpeciesKey
public void setSpeciesKey(Integer speciesKey)
- Specified by:
setSpeciesKey
in interfaceLinneanClassificationKeys
- Parameters:
speciesKey
- the speciesKey to set
-
getHigherRank
public String getHigherRank(Rank rank)
Description copied from interface:LinneanClassification
Gets a higher taxon property by passing the rank of it. Only Linnean ranks are supported.- Specified by:
getHigherRank
in interfaceLinneanClassification
- Parameters:
rank
- the higher linnean rank to retrieve- Returns:
- the name of the higher taxon or null if rank doesnt exist
-
getHigherRankKey
public Integer getHigherRankKey(Rank rank)
Description copied from interface:LinneanClassificationKeys
Gets a higher taxon key by passing the rank of it. Only Linnean ranks are supported.- Specified by:
getHigherRankKey
in interfaceLinneanClassificationKeys
- Parameters:
rank
- the higher linnean rank to retrieve- Returns:
- the key of the higher taxon or null if rank doesnt exist
-
getHigherClassificationMap
@NotNull public @NotNull LinkedHashMap<Integer,String> getHigherClassificationMap()
An ordered map with entries for all higher Linnean ranks down to the actual direct parent of this usage. The map starts with the highest rank, e.g. the kingdom and maps the name usage key to its canonical name. The name usage itself is never included, even though a higher rank might point to the usage itself.- Returns:
- map of higher ranks
-
isSynonym
public boolean isSynonym()
Convenience method using the taxonomicStatus field.- Returns:
- true if its a synonym
-
-