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
public class NameUsageContainer extends NameUsage
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
Constructors Constructor Description NameUsageContainer()
Default constructor.NameUsageContainer(NameUsage usage)
Constructs a NameUsageContainer from an existing NameUsage instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
@NotNull List<NameUsage>
getCombinations()
@NotNull List<Description>
getDescriptions()
@NotNull List<Distribution>
getDistributions()
@NotNull Set<String>
getHabitats()
Convenience method that analyzes all species profile records and returns the distinct list of known habitats.@NotNull List<Identifier>
getIdentifierByType(IdentifierType type)
@NotNull List<Identifier>
getIdentifiers()
@NotNull Set<String>
getLivingPeriods()
Convenience method that analyzes all species profile records and returns the distinct list of known living periods.List<NameUsageMediaObject>
getMedia()
@NotNull List<Reference>
getReferenceList()
@NotNull List<SpeciesProfile>
getSpeciesProfiles()
List<NameUsage>
getSynonyms()
@NotNull Set<ThreatStatus>
getThreatStatus()
Convenience method that analyzes all distribution records and returns the distinct list of known threat status.@NotNull List<TypeSpecimen>
getTypeSpecimens()
@NotNull List<VernacularName>
getVernacularNames()
int
hashCode()
Boolean
isExtinct()
Convenience method that analyzes all species profile records for extinct.Boolean
isFreshwater()
Convenience method that analyzes all species profile records for freshwater habitat flags.Boolean
isMarine()
Convenience method that analyzes all species profile records for marine habitat flags.Boolean
isTerrestrial()
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)
String
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 Detail
-
NameUsageContainer
public NameUsageContainer()
Default constructor.
-
NameUsageContainer
public NameUsageContainer(NameUsage usage)
Constructs a NameUsageContainer from an existing NameUsage instance.
-
-
Method Detail
-
getDescriptions
@NotNull public @NotNull List<Description> getDescriptions()
- Returns:
- the list of Description
-
setDescriptions
public void setDescriptions(List<Description> descriptions)
- Parameters:
descriptions
- the list of Description
-
getDistributions
@NotNull public @NotNull List<Distribution> getDistributions()
- Returns:
- the list of Distribution
-
setDistributions
public void setDistributions(List<Distribution> distributions)
- Parameters:
distributions
- the Distribution list to set
-
getHabitats
@NotNull public @NotNull Set<String> getHabitats()
Convenience method that analyzes all species profile records and returns the distinct list of known habitats.- Returns:
- list of unique habitats
-
getMedia
public List<NameUsageMediaObject> getMedia()
-
setMedia
public void setMedia(List<NameUsageMediaObject> media)
-
getIdentifiers
@NotNull public @NotNull List<Identifier> getIdentifiers()
- Returns:
- the list of all Identifier
-
setIdentifiers
public void setIdentifiers(List<Identifier> identifiers)
- Parameters:
identifiers
- the Identifier list to set
-
getIdentifierByType
@NotNull public @NotNull List<Identifier> getIdentifierByType(IdentifierType type)
- Returns:
- the list of all URL Identifier
-
getReferenceList
@NotNull public @NotNull List<Reference> getReferenceList()
- Returns:
- the list of Reference
-
setReferenceList
public void setReferenceList(List<Reference> referenceList)
- Parameters:
referenceList
- the Reference list to set
-
getSpeciesProfiles
@NotNull public @NotNull List<SpeciesProfile> getSpeciesProfiles()
- Returns:
- the list of SpeciesProfile
-
setSpeciesProfiles
public void setSpeciesProfiles(List<SpeciesProfile> speciesProfiles)
- Parameters:
speciesProfiles
- the SpeciesProfile list to set
-
getSynonyms
public List<NameUsage> getSynonyms()
- Returns:
- the list of synonyms
-
setSynonyms
public void setSynonyms(List<NameUsage> synonyms)
- Parameters:
synonyms
- list of synonyms
-
getCombinations
@NotNull public @NotNull List<NameUsage> getCombinations()
- Returns:
- the list of combinations known for the basionym
-
setCombinations
public void setCombinations(List<NameUsage> combinations)
-
getTypeSpecimens
@NotNull public @NotNull List<TypeSpecimen> getTypeSpecimens()
- Returns:
- the list of TypeSpecimen
-
setTypeSpecimens
public void setTypeSpecimens(List<TypeSpecimen> typeSpecimens)
- Parameters:
typeSpecimens
- the TypeSpecimen list to set
-
getVernacularNames
@NotNull public @NotNull List<VernacularName> getVernacularNames()
- Returns:
- the list of VernacularName
-
setVernacularNames
public void setVernacularNames(List<VernacularName> vernacularNames)
- Parameters:
vernacularNames
- the VernacularName list to set
-
getLivingPeriods
@NotNull public @NotNull Set<String> 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
@NotNull public @NotNull Set<ThreatStatus> getThreatStatus()
Convenience method that analyzes all distribution records and returns the distinct list of known threat status.- Returns:
- list of unique threat status
-
isExtinct
public Boolean 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
public Boolean isFreshwater()
Convenience method that analyzes all species profile records for freshwater habitat flags.- Returns:
- true if freshwater
-
isMarine
public Boolean isMarine()
Convenience method that analyzes all species profile records for marine habitat flags.- Returns:
- true if marine
-
isTerrestrial
public Boolean isTerrestrial()
Convenience method that analyzes all species profile records for terrestrial habitat flags.- Returns:
- true if terrestrial
-
-