Package org.gbif.api.model.checklistbank
Class NameUsageMetrics
- java.lang.Object
-
- org.gbif.api.model.checklistbank.NameUsageMetrics
-
public class NameUsageMetrics extends Object
Basic metrics for a single name usage. These metrics have been embedded in the NameUsage class before but are rarely being used. They are therefore split out into a separate class to be retrieved only when needed.
-
-
Constructor Summary
Constructors Constructor Description NameUsageMetrics()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)@NotNull IntegergetKey()Return the key that uniquely identifies this name usage.IntegergetNumByRank(Rank rank)Gets the count of usages by a rank.@javax.validation.constraints.Min(0L) intgetNumChildren()Returns the number of direct taxonomic elements under this usage.@javax.validation.constraints.Min(0L) intgetNumClass()Returns the number of classes that are below this taxon.intgetNumDescendants()The number of all accepted taxonomic elements under this usage.@javax.validation.constraints.Min(0L) intgetNumFamily()Returns the number of families that are below this taxon.@javax.validation.constraints.Min(0L) intgetNumGenus()Returns the number of genus that are below this taxon.@javax.validation.constraints.Min(0L) intgetNumOrder()Returns the number of orders that are below this taxon.@javax.validation.constraints.Min(0L) intgetNumPhylum()Returns the number of phyla that are below this taxon.@javax.validation.constraints.Min(0L) intgetNumSpecies()Returns the number of species that are below this taxon.@javax.validation.constraints.Min(0L) intgetNumSubgenus()Returns the number of distinct subgenera that are below this taxon.@javax.validation.constraints.Min(0L) intgetNumSynonyms()Returns the number of related synonyms this usage possses.inthashCode()voidsetKey(Integer key)voidsetNumChildren(int numChildren)voidsetNumClass(int numClass)voidsetNumDescendants(int numDescendants)voidsetNumFamily(int numFamily)voidsetNumGenus(int numGenus)voidsetNumOrder(int numOrder)voidsetNumPhylum(int numPhylum)voidsetNumSpecies(int numSpecies)voidsetNumSubgenus(int numSubgenus)voidsetNumSynonyms(int numSynonyms)StringtoString()
-
-
-
Constructor Detail
-
NameUsageMetrics
public NameUsageMetrics()
-
-
Method Detail
-
getKey
@NotNull public @NotNull Integer getKey()
Return the key that uniquely identifies this name usage.- Returns:
- the key
-
getNumChildren
@Min(0L) public @javax.validation.constraints.Min(0L) int getNumChildren()
Returns the number of direct taxonomic elements under this usage. "Direct" means that children should have this usageKey as their parentKey.- Returns:
- the numChildren
-
setNumChildren
public void setNumChildren(int numChildren)
- Parameters:
numChildren- the numChildren to set
-
getNumClass
@Min(0L) public @javax.validation.constraints.Min(0L) int getNumClass()
Returns the number of classes that are below this taxon. Typically, this would mean this usage is of something above the "class" taxonomic level.- Returns:
- the numClass
-
setNumClass
public void setNumClass(int numClass)
- Parameters:
numClass- the numClass to set
-
getNumDescendants
public int getNumDescendants()
The number of all accepted taxonomic elements under this usage.- Returns:
- the number of descendants
-
setNumDescendants
public void setNumDescendants(int numDescendants)
- Parameters:
numDescendants- the n umber of descendants to set
-
getNumFamily
@Min(0L) public @javax.validation.constraints.Min(0L) int getNumFamily()
Returns the number of families that are below this taxon. Typically, this would mean this usage is of something above the "family" taxonomic level.- Returns:
- the numFamily
-
setNumFamily
public void setNumFamily(int numFamily)
- Parameters:
numFamily- the numFamily to set
-
getNumGenus
@Min(0L) public @javax.validation.constraints.Min(0L) int getNumGenus()
Returns the number of genus that are below this taxon. Typically, this would mean this usage is of something above the "genus" taxonomic level.- Returns:
- the numGenus
-
setNumGenus
public void setNumGenus(int numGenus)
- Parameters:
numGenus- the numGenus to set
-
getNumOrder
@Min(0L) public @javax.validation.constraints.Min(0L) int getNumOrder()
Returns the number of orders that are below this taxon. Typically, this would mean this usage is of something above the "order" taxonomic level.- Returns:
- the numOrder
-
setNumOrder
public void setNumOrder(int numOrder)
- Parameters:
numOrder- the numOrder to set
-
getNumPhylum
@Min(0L) public @javax.validation.constraints.Min(0L) int getNumPhylum()
Returns the number of phyla that are below this taxon. Typically, this would mean this usage is of something above the "phylum" taxonomic level.- Returns:
- the numPhylum
-
setNumPhylum
public void setNumPhylum(int numPhylum)
- Parameters:
numPhylum- the numPhylum to set
-
getNumSpecies
@Min(0L) public @javax.validation.constraints.Min(0L) int getNumSpecies()
Returns the number of species that are below this taxon. Typically, this would mean this usage is of something above the "species" taxonomic level.- Returns:
- the numSpecies.
-
setNumSpecies
public void setNumSpecies(int numSpecies)
- Parameters:
numSpecies- the numSpecies to set
-
getNumSubgenus
@Min(0L) public @javax.validation.constraints.Min(0L) int getNumSubgenus()
Returns the number of distinct subgenera that are below this taxon. Typically, this would mean this usage is of something above the "subgenus" taxonomic level.- Returns:
- the numSubgenus
-
setNumSubgenus
public void setNumSubgenus(int numSubgenus)
- Parameters:
numSubgenus- the number of distinct subgenera
-
getNumSynonyms
@Min(0L) public @javax.validation.constraints.Min(0L) int getNumSynonyms()
Returns the number of related synonyms this usage possses.- Returns:
- the numSynonyms.
-
setNumSynonyms
public void setNumSynonyms(int numSynonyms)
- Parameters:
numSynonyms- the numSynonyms to set
-
getNumByRank
@Nullable public Integer getNumByRank(Rank rank)
Gets the count of usages by a rank. Only Linnean ranks are supported.- Parameters:
rank- the linnean rank to retrieve counts for- Returns:
- the count or null if rank doesn't exist
-
-