Package org.gbif.api.model.checklistbank
Class NameUsageContainer
java.lang.Object
org.gbif.api.model.checklistbank.NameUsage
org.gbif.api.model.checklistbank.NameUsageContainer
- All Implemented Interfaces:
LinneanClassification
,LinneanClassificationKeys
An extension to a NameUsage adding all further properties that are not eagerly loaded.
Use this class to store the various subresources as you need them side by side with the NameUsage.
Note that properties are not automatically/lazy loaded in any way.
This is just a simple container class with a few convenience methods which needs to be populated manually via its
setters or the constructor.
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.NameUsageContainer
(NameUsage usage) Constructs a NameUsageContainer from an existing NameUsage instance. -
Method Summary
Modifier and TypeMethodDescriptionboolean
@NotNull List<Description>
@NotNull List<Distribution>
Convenience method that analyzes all species profile records and returns the distinct list of known habitats.@NotNull List<Identifier>
@NotNull List<Identifier>
Convenience method that analyzes all species profile records and returns the distinct list of known living periods.getMedia()
@NotNull List<SpeciesProfile>
@NotNull Set<ThreatStatus>
Convenience method that analyzes all distribution records and returns the distinct list of known threat status.@NotNull List<TypeSpecimen>
@NotNull List<VernacularName>
int
hashCode()
Convenience method that analyzes all species profile records for extinct.Convenience method that analyzes all species profile records for freshwater habitat flags.isMarine()
Convenience method that analyzes all species profile records for marine habitat flags.Convenience method that analyzes all species profile records for terrestrial habitat flags.void
setCombinations
(List<NameUsage> combinations) void
setDescriptions
(List<Description> descriptions) void
setDistributions
(List<Distribution> distributions) void
setIdentifiers
(List<Identifier> identifiers) void
setMedia
(List<NameUsageMediaObject> media) void
setReferenceList
(List<Reference> referenceList) void
setSpeciesProfiles
(List<SpeciesProfile> speciesProfiles) void
setSynonyms
(List<NameUsage> synonyms) void
setTypeSpecimens
(List<TypeSpecimen> typeSpecimens) void
setVernacularNames
(List<VernacularName> vernacularNames) toString()
Methods inherited from class org.gbif.api.model.checklistbank.NameUsage
addIssue, getAccepted, getAcceptedKey, getAccordingTo, getAuthorship, getBasionym, getBasionymKey, getCanonicalName, getCanonicalOrScientificName, getClassKey, getClazz, getConstituentKey, getDatasetKey, getDeleted, getFamily, getFamilyKey, getGenus, getGenusKey, getHigherClassificationMap, getHigherRank, getHigherRankKey, getIssues, getKey, getKingdom, getKingdomKey, getLastCrawled, getLastInterpreted, getModified, getNameKey, getNameType, getNomenclaturalStatus, getNubKey, getNumDescendants, getOrder, getOrderKey, getOrigin, getParent, getParentKey, getPhylum, getPhylumKey, getProParteKey, getPublishedIn, getRank, getReferences, getRemarks, getScientificName, getSourceTaxonKey, getSpecies, getSpeciesKey, getSubgenus, getSubgenusKey, getTaxonID, getTaxonomicStatus, getVernacularName, isNub, isProParte, isSynonym, setAccepted, setAcceptedKey, setAccordingTo, setAuthorship, setBasionym, setBasionymKey, setCanonicalName, setClassKey, setClazz, setConstituentKey, setDatasetKey, setDeleted, setFamily, setFamilyKey, setGenus, setGenusKey, setIssues, setKey, setKingdom, setKingdomKey, setLastCrawled, setLastInterpreted, setModified, setNameKey, setNameType, setNomenclaturalStatus, setNubKey, setNumDescendants, setOrder, setOrderKey, setOrigin, setParent, setParentKey, setPhylum, setPhylumKey, setProParteKey, setPublishedIn, setRank, setReferences, setRemarks, setScientificName, setSourceTaxonKey, setSpecies, setSpeciesKey, setSubgenus, setSubgenusKey, setTaxonID, setTaxonomicStatus, setVernacularName
-
Constructor Details
-
NameUsageContainer
public NameUsageContainer()Default constructor. -
NameUsageContainer
Constructs a NameUsageContainer from an existing NameUsage instance.
-
-
Method Details
-
getDescriptions
- Returns:
- the list of Description
-
setDescriptions
- Parameters:
descriptions
- the list of Description
-
getDistributions
- Returns:
- the list of Distribution
-
setDistributions
- Parameters:
distributions
- the Distribution list to set
-
getHabitats
Convenience method that analyzes all species profile records and returns the distinct list of known habitats.- Returns:
- list of unique habitats
-
getMedia
-
setMedia
-
getIdentifiers
- Returns:
- the list of all Identifier
-
setIdentifiers
- Parameters:
identifiers
- the Identifier list to set
-
getIdentifierByType
- Returns:
- the list of all URL Identifier
-
getReferenceList
- Returns:
- the list of Reference
-
setReferenceList
- Parameters:
referenceList
- the Reference list to set
-
getSpeciesProfiles
- Returns:
- the list of SpeciesProfile
-
setSpeciesProfiles
- Parameters:
speciesProfiles
- the SpeciesProfile list to set
-
getSynonyms
- Returns:
- the list of synonyms
-
setSynonyms
- Parameters:
synonyms
- list of synonyms
-
getCombinations
- Returns:
- the list of combinations known for the basionym
-
setCombinations
-
getTypeSpecimens
- Returns:
- the list of TypeSpecimen
-
setTypeSpecimens
- Parameters:
typeSpecimens
- the TypeSpecimen list to set
-
getVernacularNames
- Returns:
- the list of VernacularName
-
setVernacularNames
- Parameters:
vernacularNames
- the VernacularName list to set
-
getLivingPeriods
Convenience method that analyzes all species profile records and returns the distinct list of known living periods.- Returns:
- list of unique living periods
-
getThreatStatus
Convenience method that analyzes all distribution records and returns the distinct list of known threat status.- Returns:
- list of unique threat status
-
isExtinct
Convenience method that analyzes all species profile records for extinct. If several records contradict use the majority or if numbers are equal true.- Returns:
- true if extinct
-
isFreshwater
Convenience method that analyzes all species profile records for freshwater habitat flags.- Returns:
- true if freshwater
-
isMarine
Convenience method that analyzes all species profile records for marine habitat flags.- Returns:
- true if marine
-
isTerrestrial
Convenience method that analyzes all species profile records for terrestrial habitat flags.- Returns:
- true if terrestrial
-
equals
-
hashCode
-
toString
-