Package org.gbif.api.model.checklistbank
Class DatasetMetrics
- java.lang.Object
-
- org.gbif.api.model.checklistbank.DatasetMetrics
-
public class DatasetMetrics extends Object
Simple metrics about a single, processed checklist dataset in time. The created timestamp with the dataset key should be unique and can be used to create graphs over time.
-
-
Constructor Summary
Constructors Constructor Description DatasetMetrics()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
@javax.validation.constraints.Max(100L),@javax.validation.constraints.Min(0L) int
getColCoveragePct()
@javax.validation.constraints.Min(0L) int
getColMatchingCount()
@NotNull Map<UUID,Integer>
getCountByConstituent()
@NotNull Map<NameUsageIssue,Integer>
getCountByIssue()
@javax.validation.constraints.Min(0L) int
getCountByIssue(NameUsageIssue issue)
Get the metrics by name usage issue.@NotNull Map<Kingdom,Integer>
getCountByKingdom()
@javax.validation.constraints.Min(0L) int
getCountByKingdom(Kingdom kingdom)
For an occurrence dataset get the number of records that are interpreted to belong to a certain nub kingdom.@NotNull Map<Origin,Integer>
getCountByOrigin()
@javax.validation.constraints.Min(0L) int
getCountByOrigin(Origin origin)
Get the metrics by name usage origin.@NotNull Map<Rank,Integer>
getCountByRank()
@javax.validation.constraints.Min(0L) int
getCountByRank(Rank rank)
Get the metrics by taxonomic rank, i.e.@NotNull Map<Extension,Integer>
getCountExtRecordsByExtension()
@NotNull Map<Language,Integer>
getCountNamesByLanguage()
@javax.validation.constraints.Min(0L) int
getCountNamesByLanguage(Language language)
Number of vernacular names in this checklist dataset by language.@NotNull @Past Date
getCreated()
@NotNull UUID
getDatasetKey()
@javax.validation.constraints.Min(0L) int
getDistinctNamesCount()
@NotNull @Past Date
getDownloaded()
@javax.validation.constraints.Min(0L) int
getExtensionRecordCount(Extension extension)
Number of extension records found in the dataset.int
getKey()
@javax.validation.constraints.Max(100L),@javax.validation.constraints.Min(0L) int
getNubCoveragePct()
@javax.validation.constraints.Min(0L) int
getNubMatchingCount()
Map<String,Integer>
getOtherCount()
@javax.validation.constraints.Min(0L) int
getOtherCount(String key)
Get the metrics for other dynamic counts.@javax.validation.constraints.Min(0L) int
getSynonymsCount()
@javax.validation.constraints.Min(0L) int
getUsagesCount()
int
hashCode()
void
setColCoveragePct(int colCoveragePct)
void
setColMatchingCount(int colMatchingCount)
void
setCountByConstituent(Map<UUID,Integer> countByConstituent)
void
setCountByIssue(Map<NameUsageIssue,Integer> countByIssue)
void
setCountByKingdom(Map<Kingdom,Integer> countByKingdom)
void
setCountByOrigin(Map<Origin,Integer> countByOrigin)
void
setCountByRank(Map<Rank,Integer> countByRank)
void
setCountExtRecordsByExtension(Map<Extension,Integer> countExtRecordsByExtension)
void
setCountNamesByLanguage(Map<Language,Integer> countNamesByLanguage)
void
setCreated(Date created)
void
setDatasetKey(UUID datasetKey)
void
setDistinctNamesCount(int distinctNamesCount)
void
setDownloaded(Date downloaded)
void
setKey(int key)
void
setNubCoveragePct(int nubCoveragePct)
void
setNubMatchingCount(int nubMatchingCount)
void
setOtherCount(Map<String,Integer> otherCount)
void
setSynonymsCount(int synonymsCount)
void
setUsagesCount(int usagesCount)
String
toString()
-
-
-
Constructor Detail
-
DatasetMetrics
public DatasetMetrics()
-
-
Method Detail
-
getKey
public int getKey()
-
setKey
public void setKey(int key)
-
getColCoveragePct
@Max(100L) @Min(0L) public @javax.validation.constraints.Max(100L),@javax.validation.constraints.Min(0L) int getColCoveragePct()
- Returns:
- percentage of distinct names that match a name in the Catalogue of Life
-
setColCoveragePct
public void setColCoveragePct(int colCoveragePct)
-
getCountByConstituent
@NotNull public @NotNull Map<UUID,Integer> getCountByConstituent()
-
setCountByConstituent
public void setCountByConstituent(Map<UUID,Integer> countByConstituent)
-
getCountByKingdom
@NotNull public @NotNull Map<Kingdom,Integer> getCountByKingdom()
-
setCountByKingdom
public void setCountByKingdom(Map<Kingdom,Integer> countByKingdom)
-
getCountByRank
@NotNull public @NotNull Map<Rank,Integer> getCountByRank()
-
setCountByRank
public void setCountByRank(Map<Rank,Integer> countByRank)
-
getDistinctNamesCount
@Min(0L) public @javax.validation.constraints.Min(0L) int getDistinctNamesCount()
- Returns:
- the number of distinct canonical name strings
-
setDistinctNamesCount
public void setDistinctNamesCount(int distinctNamesCount)
-
getCountExtRecordsByExtension
@NotNull public @NotNull Map<Extension,Integer> getCountExtRecordsByExtension()
-
setCountExtRecordsByExtension
public void setCountExtRecordsByExtension(Map<Extension,Integer> countExtRecordsByExtension)
-
getColMatchingCount
@Min(0L) public @javax.validation.constraints.Min(0L) int getColMatchingCount()
- Returns:
- number of records matching a name in the Catalogue of Life
-
setColMatchingCount
public void setColMatchingCount(int colMatchingCount)
-
getNubMatchingCount
@Min(0L) public @javax.validation.constraints.Min(0L) int getNubMatchingCount()
- Returns:
- number of records matching a name in the GBIF backbone taxonomy
-
setNubMatchingCount
public void setNubMatchingCount(int nubMatchingCount)
-
getCountNamesByLanguage
@NotNull public @NotNull Map<Language,Integer> getCountNamesByLanguage()
-
setCountNamesByLanguage
public void setCountNamesByLanguage(Map<Language,Integer> countNamesByLanguage)
-
getSynonymsCount
@Min(0L) public @javax.validation.constraints.Min(0L) int getSynonymsCount()
- Returns:
- number of records with a taxonomic status of a synonym. For occurrence records the nub taxonomy status is used
-
setSynonymsCount
public void setSynonymsCount(int synonymsCount)
-
getUsagesCount
@Min(0L) public @javax.validation.constraints.Min(0L) int getUsagesCount()
- Returns:
- total number of name usage records in checklistbank
-
setUsagesCount
public void setUsagesCount(int usagesCount)
-
getCountByOrigin
@NotNull public @NotNull Map<Origin,Integer> getCountByOrigin()
- Returns:
- map of total name usage counts by their origin
-
setCountByOrigin
public void setCountByOrigin(Map<Origin,Integer> countByOrigin)
-
getCountByIssue
@NotNull public @NotNull Map<NameUsageIssue,Integer> getCountByIssue()
- Returns:
- map of total name usage counts by their interpretation issue
-
setCountByIssue
public void setCountByIssue(Map<NameUsageIssue,Integer> countByIssue)
-
getCreated
@NotNull @Past public @NotNull @Past Date getCreated()
- Returns:
- date this metric was generated. Roughly equivalent with date of indexing
-
setCreated
public void setCreated(Date created)
-
getDownloaded
@NotNull @Past public @NotNull @Past Date getDownloaded()
- Returns:
- date new dataset data was downloaded/harvested last time
-
setDownloaded
public void setDownloaded(Date downloaded)
-
getDatasetKey
@NotNull public @NotNull UUID getDatasetKey()
-
setDatasetKey
public void setDatasetKey(UUID datasetKey)
-
getNubCoveragePct
@Max(100L) @Min(0L) public @javax.validation.constraints.Max(100L),@javax.validation.constraints.Min(0L) int getNubCoveragePct()
- Returns:
- percentage of distinct names that match a name in the GBIF backbone taxonomy
-
setNubCoveragePct
public void setNubCoveragePct(int nubCoveragePct)
-
getCountByKingdom
@Min(0L) public @javax.validation.constraints.Min(0L) int getCountByKingdom(Kingdom kingdom)
For an occurrence dataset get the number of records that are interpreted to belong to a certain nub kingdom. For checklists the number of usages belonging to a certain nub kingdom. Note this is not the kingdom as explicitly given by the checklist, but the nub kingdom after matching the usages to the nub.- Parameters:
kingdom
- to get metrics for- Returns:
- the number of records found in the respective kingdom
-
getCountByRank
@Min(0L) public @javax.validation.constraints.Min(0L) int getCountByRank(Rank rank)
Get the metrics by taxonomic rank, i.e. the lowest rank to which an occurrence record was identified or the rank of the name usage in a checklist.- Parameters:
rank
- to get metrics for. Mayor Linnéan ranks only down to species plus INFRASPECIFIC_NAME.- Returns:
- the number of records for the given taxonomic rank.
-
getCountByOrigin
@Min(0L) public @javax.validation.constraints.Min(0L) int getCountByOrigin(Origin origin)
Get the metrics by name usage origin.
-
getCountByIssue
@Min(0L) public @javax.validation.constraints.Min(0L) int getCountByIssue(NameUsageIssue issue)
Get the metrics by name usage issue.
-
getOtherCount
@Min(0L) public @javax.validation.constraints.Min(0L) int getOtherCount(String key)
Get the metrics for other dynamic counts.
-
getCountNamesByLanguage
@Min(0L) public @javax.validation.constraints.Min(0L) int getCountNamesByLanguage(Language language)
Number of vernacular names in this checklist dataset by language. For occurrence datasets always 0.- Parameters:
language
- of common names- Returns:
- the number of records found for the extension
-
getExtensionRecordCount
@Min(0L) public @javax.validation.constraints.Min(0L) int getExtensionRecordCount(Extension extension)
Number of extension records found in the dataset.- Returns:
- the number of records found for the extension
-
getOtherCount
public Map<String,Integer> getOtherCount()
-
setOtherCount
public void setOtherCount(Map<String,Integer> otherCount)
-
-