Package org.gbif.api.service.collections
Interface DescriptorsService
public interface DescriptorsService
API service to work with collection descriptors.
-
Method Summary
Modifier and TypeMethodDescriptionlong
countDescriptors
(DescriptorSearchRequest searchRequest) Counts the number ofDescriptor
for the request received.long
createDescriptorGroup
(@javax.validation.constraints.NotNull,@javax.validation.Valid byte[] descriptorsGroupFile, @NotNull ExportFormat format, @NotNull String title, String description, @NotNull UUID collectionKey) Creates a new descriptor group.void
deleteDescriptorGroup
(@javax.validation.constraints.NotNull long key) Deletes a descriptor group by key.getDescriptor
(@javax.validation.constraints.NotNull long key) Retrieves a descriptor by its key.getDescriptorGroup
(@javax.validation.constraints.NotNull long key) Retrieves a descriptor group by its key.getVerbatimNames
(long descriptorGroupKey) Get the names of the verbatim fields of a descriptor group.listDescriptorGroups
(@NotNull UUID collectionKey, DescriptorGroupSearchRequest searchRequest) PagesDescriptorGroup
entities based on the parameters received.listDescriptors
(DescriptorSearchRequest searchRequest) PagesDescriptor
entities based on the parameters received.void
Reinterprets all the descriptor groups of all collections.void
reinterpretCollectionDescriptorGroups
(@NotNull UUID collectionKey) Reinterprets all the descriptor groups of a collection.void
reinterpretDescriptorGroup
(@javax.validation.constraints.NotNull long descriptorGroupKey) Reinterprets a descriptor group.void
updateDescriptorGroup
(@javax.validation.constraints.NotNull long descriptorGroupKey, @javax.validation.constraints.NotNull byte[] descriptorsGroupFile, @NotNull ExportFormat format, @NotNull String title, String description) Updates an existing descriptor group.
-
Method Details
-
createDescriptorGroup
long createDescriptorGroup(@NotNull @Valid @javax.validation.constraints.NotNull,@javax.validation.Valid byte[] descriptorsGroupFile, @NotNull @NotNull ExportFormat format, @NotNull @NotNull String title, String description, @NotNull @NotNull UUID collectionKey) Creates a new descriptor group.// TODO
- Returns:
- key of the created descriptor group.
-
deleteDescriptorGroup
Deletes a descriptor group by key.- Parameters:
key
- of the descriptor group to be deleted.
-
getDescriptorGroup
Retrieves a descriptor group by its key.- Parameters:
key
- of the descriptor group to be retrieved.- Returns:
- the descriptor group
-
updateDescriptorGroup
void updateDescriptorGroup(@NotNull @javax.validation.constraints.NotNull long descriptorGroupKey, @NotNull @javax.validation.constraints.NotNull byte[] descriptorsGroupFile, @NotNull @NotNull ExportFormat format, @NotNull @NotNull String title, String description) Updates an existing descriptor group. -
listDescriptorGroups
PagingResponse<DescriptorGroup> listDescriptorGroups(@NotNull @NotNull UUID collectionKey, DescriptorGroupSearchRequest searchRequest) PagesDescriptorGroup
entities based on the parameters received.- Parameters:
searchRequest
-DescriptorGroupSearchRequest
with all the parameters- Returns:
- a list of entities ordered by their creation date, newest coming first
-
getDescriptor
Retrieves a descriptor by its key.- Parameters:
key
- of the descriptor to be retrieved.- Returns:
- the descriptor
-
listDescriptors
PagesDescriptor
entities based on the parameters received.- Parameters:
searchRequest
-DescriptorSearchRequest
with all the parameters- Returns:
- a list of entities ordered by their creation date, newest coming first
-
countDescriptors
Counts the number ofDescriptor
for the request received.- Parameters:
searchRequest
-DescriptorSearchRequest
with all the parameters- Returns:
- number of descriptors
-
getVerbatimNames
Get the names of the verbatim fields of a descriptor group.- Parameters:
descriptorGroupKey
- key of the descriptor group.- Returns:
- the names
-
reinterpretDescriptorGroup
void reinterpretDescriptorGroup(@NotNull @javax.validation.constraints.NotNull long descriptorGroupKey) Reinterprets a descriptor group.- Parameters:
descriptorGroupKey
- key of the descriptor group.
-
reinterpretCollectionDescriptorGroups
Reinterprets all the descriptor groups of a collection.- Parameters:
collectionKey
- key of the collection
-
reinterpretAllDescriptorGroups
Reinterprets all the descriptor groups of all collections.
-