public interface CollectionService extends CollectionEntityService<Collection>
Modifier and Type | Method and Description |
---|---|
UUID |
createFromDataset(UUID datasetKey,
String collectionCode)
Creates a
Collection from a Dataset . |
UUID |
createFromLatimerCore(@NotNull @Valid ObjectGroup objectGroup)
Similar to
CrudService.create(CollectionEntity) but it accepts Latimer Core. |
ObjectGroup |
getAsLatimerCore(@NotNull UUID key)
Similar to
CrudService.get(UUID) but it returns the result in Latimer Core format. |
CollectionView |
getCollectionView(@NotNull UUID key)
Retrieves a
CollectionView by the collection key. |
PagingResponse<CollectionView> |
list(CollectionSearchRequest searchRequest)
Pages
Collection entities based on the parameters received. |
PagingResponse<ObjectGroup> |
listAsLatimerCore(CollectionSearchRequest searchRequest)
Similar to the
list(CollectionSearchRequest) method but returns the results in Latimer
Core format. |
PagingResponse<CollectionView> |
listDeleted(CollectionSearchRequest searchRequest)
Provides access to deleted collections.
|
List<KeyCodeNameResult> |
suggest(String q)
Provides a simple suggest service.
|
void |
updateFromLatimerCore(@NotNull @Valid ObjectGroup entity)
Similar to
CrudService.update(CollectionEntity) )} but it accepts Latimer Core. |
addMasterSourceMetadata, deleteMasterSourceMetadata, findByMasterSource, getMasterSourceMetadata, replace, update
create, delete, exists, get, update
updateIdentifier
addIdentifier, deleteIdentifier, listIdentifiers
addTag, addTag, deleteTag, listTags
addMachineTag, addMachineTag, addMachineTag, deleteMachineTag, deleteMachineTags, deleteMachineTags, deleteMachineTags, deleteMachineTags, listMachineTags
addComment, deleteComment, listComments
addContactPerson, addSuggestionContacts, listContactPersons, removeContactPerson, replaceContactPersons, updateContactPerson
addOccurrenceMapping, deleteOccurrenceMapping, listOccurrenceMappings
PagingResponse<CollectionView> list(CollectionSearchRequest searchRequest)
Collection
entities based on the parameters received.
To iterate over all entities you can use code like this: PagingRequest req =
new PagingRequest(); PagingResponse<T> response; do { response = service.list(req); for (T obj
: response.getResults()) { doStuff(); } req.nextPage(); } while (!response.isEndOfRecords());
searchRequest
- CollectionSearchRequest
with all the parametersPagingResponse<ObjectGroup> listAsLatimerCore(CollectionSearchRequest searchRequest)
list(CollectionSearchRequest)
method but returns the results in Latimer
Core format.PagingResponse<CollectionView> listDeleted(CollectionSearchRequest searchRequest)
ObjectGroup getAsLatimerCore(@NotNull @NotNull UUID key)
CrudService.get(UUID)
but it returns the result in Latimer Core format.UUID createFromLatimerCore(@NotNull @Valid @NotNull @Valid ObjectGroup objectGroup)
CrudService.create(CollectionEntity)
but it accepts Latimer Core.void updateFromLatimerCore(@NotNull @Valid @NotNull @Valid ObjectGroup entity)
CrudService.update(CollectionEntity)
)} but it accepts Latimer Core.CollectionView getCollectionView(@NotNull @NotNull UUID key)
CollectionView
by the collection key.List<KeyCodeNameResult> suggest(@Nullable String q)
UUID createFromDataset(UUID datasetKey, String collectionCode)
Collection
from a Dataset
.datasetKey
- key of the dataset to create the collection fromcollectionCode
- the code to assign to the collection since it can't be inferred from the
datasetCopyright © 2024 Global Biodiversity Information Facility (GBIF). All rights reserved.