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:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addEndpoint
(Endpoint endpoint) void
addMachineTag
(MachineTag machineTag) boolean
@Size(min=1,max=50) String
TODO: Document what this is TODO: are both alias & abbreviation needed?@Size(min=2,max=50) String
getAlias()
TODO: Document what this is@Valid Citation
The 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.@NotNull UUID
getKey()
@NotNull Language
Persisted 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) String
Any kind of (copy)rights/IPR statements that apply to the datasets data.getTags()
getTitle()
@NotNull DatasetType
getType()
int
hashCode()
boolean
boolean
boolean
lenientEquals
(Dataset other) Only checks the persisted properties, excluding the server controlled fields (key, created, license etc).void
setAbbreviation
(String abbreviation) Persisted in the database table.void
setAcknowledgements
(String acknowledgements) void
setAdditionalInfo
(String additionalInfo) void
Persisted in the database table.void
setBibliographicCitations
(List<Citation> bibliographicCitations) void
setCitation
(Citation citation) Persisted in the database table.void
setCollections
(List<Collection> collections) void
setComments
(List<Comment> comments) void
setContacts
(List<Contact> contacts) void
setContactsCitation
(List<CitationContact> contactsCitation) void
setCountryCoverage
(Set<Country> countryCoverage) void
setCreated
(Date created) Autoassigned in the database table, ignored when persisted.void
setCreatedBy
(String createdBy) Persisted in the database table.void
setCuratorialUnits
(List<CuratorialUnitComposite> curatorialUnits) void
setDataDescriptions
(List<DataDescription> dataDescriptions) void
setDataLanguage
(Language dataLanguage) void
setDeleted
(Date deleted) Persisted in the database table.void
setDescription
(String description) Persisted in the database table.void
void
setDuplicateOfDatasetKey
(UUID duplicateOfDatasetKey) Persisted in the database table.void
setEndpoints
(List<Endpoint> endpoints) void
setExternal
(boolean external) Persisted in the database table.void
setGeographicCoverageDescription
(String geographicCoverageDescription) void
setGeographicCoverages
(List<GeospatialCoverage> geographicCoverages) void
setGettingStarted
(String gettingStarted) void
setHomepage
(URI homepage) Persisted in the database table.void
setIdentifiers
(List<Identifier> identifiers) void
setInstallationKey
(UUID installationKey) Persisted in the database table.void
setIntroduction
(String introduction) void
Persisted in the database table.void
setKeywordCollections
(List<KeywordCollection> keywordCollections) void
setLanguage
(Language language) Persisted in the database table.void
setLicense
(License license) Persisted in the database table.void
setLockedForAutoUpdate
(boolean lockedForAutoUpdate) Persisted in the database table.void
setLogoUrl
(URI logoUrl) Persisted in the database table.void
setMachineTags
(List<MachineTag> machineTags) void
setMaintenanceDescription
(String maintenanceDescription) void
setMaintenanceUpdateFrequency
(MaintenanceUpdateFrequency maintenanceUpdateFrequency) Persisted in the database table.void
setModified
(Date modified) Persisted in the database table.void
setModifiedBy
(String modifiedBy) Persisted in the database table.void
setNetworkKeys
(List<UUID> networkKeys) void
setNumConstituents
(int numConstituents) Not persisted in the database table, but calculated on the fly.void
setParentDatasetKey
(UUID parentDatasetKey) Persisted in the database table.void
setProject
(Project project) void
setPubDate
(Date pubDate) void
setPublishingOrganizationKey
(UUID publishingOrganizationKey) Persisted in the database table.void
setPublishingOrganizationName
(String publishingOrganizationName) void
setPurpose
(String purpose) void
Persisted in the database table.void
setSamplingDescription
(SamplingDescription samplingDescription) void
setShortName
(String shortName) void
setSubtype
(DatasetSubtype subtype) Persisted in the database table.void
void
setTaxonomicCoverages
(List<TaxonomicCoverages> taxonomicCoverages) void
setTemporalCoverages
(List<TemporalCoverage> temporalCoverages) void
Persisted in the database table.void
setType
(DatasetType type) Persisted in the database table.void
setVersion
(String version) toString()
-
Constructor Details
-
Dataset
public Dataset()
-
-
Method Details
-
getKey
- Specified by:
getKey
in interfaceNetworkEntity
-
setKey
Persisted in the database table.- Specified by:
setKey
in interfaceNetworkEntity
-
getVersion
-
setVersion
-
getTitle
- Specified by:
getTitle
in interfaceNetworkEntity
-
setTitle
Persisted in the database table.- Specified by:
setTitle
in interfaceNetworkEntity
-
getDescription
- Specified by:
getDescription
in interfaceNetworkEntity
-
setDescription
Persisted in the database table.- Specified by:
setDescription
in interfaceNetworkEntity
-
getCreated
- Specified by:
getCreated
in interfaceNetworkEntity
-
setCreated
Autoassigned in the database table, ignored when persisted.- Specified by:
setCreated
in interfaceNetworkEntity
-
getModified
- Specified by:
getModified
in interfaceNetworkEntity
-
setModified
Persisted in the database table.- Specified by:
setModified
in interfaceNetworkEntity
-
getDeleted
- Specified by:
getDeleted
in interfaceNetworkEntity
-
setDeleted
Persisted in the database table.- Specified by:
setDeleted
in 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 isnull
then 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:
getCreatedBy
in interfaceNetworkEntity
-
setCreatedBy
Persisted in the database table.- Specified by:
setCreatedBy
in interfaceNetworkEntity
-
getModifiedBy
- Specified by:
getModifiedBy
in interfaceNetworkEntity
-
setModifiedBy
Persisted in the database table.- Specified by:
setModifiedBy
in interfaceNetworkEntity
-
getContacts
- Specified by:
getContacts
in interfaceContactable
-
setContacts
- Specified by:
setContacts
in interfaceContactable
-
getEndpoints
- Specified by:
getEndpoints
in interfaceEndpointable
-
setEndpoints
- Specified by:
setEndpoints
in interfaceEndpointable
-
addEndpoint
- Specified by:
addEndpoint
in interfaceEndpointable
-
getMachineTags
- Specified by:
getMachineTags
in interfaceMachineTaggable
-
setMachineTags
- Specified by:
setMachineTags
in interfaceMachineTaggable
-
addMachineTag
- Specified by:
addMachineTag
in interfaceMachineTaggable
-
getTags
-
setTags
-
getIdentifiers
- Specified by:
getIdentifiers
in interfaceIdentifiable
-
setIdentifiers
- Specified by:
setIdentifiers
in interfaceIdentifiable
-
getComments
- Specified by:
getComments
in interfaceCommentable
-
setComments
- Specified by:
setComments
in 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
-
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:
lenientEquals
in interfaceLenientEquals<Dataset>
- Parameters:
other
- To compare against- Returns:
- true if...
-