Package org.gbif.api.service.collections
Interface DescriptorsService
-
public interface DescriptorsService
API service to work with collection descriptors.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description long
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.Descriptor
getDescriptor(@javax.validation.constraints.NotNull long key)
Retrieves a descriptor by its key.DescriptorGroup
getDescriptorGroup(@javax.validation.constraints.NotNull long key)
Retrieves a descriptor group by its key.Set<String>
getVerbatimNames(long descriptorGroupKey)
Get the names of the verbatim fields of a descriptor group.PagingResponse<DescriptorGroup>
listDescriptorGroups(@NotNull UUID collectionKey, DescriptorGroupSearchRequest searchRequest)
PagesDescriptorGroup
entities based on the parameters received.PagingResponse<Descriptor>
listDescriptors(DescriptorSearchRequest searchRequest)
PagesDescriptor
entities based on the parameters received.void
reinterpretAllDescriptorGroups()
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 Detail
-
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
void deleteDescriptorGroup(@NotNull @javax.validation.constraints.NotNull long key)
Deletes a descriptor group by key.- Parameters:
key
- of the descriptor group to be deleted.
-
getDescriptorGroup
DescriptorGroup getDescriptorGroup(@NotNull @javax.validation.constraints.NotNull long key)
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
Descriptor getDescriptor(@NotNull @javax.validation.constraints.NotNull long key)
Retrieves a descriptor by its key.- Parameters:
key
- of the descriptor to be retrieved.- Returns:
- the descriptor
-
listDescriptors
PagingResponse<Descriptor> listDescriptors(DescriptorSearchRequest searchRequest)
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
long countDescriptors(DescriptorSearchRequest searchRequest)
Counts the number ofDescriptor
for the request received.- Parameters:
searchRequest
-DescriptorSearchRequest
with all the parameters- Returns:
- number of descriptors
-
getVerbatimNames
Set<String> getVerbatimNames(long descriptorGroupKey)
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
void reinterpretCollectionDescriptorGroups(@NotNull @NotNull UUID collectionKey)
Reinterprets all the descriptor groups of a collection.- Parameters:
collectionKey
- key of the collection
-
reinterpretAllDescriptorGroups
void reinterpretAllDescriptorGroups()
Reinterprets all the descriptor groups of all collections.
-
-