Package org.gbif.api.service.collections
Interface InstitutionService
- All Superinterfaces:
CollectionEntityService<Institution>
,CommentService
,ContactService
,CrudService<Institution>
,IdentifierService
,MachineTagService
,OccurrenceMappingService
,PrimaryIdentifierService
,TagService
Service for institutions in the collections context.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
convertToCollection
(UUID targetEntityKey, UUID collectionKey) Converts an institution into a collection.createFromLatimerCore
(@NotNull @Valid OrganisationalUnit organisationalUnit) Similar toCrudService.create(CollectionEntity)
but it accepts Latimer Core.createFromOrganization
(UUID organizationKey, String institutionCode) Creates aInstitution
from aOrganization
.getAsLatimerCore
(@NotNull UUID key) Similar to theCrudService.get(UUID)
method but returns the results in Latimer Core format.list
(InstitutionSearchRequest searchRequest) PagesInstitution
entities based on the parameters received.listAsLatimerCore
(InstitutionSearchRequest searchRequest) Similar to thelist(InstitutionSearchRequest)
method but returns the results in Latimer Core format.listDeleted
(InstitutionSearchRequest searchRequest) Provides access to deleted institutions.org.geojson.FeatureCollection
listGeojson
(InstitutionSearchRequest searchRequest) Lists the institutions in GeoJson format.Provides a simple suggest service.void
updateFromLatimerCore
(@NotNull @Valid OrganisationalUnit entity) Similar toCrudService.update(CollectionEntity)
)} but it accepts Latimer Core.Methods inherited from interface org.gbif.api.service.collections.CollectionEntityService
addMasterSourceMetadata, deleteMasterSourceMetadata, findByMasterSource, getMasterSourceMetadata, replace, update
Methods inherited from interface org.gbif.api.service.registry.CommentService
addComment, deleteComment, listComments
Methods inherited from interface org.gbif.api.service.collections.ContactService
addContactPerson, addSuggestionContacts, listContactPersons, removeContactPerson, replaceContactPersons, updateContactPerson
Methods inherited from interface org.gbif.api.service.collections.CrudService
create, delete, exists, get, update
Methods inherited from interface org.gbif.api.service.registry.IdentifierService
addIdentifier, deleteIdentifier, listIdentifiers
Methods inherited from interface org.gbif.api.service.registry.MachineTagService
addMachineTag, addMachineTag, addMachineTag, deleteMachineTag, deleteMachineTags, deleteMachineTags, deleteMachineTags, deleteMachineTags, listMachineTags
Methods inherited from interface org.gbif.api.service.collections.OccurrenceMappingService
addOccurrenceMapping, deleteOccurrenceMapping, listOccurrenceMappings
Methods inherited from interface org.gbif.api.service.registry.PrimaryIdentifierService
updateIdentifier
Methods inherited from interface org.gbif.api.service.registry.TagService
addTag, addTag, deleteTag, listTags
-
Method Details
-
list
PagesInstitution
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());
- Parameters:
searchRequest
-InstitutionSearchRequest
with all the parameters- Returns:
- a list of entities ordered by their creation date, newest coming first
-
listAsLatimerCore
Similar to thelist(InstitutionSearchRequest)
method but returns the results in Latimer Core format. -
getAsLatimerCore
Similar to theCrudService.get(UUID)
method but returns the results in Latimer Core format. -
createFromLatimerCore
Similar toCrudService.create(CollectionEntity)
but it accepts Latimer Core. -
updateFromLatimerCore
Similar toCrudService.update(CollectionEntity)
)} but it accepts Latimer Core. -
listDeleted
Provides access to deleted institutions. -
suggest
Provides a simple suggest service. -
convertToCollection
Converts an institution into a collection. The institution converted is deleted. -
createFromOrganization
Creates aInstitution
from aOrganization
.- Parameters:
organizationKey
- key of the dataset to create the institution frominstitutionCode
- the code to assign to the institution since it can't be inferred from the organization- Returns:
- UUID of the created institution
-
listGeojson
Lists the institutions in GeoJson format.- Parameters:
searchRequest
- parameters to filter the request- Returns:
- a
FeatureCollection
object that conforms with GeoJson
-