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
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    @NotNull Integer
    Return the key that uniquely identifies this name usage.
    Gets the count of usages by a rank.
    @javax.validation.constraints.Min(0L) int
    Returns the number of direct taxonomic elements under this usage.
    @javax.validation.constraints.Min(0L) int
    Returns the number of classes that are below this taxon.
    int
    The number of all accepted taxonomic elements under this usage.
    @javax.validation.constraints.Min(0L) int
    Returns the number of families that are below this taxon.
    @javax.validation.constraints.Min(0L) int
    Returns the number of genus that are below this taxon.
    @javax.validation.constraints.Min(0L) int
    Returns the number of orders that are below this taxon.
    @javax.validation.constraints.Min(0L) int
    Returns the number of phyla that are below this taxon.
    @javax.validation.constraints.Min(0L) int
    Returns the number of species that are below this taxon.
    @javax.validation.constraints.Min(0L) int
    Returns the number of distinct subgenera that are below this taxon.
    @javax.validation.constraints.Min(0L) int
    Returns the number of related synonyms this usage possses.
    int
     
    void
     
    void
    setNumChildren(int numChildren)
     
    void
    setNumClass(int numClass)
     
    void
    setNumDescendants(int numDescendants)
     
    void
    setNumFamily(int numFamily)
     
    void
    setNumGenus(int numGenus)
     
    void
    setNumOrder(int numOrder)
     
    void
    setNumPhylum(int numPhylum)
     
    void
    setNumSpecies(int numSpecies)
     
    void
    setNumSubgenus(int numSubgenus)
     
    void
    setNumSynonyms(int numSynonyms)
     
     

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

  • Method Details

    • getKey

      @NotNull public @NotNull Integer getKey()
      Return the key that uniquely identifies this name usage.
      Returns:
      the key
    • setKey

      public void setKey(Integer key)
      Parameters:
      key - the key to set
    • 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
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object