public interface CollectionService extends CollectionEntityService<Collection>
Modifier and Type | Method and Description |
---|---|
UUID |
createFromDataset(UUID datasetKey,
String collectionCode)
Creates a
Collection from a Dataset . |
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<CollectionView> |
listDeleted(CollectionSearchRequest searchRequest)
Provides access to deleted collections.
|
List<KeyCodeNameResult> |
suggest(String q)
Provides a simple suggest service.
|
addMasterSourceMetadata, deleteMasterSourceMetadata, findByMasterSource, getMasterSourceMetadata, replace, update
create, delete, exists, get, update
addIdentifier, deleteIdentifier, listIdentifiers
addTag, addTag, deleteTag, listTags
addMachineTag, addMachineTag, addMachineTag, deleteMachineTag, deleteMachineTags, deleteMachineTags, deleteMachineTags, deleteMachineTags, listMachineTags
addComment, deleteComment, listComments
addContactPerson, 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<CollectionView> listDeleted(CollectionSearchRequest searchRequest)
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.