public interface OccurrenceDownloadService
Modifier and Type | Method and Description |
---|---|
long |
count(Set<Download.Status> status,
String source)
Counts downloads based on the given parameters.
|
long |
countByUser(@NotNull String user,
Set<Download.Status> status,
LocalDateTime from)
Counts the downloads created by a user.
|
void |
create(@NotNull @Valid Download download)
Persists the occurrence download object.
|
void |
createUsages(@NotNull String downloadKey,
@NotNull Map<UUID,Long> datasetCitations)
Persists usages of datasets in an occurrence download.
|
Download |
get(@NotNull String keyOrDoi)
Retrieves a occurrence download by its unique key or DOI.
|
String |
getCitation(@NotNull String keyOrDoi)
Retrieve citation details of a download by its unique key or DOI.
|
Map<Integer,Map<Integer,Long>> |
getDownloadedRecordsByDataset(Date fromDate,
Date toDate,
Country publishingCountry,
UUID datasetKey,
UUID publishingOrgKey)
Retrieves downloaded records monthly stats by country (user and publishing country) and
dataset.
|
Map<Integer,Map<Integer,Long>> |
getDownloadsByDataset(Date fromDate,
Date toDate,
Country publishingCountry,
UUID datasetKey,
UUID publishingOrgKey)
Retrieves downloads monthly stats by country (user and publishing country) and dataset.
|
Map<Integer,Map<Integer,Long>> |
getDownloadsBySource(Date fromDate,
Date toDate,
String source)
Retrieves downloads monthly stats by source.
|
Map<Integer,Map<Integer,Long>> |
getDownloadsByUserCountry(Date fromDate,
Date toDate,
Country userCountry)
Retrieves downloads monthly stats by country (user and publishing country) and dataset.
|
PagingResponse<DownloadStatistics> |
getDownloadStatistics(Date fromDate,
Date toDate,
Country publishingCountry,
UUID datasetKey,
UUID publishingOrgKey,
Pageable page)
Retrieves downloads monthly stats by country (user and publishing country) and dataset.
|
PagingResponse<Download> |
list(Pageable page,
Set<Download.Status> status,
String source)
Retrieves a pageable result of all the downloads, optionally the downloads can be filtered by
status and source.
|
PagingResponse<Download> |
listByEraseAfter(Pageable page,
String eraseAfter,
Long size,
String erasureNotification)
Retrieves a pageable result of the downloads created by a user in a given status.
|
PagingResponse<Download> |
listByUser(@NotNull String user,
Pageable page,
Set<Download.Status> status,
LocalDateTime from,
Boolean statistics)
Retrieves a pageable result of the downloads created by a user in a given status.
|
PagingResponse<CountryOccurrenceDownloadUsage> |
listCountryUsages(@NotNull String keyOrDoi,
CountryUsageSortField sortBy,
SortOrder sortOrder,
Pageable page) |
PagingResponse<DatasetOccurrenceDownloadUsage> |
listDatasetUsages(@NotNull String keyOrDoi,
Pageable page)
Retrieves a pageable result of the dataset usages in a occurrence download.
|
PagingResponse<DatasetOccurrenceDownloadUsage> |
listDatasetUsages(@NotNull String keyOrDoi,
String datasetTitle,
DatasetUsageSortField sortBy,
SortOrder sortOrder,
Pageable page) |
PagingResponse<OrganizationOccurrenceDownloadUsage> |
listOrganizationUsages(@NotNull String keyOrDoi,
String organizationTitle,
OrganizationUsageSortField sortBy,
SortOrder sortOrder,
Pageable page) |
void |
update(@NotNull @Valid Download download)
Update an existing occurrence download.
|
void create(@NotNull @Valid @NotNull @Valid Download download)
Download get(@NotNull @NotNull String keyOrDoi)
PagingResponse<Download> list(@Nullable Pageable page, @Nullable Set<Download.Status> status, @Nullable String source)
long count(@Nullable Set<Download.Status> status, @Nullable String source)
PagingResponse<Download> listByUser(@NotNull @NotNull String user, @Nullable Pageable page, @Nullable Set<Download.Status> status, LocalDateTime from, Boolean statistics)
long countByUser(@NotNull @NotNull String user, @Nullable Set<Download.Status> status, LocalDateTime from)
PagingResponse<Download> listByEraseAfter(@Nullable Pageable page, @Nullable String eraseAfter, @Nullable Long size, @Nullable String erasureNotification)
Internal use only; behaviour may change without notice.
void update(@NotNull @Valid @NotNull @Valid Download download)
PagingResponse<DatasetOccurrenceDownloadUsage> listDatasetUsages(@NotNull @NotNull String keyOrDoi, @Nullable Pageable page)
The Downloads in the DatasetOccurrenceDownloadUsages are null, to avoid redundant repetition of potentially large objects.
PagingResponse<DatasetOccurrenceDownloadUsage> listDatasetUsages(@NotNull @NotNull String keyOrDoi, @Nullable String datasetTitle, @Nullable DatasetUsageSortField sortBy, @Nullable SortOrder sortOrder, @Nullable Pageable page)
PagingResponse<OrganizationOccurrenceDownloadUsage> listOrganizationUsages(@NotNull @NotNull String keyOrDoi, @Nullable String organizationTitle, @Nullable OrganizationUsageSortField sortBy, @Nullable SortOrder sortOrder, @Nullable Pageable page)
PagingResponse<CountryOccurrenceDownloadUsage> listCountryUsages(@NotNull @NotNull String keyOrDoi, @Nullable CountryUsageSortField sortBy, @Nullable SortOrder sortOrder, @Nullable Pageable page)
String getCitation(@NotNull @NotNull String keyOrDoi)
Map<Integer,Map<Integer,Long>> getDownloadsByUserCountry(@Nullable Date fromDate, @Nullable Date toDate, @Nullable Country userCountry)
Map<Integer,Map<Integer,Long>> getDownloadsBySource(@Nullable Date fromDate, @Nullable Date toDate, @Nullable String source)
Map<Integer,Map<Integer,Long>> getDownloadedRecordsByDataset(@Nullable Date fromDate, @Nullable Date toDate, @Nullable Country publishingCountry, @Nullable UUID datasetKey, @Nullable UUID publishingOrgKey)
Map<Integer,Map<Integer,Long>> getDownloadsByDataset(@Nullable Date fromDate, @Nullable Date toDate, @Nullable Country publishingCountry, @Nullable UUID datasetKey, @Nullable UUID publishingOrgKey)
PagingResponse<DownloadStatistics> getDownloadStatistics(@Nullable Date fromDate, @Nullable Date toDate, @Nullable Country publishingCountry, @Nullable UUID datasetKey, @Nullable UUID publishingOrgKey, @Nullable Pageable page)
void createUsages(@NotNull @NotNull String downloadKey, @NotNull @NotNull Map<UUID,Long> datasetCitations)
downloadKey
- downloadkey of the datasets' usage information.datasetCitations
- map of datasetkey as key and number of records as value.Copyright © 2024 Global Biodiversity Information Facility (GBIF). All rights reserved.