Package org.gbif.api.model.checklistbank
Class NameUsageMatch
- java.lang.Object
-
- org.gbif.api.model.checklistbank.NameUsageMatch
-
- All Implemented Interfaces:
Serializable,LinneanClassification,LinneanClassificationKeys
public class NameUsageMatch extends Object implements LinneanClassification, LinneanClassificationKeys, Serializable
The resulting lookup of a name usage match. A single name usage key with its Linnean classification and a confidence value for the match.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classNameUsageMatch.MatchType
-
Constructor Summary
Constructors Constructor Description NameUsageMatch()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)IntegergetAcceptedUsageKey()The key of the accepted name usage in case the matched usage was a synonym.List<NameUsageMatch>getAlternatives()StringgetCanonicalName()IntegergetClassKey()Return the class key for this usage.StringgetClazz()Return the class for this usage.@Min(0L) @Max(100L) IntegergetConfidence()The confidence that the lookup was correct.StringgetFamily()Return the family for this usage.IntegergetFamilyKey()Return the family key for this usage.StringgetGenus()Return the genus for this usage.IntegergetGenusKey()Return the genus key for this usage.StringgetHigherRank(Rank rank)Gets a higher taxon property by passing the rank of it.IntegergetHigherRankKey(Rank rank)Gets a higher taxon key by passing the rank of it.StringgetKingdom()Return the kingdom for this usage.IntegergetKingdomKey()Return the kingdom key for this usage.NameUsageMatch.MatchTypegetMatchType()StringgetNote()Optional notes on the matching.StringgetOrder()Return the order for this usage.IntegergetOrderKey()Return the order key for this usage.StringgetPhylum()Return the phylum for this usage.IntegergetPhylumKey()Return the phylum key for this usage.RankgetRank()StringgetScientificName()The scientific name of the matched name usage.StringgetSpecies()Return the species for this usage.IntegergetSpeciesKey()Return the species key for this usage.TaxonomicStatusgetStatus()The taxonomic status of the backbone usage.StringgetSubgenus()Return the canonical subgenus name for this usage.IntegergetSubgenusKey()Return the subgenus key for this usage.IntegergetUsageKey()The name usage key of the name usage that has been matched.inthashCode()booleanisSynonym()voidsetAcceptedUsageKey(Integer acceptedUsageKey)voidsetAlternatives(List<NameUsageMatch> alternatives)voidsetCanonicalName(String canonicalName)voidsetClassKey(Integer classKey)voidsetClazz(String clazz)voidsetConfidence(Integer confidence)voidsetFamily(String family)voidsetFamilyKey(Integer familyKey)voidsetGenus(String genus)voidsetGenusKey(Integer genusKey)voidsetKingdom(String kingdom)voidsetKingdomKey(Integer kingdomKey)voidsetMatchType(NameUsageMatch.MatchType matchType)voidsetNote(String note)voidsetOrder(String order)voidsetOrderKey(Integer orderKey)voidsetPhylum(String phylum)voidsetPhylumKey(Integer phylumKey)voidsetRank(Rank rank)voidsetScientificName(String scientificName)voidsetSpecies(String species)voidsetSpeciesKey(Integer speciesKey)voidsetStatus(TaxonomicStatus status)voidsetSubgenus(String subgenus)voidsetSubgenusKey(Integer subgenusKey)voidsetUsageKey(Integer usageKey)StringtoString()
-
-
-
Constructor Detail
-
NameUsageMatch
public NameUsageMatch()
-
-
Method Detail
-
getConfidence
@Min(0L) @Max(100L) public @Min(0L) @Max(100L) Integer getConfidence()
The confidence that the lookup was correct. A value between 0 and 100 with higher values being better matches.- Returns:
- the lookup confidence
-
setConfidence
public void setConfidence(Integer confidence)
- Parameters:
confidence- the confidence to set
-
getMatchType
public NameUsageMatch.MatchType getMatchType()
- Returns:
- the type of match for this result
-
setMatchType
public void setMatchType(NameUsageMatch.MatchType matchType)
-
getScientificName
@Nullable public String getScientificName()
The scientific name of the matched name usage.- Returns:
- the scientific name of the matched usage
-
setScientificName
public void setScientificName(String scientificName)
-
getUsageKey
@Nullable public Integer getUsageKey()
The name usage key of the name usage that has been matched.- Returns:
- the usageKey
-
setUsageKey
public void setUsageKey(Integer usageKey)
- Parameters:
usageKey- the usageKey to set
-
getAcceptedUsageKey
@Nullable public Integer getAcceptedUsageKey()
The key of the accepted name usage in case the matched usage was a synonym.
-
setAcceptedUsageKey
public void setAcceptedUsageKey(Integer acceptedUsageKey)
-
isSynonym
public boolean isSynonym()
- Returns:
- true if it's a synonym
-
getStatus
public TaxonomicStatus getStatus()
The taxonomic status of the backbone usage. This field is required and only 3 values are allowed:- accepted: regular accepted taxon
- synonym: any kind of synonym
- doubtful: treated as accepted but in doubt for some reason
-
setStatus
public void setStatus(TaxonomicStatus status)
-
getKingdom
@Nullable public String getKingdom()
Description copied from interface:LinneanClassificationReturn the kingdom for this usage. If the usage is for something above the "kingdom" taxonomic level, return null.- Specified by:
getKingdomin interfaceLinneanClassification- Returns:
- the kingdom
-
setKingdom
public void setKingdom(String kingdom)
- Specified by:
setKingdomin interfaceLinneanClassification- Parameters:
kingdom- the kingdom to set
-
getPhylum
@Nullable public String getPhylum()
Description copied from interface:LinneanClassificationReturn the phylum for this usage. If the usage is for something above the "phylum" taxonomic level, return null.- Specified by:
getPhylumin interfaceLinneanClassification- Returns:
- the phylum
-
setPhylum
public void setPhylum(String phylum)
- Specified by:
setPhylumin interfaceLinneanClassification- Parameters:
phylum- the phylum to set
-
getClazz
@Nullable public String getClazz()
Description copied from interface:LinneanClassificationReturn the class for this usage. If the usage is for something above the "class" taxonomic level, return null.- Specified by:
getClazzin interfaceLinneanClassification- Returns:
- the class
-
setClazz
public void setClazz(String clazz)
- Specified by:
setClazzin interfaceLinneanClassification- Parameters:
clazz- the clazz to set
-
getOrder
@Nullable public String getOrder()
Description copied from interface:LinneanClassificationReturn the order for this usage. If the usage is for something above the "order" taxonomic level, return null.- Specified by:
getOrderin interfaceLinneanClassification- Returns:
- the order
-
setOrder
public void setOrder(String order)
- Specified by:
setOrderin interfaceLinneanClassification- Parameters:
order- the order to set
-
getFamily
@Nullable public String getFamily()
Description copied from interface:LinneanClassificationReturn the family for this usage. If the usage is for something above the "family" taxonomic level, return null.- Specified by:
getFamilyin interfaceLinneanClassification- Returns:
- the family
-
setFamily
public void setFamily(String family)
- Specified by:
setFamilyin interfaceLinneanClassification- Parameters:
family- the family to set
-
getGenus
@Nullable public String getGenus()
Description copied from interface:LinneanClassificationReturn the genus for this usage. If the usage is for something above the "genus" taxonomic level, return null.- Specified by:
getGenusin interfaceLinneanClassification- Returns:
- the genus
-
setGenus
public void setGenus(String genus)
- Specified by:
setGenusin interfaceLinneanClassification- Parameters:
genus- the genus to set
-
getSubgenus
@Nullable public String getSubgenus()
Description copied from interface:LinneanClassificationReturn the canonical subgenus name for this usage. If the usage is for something above the "subgenus" taxonomic level, return null.- Specified by:
getSubgenusin interfaceLinneanClassification- Returns:
- the subgenus name
-
setSubgenus
public void setSubgenus(String subgenus)
- Specified by:
setSubgenusin interfaceLinneanClassification- Parameters:
subgenus- the subgenus canonical name
-
getSpecies
@Nullable public String getSpecies()
Description copied from interface:LinneanClassificationReturn the species for this usage. If the usage is for something above the "species" taxonomic level, return null.- Specified by:
getSpeciesin interfaceLinneanClassification- Returns:
- the species
-
setSpecies
public void setSpecies(String species)
- Specified by:
setSpeciesin interfaceLinneanClassification- Parameters:
species- the species to set
-
getKingdomKey
@Nullable public Integer getKingdomKey()
Description copied from interface:LinneanClassificationKeysReturn the kingdom key for this usage. If the usage is for something above the "kingdom" taxonomic level, return null.- Specified by:
getKingdomKeyin interfaceLinneanClassificationKeys- Returns:
- the kingdomKey
-
setKingdomKey
public void setKingdomKey(Integer kingdomKey)
- Specified by:
setKingdomKeyin interfaceLinneanClassificationKeys- Parameters:
kingdomKey- the kingdomKey to set
-
getPhylumKey
@Nullable public Integer getPhylumKey()
Description copied from interface:LinneanClassificationKeysReturn the phylum key for this usage. If the usage is for something above the "phylum" taxonomic level, return null.- Specified by:
getPhylumKeyin interfaceLinneanClassificationKeys- Returns:
- the phylumKey
-
setPhylumKey
public void setPhylumKey(Integer phylumKey)
- Specified by:
setPhylumKeyin interfaceLinneanClassificationKeys- Parameters:
phylumKey- the phylumKey to set
-
getClassKey
@Nullable public Integer getClassKey()
Description copied from interface:LinneanClassificationKeysReturn the class key for this usage. If the usage is for something above the "class" taxonomic level, return null.- Specified by:
getClassKeyin interfaceLinneanClassificationKeys- Returns:
- the classKey
-
setClassKey
public void setClassKey(Integer classKey)
- Specified by:
setClassKeyin interfaceLinneanClassificationKeys- Parameters:
classKey- the classKey to set
-
getOrderKey
@Nullable public Integer getOrderKey()
Description copied from interface:LinneanClassificationKeysReturn the order key for this usage. If the usage is for something above the "order" taxonomic level, return null.- Specified by:
getOrderKeyin interfaceLinneanClassificationKeys- Returns:
- the orderKey
-
setOrderKey
public void setOrderKey(Integer orderKey)
- Specified by:
setOrderKeyin interfaceLinneanClassificationKeys- Parameters:
orderKey- the orderKey to set
-
getFamilyKey
@Nullable public Integer getFamilyKey()
Description copied from interface:LinneanClassificationKeysReturn the family key for this usage. If the usage is for something above the "family" taxonomic level, return null.- Specified by:
getFamilyKeyin interfaceLinneanClassificationKeys- Returns:
- the familyKey
-
setFamilyKey
public void setFamilyKey(Integer familyKey)
- Specified by:
setFamilyKeyin interfaceLinneanClassificationKeys- Parameters:
familyKey- the familyKey to set
-
getGenusKey
@Nullable public Integer getGenusKey()
Description copied from interface:LinneanClassificationKeysReturn the genus key for this usage. If the usage is for something above the "genus" taxonomic level, return null.- Specified by:
getGenusKeyin interfaceLinneanClassificationKeys- Returns:
- the genusKey
-
setGenusKey
public void setGenusKey(Integer genusKey)
- Specified by:
setGenusKeyin interfaceLinneanClassificationKeys- Parameters:
genusKey- the genusKey to set
-
getSubgenusKey
@Nullable public Integer getSubgenusKey()
Description copied from interface:LinneanClassificationKeysReturn the subgenus key for this usage. If the usage is for something above the "subgenus" taxonomic level, return null.- Specified by:
getSubgenusKeyin interfaceLinneanClassificationKeys- Returns:
- subgenusKey
-
setSubgenusKey
public void setSubgenusKey(Integer subgenusKey)
- Specified by:
setSubgenusKeyin interfaceLinneanClassificationKeys- Parameters:
subgenusKey- the subgenus usage key
-
getSpeciesKey
@Nullable public Integer getSpeciesKey()
Description copied from interface:LinneanClassificationKeysReturn the species key for this usage. If the usage is for something above the "species" taxonomic level, return null.- Specified by:
getSpeciesKeyin interfaceLinneanClassificationKeys- Returns:
- the speciesKey
-
setSpeciesKey
public void setSpeciesKey(Integer speciesKey)
- Specified by:
setSpeciesKeyin interfaceLinneanClassificationKeys- Parameters:
speciesKey- the speciesKey to set
-
getHigherRank
@Nullable public String getHigherRank(Rank rank)
Description copied from interface:LinneanClassificationGets a higher taxon property by passing the rank of it. Only Linnean ranks are supported.- Specified by:
getHigherRankin 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:LinneanClassificationKeysGets a higher taxon key by passing the rank of it. Only Linnean ranks are supported.- Specified by:
getHigherRankKeyin interfaceLinneanClassificationKeys- Parameters:
rank- the higher linnean rank to retrieve- Returns:
- the key of the higher taxon or null if rank doesnt exist
-
getCanonicalName
@Nullable public String getCanonicalName()
-
setCanonicalName
public void setCanonicalName(String canonicalName)
-
getAlternatives
@Nullable public List<NameUsageMatch> getAlternatives()
- Returns:
- a list of alternative matches considered
-
setAlternatives
public void setAlternatives(List<NameUsageMatch> alternatives)
-
-