Package org.gbif.api.model.registry
Class Dataset
java.lang.Object
org.gbif.api.model.registry.Dataset
- All Implemented Interfaces:
Serializable,Commentable,Contactable,Endpointable,Identifiable,LenientEquals<Dataset>,MachineTaggable,NetworkEntity,Taggable
public class Dataset
extends Object
implements NetworkEntity, Contactable, Endpointable, MachineTaggable, Taggable, Identifiable, Commentable, LenientEquals<Dataset>
A GBIF dataset which provides occurrence data, checklist data, sampling event data or metadata.
This Dataset class is covering all the GBIF metadata profile v1.3, but only a few properties are kept in the
database table:
- key
- parentDatasetKey
- duplicateOfDatasetKey
- version
- installationKey
- publishingOrganizationKey
- publishingOrganizationName
- networkKeys
- license
- maintenanceUpdateFrequency
- external
- numConstituents
- type
- subtype
- title
- alias
- abbreviation
- description
- language
- homepage
- logoUrl
- citation
- rights
- lockedForAutoUpdate
- createdBy
- modifiedBy
- created
- modified
- deleted
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classMetadata of dataset that has been published as a Darwin Core Archive (DwC-A). -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddEndpoint(Endpoint endpoint) voidaddMachineTag(MachineTag machineTag) boolean@Size(min=1,max=50) StringTODO: Document what this is TODO: are both alias & abbreviation needed?@Size(min=2,max=50) StringgetAlias()TODO: Document what this is@Valid CitationThe exact form of how to cite this dataset.A generated list of contacts used in the citation text when it is generated by the GBIF API.getDoi()If a dataset is registered with GBIF through more than one place we'll mark all but one as a duplicate by pointing it to the canonical dataset.@Valid Dataset.DwcAgetDwca()@NotNull UUIDgetKey()@NotNull LanguagePersisted in the database table.A description of the maintenance frequency of this resource.Persisted in the database table.Networks in which this dataset is a constituent.@javax.validation.constraints.Min(0L) int@NotNull UUID@Size(min=1) StringAny kind of (copy)rights/IPR statements that apply to the datasets data.getTags()getTitle()@NotNull DatasetTypegetType()inthashCode()booleanbooleanbooleanlenientEquals(Dataset other) Only checks the persisted properties, excluding the server controlled fields (key, created, license etc).voidsetAbbreviation(String abbreviation) Persisted in the database table.voidsetAcknowledgements(String acknowledgements) voidsetAdditionalInfo(String additionalInfo) voidPersisted in the database table.voidsetBibliographicCitations(List<Citation> bibliographicCitations) voidsetCategory(Set<String> category) voidsetCitation(Citation citation) Persisted in the database table.voidsetCollections(List<Collection> collections) voidsetComments(List<Comment> comments) voidsetContacts(List<Contact> contacts) voidsetContactsCitation(List<CitationContact> contactsCitation) voidsetCountryCoverage(Set<Country> countryCoverage) voidsetCreated(Date created) Autoassigned in the database table, ignored when persisted.voidsetCreatedBy(String createdBy) Persisted in the database table.voidsetCuratorialUnits(List<CuratorialUnitComposite> curatorialUnits) voidsetDataDescriptions(List<DataDescription> dataDescriptions) voidsetDataLanguage(Language dataLanguage) voidsetDeleted(Date deleted) Persisted in the database table.voidsetDescription(String description) Persisted in the database table.voidvoidsetDuplicateOfDatasetKey(UUID duplicateOfDatasetKey) Persisted in the database table.voidsetDwca(Dataset.DwcA dwca) voidsetEndpoints(List<Endpoint> endpoints) voidsetExternal(boolean external) Persisted in the database table.voidsetGeographicCoverageDescription(String geographicCoverageDescription) voidsetGeographicCoverages(List<GeospatialCoverage> geographicCoverages) voidsetGettingStarted(String gettingStarted) voidsetHomepage(URI homepage) Persisted in the database table.voidsetIdentifiers(List<Identifier> identifiers) voidsetInstallationKey(UUID installationKey) Persisted in the database table.voidsetIntroduction(String introduction) voidPersisted in the database table.voidsetKeywordCollections(List<KeywordCollection> keywordCollections) voidsetLanguage(Language language) Persisted in the database table.voidsetLicense(License license) Persisted in the database table.voidsetLockedForAutoUpdate(boolean lockedForAutoUpdate) Persisted in the database table.voidsetLogoUrl(URI logoUrl) Persisted in the database table.voidsetMachineTags(List<MachineTag> machineTags) voidsetMaintenanceDescription(String maintenanceDescription) voidsetMaintenanceUpdateFrequency(MaintenanceUpdateFrequency maintenanceUpdateFrequency) Persisted in the database table.voidsetModified(Date modified) Persisted in the database table.voidsetModifiedBy(String modifiedBy) Persisted in the database table.voidsetNetworkKeys(List<UUID> networkKeys) voidsetNumConstituents(int numConstituents) Not persisted in the database table, but calculated on the fly.voidsetParentDatasetKey(UUID parentDatasetKey) Persisted in the database table.voidsetProject(Project project) voidsetPubDate(Date pubDate) voidsetPublishingOrganizationKey(UUID publishingOrganizationKey) Persisted in the database table.voidsetPublishingOrganizationName(String publishingOrganizationName) voidsetPurpose(String purpose) voidPersisted in the database table.voidsetSamplingDescription(SamplingDescription samplingDescription) voidsetShortName(String shortName) voidsetSubtype(DatasetSubtype subtype) Persisted in the database table.voidvoidsetTaxonomicCoverages(List<TaxonomicCoverages> taxonomicCoverages) voidsetTemporalCoverages(List<TemporalCoverage> temporalCoverages) voidPersisted in the database table.voidsetType(DatasetType type) Persisted in the database table.voidsetVersion(String version) toString()
-
Constructor Details
-
Dataset
public Dataset()
-
-
Method Details
-
getKey
- Specified by:
getKeyin interfaceNetworkEntity
-
setKey
Persisted in the database table.- Specified by:
setKeyin interfaceNetworkEntity
-
getVersion
-
setVersion
-
getTitle
- Specified by:
getTitlein interfaceNetworkEntity
-
setTitle
Persisted in the database table.- Specified by:
setTitlein interfaceNetworkEntity
-
getDescription
- Specified by:
getDescriptionin interfaceNetworkEntity
-
setDescription
Persisted in the database table.- Specified by:
setDescriptionin interfaceNetworkEntity
-
getCreated
- Specified by:
getCreatedin interfaceNetworkEntity
-
setCreated
Autoassigned in the database table, ignored when persisted.- Specified by:
setCreatedin interfaceNetworkEntity
-
getModified
- Specified by:
getModifiedin interfaceNetworkEntity
-
setModified
Persisted in the database table.- Specified by:
setModifiedin interfaceNetworkEntity
-
getDeleted
- Specified by:
getDeletedin interfaceNetworkEntity
-
setDeleted
Persisted in the database table.- Specified by:
setDeletedin interfaceNetworkEntity
-
getParentDatasetKey
-
setParentDatasetKey
Persisted in the database table. -
getDuplicateOfDatasetKey
If a dataset is registered with GBIF through more than one place we'll mark all but one as a duplicate by pointing it to the canonical dataset. That is done using this field. If it isnullthen this is not a known duplicate. -
setDuplicateOfDatasetKey
Persisted in the database table. -
getInstallationKey
-
setInstallationKey
Persisted in the database table. -
getPublishingOrganizationKey
-
setPublishingOrganizationKey
Persisted in the database table. -
getPublishingOrganizationName
-
setPublishingOrganizationName
-
getNetworkKeys
Networks in which this dataset is a constituent. -
setNetworkKeys
-
getMaintenanceUpdateFrequency
Persisted in the database table.- Returns:
- the frequency with which changes are made to the dataset
-
setMaintenanceUpdateFrequency
Persisted in the database table. -
getMaintenanceDescription
A description of the maintenance frequency of this resource.- Returns:
- the description of the maintenance frequency of this resource
-
setMaintenanceDescription
-
getLicense
Persisted in the database table. Note for backwards compatibility, we cannot apply @NotNull to license. Otherwise existing users of our API would have to ensure Dataset objects always populate license. In the Registry DB, Dataset.license defaults to CC-BY 4.0. Therefore license must be excluded from lenientEquals method.- Returns:
- the License applied to the dataset
- See Also:
-
setLicense
Persisted in the database table. Can be interpreted from EML.intellectualRights using machine readable format:<intellectualRights> <para>This work is licensed under a <ulink url="http://creativecommons.org/licenses/by/4.0/legalcode"><citetitle>Creative Commons Attribution (CC-BY) 4.0 License</citetitle></ulink>.</para> </intellectualRights> -
getDoi
- Returns:
- the primary DOI for this dataset regardless if issued by GBIF or publisher
-
setDoi
-
isExternal
-
setExternal
Persisted in the database table. -
getNumConstituents
-
setNumConstituents
Not persisted in the database table, but calculated on the fly. -
getType
-
setType
Persisted in the database table. -
getSubtype
-
setSubtype
Persisted in the database table. -
getShortName
-
setShortName
-
getAlias
TODO: Document what this is -
setAlias
Persisted in the database table. -
getAbbreviation
TODO: Document what this is TODO: are both alias & abbreviation needed? -
setAbbreviation
Persisted in the database table. -
getLanguage
-
setLanguage
Persisted in the database table. -
getHomepage
-
setHomepage
Persisted in the database table. -
getLogoUrl
-
setLogoUrl
Persisted in the database table. -
getCitation
The exact form of how to cite this dataset. -
setCitation
Persisted in the database table. -
getContactsCitation
A generated list of contacts used in the citation text when it is generated by the GBIF API. -
setContactsCitation
-
getRights
Any kind of (copy)rights/IPR statements that apply to the datasets data. -
setRights
Persisted in the database table. -
isLockedForAutoUpdate
-
setLockedForAutoUpdate
Persisted in the database table. -
getCreatedBy
- Specified by:
getCreatedByin interfaceNetworkEntity
-
setCreatedBy
Persisted in the database table.- Specified by:
setCreatedByin interfaceNetworkEntity
-
getModifiedBy
- Specified by:
getModifiedByin interfaceNetworkEntity
-
setModifiedBy
Persisted in the database table.- Specified by:
setModifiedByin interfaceNetworkEntity
-
getContacts
- Specified by:
getContactsin interfaceContactable
-
setContacts
- Specified by:
setContactsin interfaceContactable
-
getEndpoints
- Specified by:
getEndpointsin interfaceEndpointable
-
setEndpoints
- Specified by:
setEndpointsin interfaceEndpointable
-
addEndpoint
- Specified by:
addEndpointin interfaceEndpointable
-
getMachineTags
- Specified by:
getMachineTagsin interfaceMachineTaggable
-
setMachineTags
- Specified by:
setMachineTagsin interfaceMachineTaggable
-
addMachineTag
- Specified by:
addMachineTagin interfaceMachineTaggable
-
getTags
-
setTags
-
getIdentifiers
- Specified by:
getIdentifiersin interfaceIdentifiable
-
setIdentifiers
- Specified by:
setIdentifiersin interfaceIdentifiable
-
getComments
- Specified by:
getCommentsin interfaceCommentable
-
setComments
- Specified by:
setCommentsin interfaceCommentable
-
getBibliographicCitations
-
setBibliographicCitations
-
getCuratorialUnits
-
setCuratorialUnits
-
getTaxonomicCoverages
-
setTaxonomicCoverages
-
getGeographicCoverageDescription
-
setGeographicCoverageDescription
-
getGeographicCoverages
-
setGeographicCoverages
-
getTemporalCoverages
-
setTemporalCoverages
-
getKeywordCollections
-
setKeywordCollections
-
getProject
-
setProject
-
getSamplingDescription
-
setSamplingDescription
-
getCountryCoverage
-
setCountryCoverage
-
getCollections
-
setCollections
-
getDataDescriptions
-
setDataDescriptions
-
getDataLanguage
-
setDataLanguage
-
getPurpose
-
setPurpose
-
getIntroduction
-
setIntroduction
-
getGettingStarted
-
setGettingStarted
-
getAcknowledgements
-
setAcknowledgements
-
getAdditionalInfo
-
setAdditionalInfo
-
getPubDate
-
setPubDate
-
getDwca
-
setDwca
-
getCategory
-
setCategory
-
equals
-
hashCode
-
toString
-
lenientEquals
Only checks the persisted properties, excluding the server controlled fields (key, created, license etc). Does not include the nested properties.- Specified by:
lenientEqualsin interfaceLenientEquals<Dataset>- Parameters:
other- To compare against- Returns:
- true if...
-