Package org.gbif.api.service.registry
Interface DatasetService
-
- All Superinterfaces:
CommentService
,ContactService
,EndpointService
,IdentifierService
,MachineTagService
,NetworkEntityService<Dataset>
,TagService
public interface DatasetService extends NetworkEntityService<Dataset>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
deleteMetadata(int metadataKey)
Removes a metadata entry and its document by its key.Metadata
getMetadata(int metadataKey)
Get a metadata description by its key.InputStream
getMetadataDocument(int metadataKey)
Gets the actual metadata document content by its key.InputStream
getMetadataDocument(UUID datasetKey)
Retrieves a GBIF generated EML document overlaying GBIF information with any existing metadata document data.Metadata
insertMetadata(UUID datasetKey, InputStream document)
Inserts a metadata document, replacing any previously existing document of the same type.PagingResponse<Dataset>
list(DatasetRequestSearchParams searchParams)
Provides paging service to list datasets that can be filtered by multiple parameters.PagingResponse<Dataset>
listByCountry(Country country, DatasetType type, Pageable page)
Provides paging service to list datasets published, i.e.PagingResponse<Dataset>
listByDOI(String doi, Pageable page)
Get a Dataset list from a DOI.PagingResponse<Dataset>
listByType(DatasetType type, Pageable page)
Provides paging service to list datasets published filtered by a particular dataset type.PagingResponse<Dataset>
listConstituents(UUID datasetKey, Pageable page)
Pages through constituents of a dataset, i.e.PagingResponse<Dataset>
listConstituents(Pageable page)
Pages through all constituent datasets, i.e.PagingResponse<Dataset>
listDatasetsWithNoEndpoint(Pageable page)
Provides access to internal (e.g.PagingResponse<Dataset>
listDeleted(DatasetRequestSearchParams searchParams)
Provides access to deleted datasets.PagingResponse<Dataset>
listDuplicates(Pageable page)
Provides access to datasets that are marked as a duplicate of another.List<Grid>
listGrids(UUID datasetKey)
Get gridded datasets processing infoList<Metadata>
listMetadata(UUID datasetKey, MetadataType type)
Lists all metadata descriptions available for a dataset and optionally filters them by document type.List<Network>
listNetworks(UUID datasetKey)
Lists all networks that this dataset is a constituent of.-
Methods inherited from interface org.gbif.api.service.registry.CommentService
addComment, deleteComment, listComments
-
Methods inherited from interface org.gbif.api.service.registry.ContactService
addContact, deleteContact, listContacts, updateContact
-
Methods inherited from interface org.gbif.api.service.registry.EndpointService
addEndpoint, deleteEndpoint, listEndpoints
-
Methods inherited from interface org.gbif.api.service.registry.IdentifierService
addIdentifier, deleteIdentifier, listIdentifiers
-
Methods inherited from interface org.gbif.api.service.registry.MachineTagService
addMachineTag, addMachineTag, addMachineTag, deleteMachineTag, deleteMachineTags, deleteMachineTags, deleteMachineTags, deleteMachineTags, listMachineTags
-
Methods inherited from interface org.gbif.api.service.registry.NetworkEntityService
create, delete, get, getTitles, list, listByIdentifier, listByIdentifier, listByMachineTag, search, update
-
Methods inherited from interface org.gbif.api.service.registry.TagService
addTag, addTag, deleteTag, listTags
-
-
-
-
Method Detail
-
listConstituents
PagingResponse<Dataset> listConstituents(UUID datasetKey, @Nullable Pageable page)
Pages through constituents of a dataset, i.e. returns datasets which have a parentDatasetKey equals to the one requested.- Parameters:
datasetKey
- the parent datasets key
-
listConstituents
PagingResponse<Dataset> listConstituents(@Nullable Pageable page)
Pages through all constituent datasets, i.e. returns datasets which have a non null parentDatasetKey.
-
listByCountry
PagingResponse<Dataset> listByCountry(Country country, @Nullable DatasetType type, @Nullable Pageable page)
Provides paging service to list datasets published, i.e. owned by organizations from a given country.- Parameters:
country
- the hosting countrytype
- the optional dataset type filter- Returns:
- list of datasets ordered by creation date with latest coming first
-
listByType
PagingResponse<Dataset> listByType(DatasetType type, @Nullable Pageable page)
Provides paging service to list datasets published filtered by a particular dataset type.- Parameters:
type
- the dataset type filter- Returns:
- list of datasets ordered by creation date with latest coming first
-
listMetadata
List<Metadata> listMetadata(UUID datasetKey, @Nullable MetadataType type)
Lists all metadata descriptions available for a dataset and optionally filters them by document type. The list is sorted by priority with the first result ranking highest. Highest priority in this sense means most relevant for augmenting/updating a dataset with EML being the most relevant cause informative type.- Returns:
- the list of metadata entries sorted by priority
-
listNetworks
List<Network> listNetworks(UUID datasetKey)
Lists all networks that this dataset is a constituent of.- Parameters:
datasetKey
- the dataset in question- Returns:
- list of networks that have this dataset as a constituent
-
getMetadata
Metadata getMetadata(int metadataKey)
Get a metadata description by its key.
-
deleteMetadata
void deleteMetadata(int metadataKey)
Removes a metadata entry and its document by its key.
-
insertMetadata
Metadata insertMetadata(UUID datasetKey, InputStream document)
Inserts a metadata document, replacing any previously existing document of the same type. Updates dataset from metadata document, but only if metadata document does not exist already. The document type is discovered by the service and returned in the Metadata instance.- Parameters:
datasetKey
- the dataset in questiondocument
- metadata document to insert- Throws:
IllegalArgumentException
- if document is not parsable
-
getMetadataDocument
InputStream getMetadataDocument(UUID datasetKey)
Retrieves a GBIF generated EML document overlaying GBIF information with any existing metadata document data.
-
getMetadataDocument
InputStream getMetadataDocument(int metadataKey)
Gets the actual metadata document content by its key.
-
listDeleted
PagingResponse<Dataset> listDeleted(DatasetRequestSearchParams searchParams)
Provides access to deleted datasets.
-
listDuplicates
PagingResponse<Dataset> listDuplicates(@Nullable Pageable page)
Provides access to datasets that are marked as a duplicate of another. When 2 datasets are considered duplicates, one is marked as a duplicate of the other. Only the marked dataset is returned in this call.
-
listDatasetsWithNoEndpoint
PagingResponse<Dataset> listDatasetsWithNoEndpoint(@Nullable Pageable page)
Provides access to internal (e.g. not marked as external) datasets, that are not sub datasets that have no endpoint.
-
listByDOI
PagingResponse<Dataset> listByDOI(String doi, @Nullable Pageable page)
Get a Dataset list from a DOI. GBIF assigned DOIs and alternate identifiers are returned. Multiple dataset could share the same DOI since this is not enforced.
-
listGrids
List<Grid> listGrids(UUID datasetKey)
Get gridded datasets processing info- Parameters:
datasetKey
- the dataset in question- Returns:
- List of grids
-
list
PagingResponse<Dataset> list(DatasetRequestSearchParams searchParams)
Provides paging service to list datasets that can be filtered by multiple parameters.- Parameters:
searchParams
-DatasetRequestSearchParams
- Returns:
- list of datasets ordered by creation date with the latest coming first
-
-