Class CollectionsResource
java.lang.Object
io.goobi.viewer.api.rest.v2.collections.CollectionsResource
REST resource providing IIIF Presentation v3 collection endpoints for collection browsing.
- Author:
- Florian Alpers
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionde.intranda.api.iiif.presentation.v3.Collection3Returns the top-level collections of a Solr field's collection hierarchy.de.intranda.api.iiif.presentation.v3.Collection3getCollection(String collectionName) Returns a single collection of a Solr field's hierarchy, together with its immediate child collections and directly contained records.
-
Constructor Details
-
CollectionsResource
public CollectionsResource(@PathParam("field") String solrField, @Context HttpServletRequest request)
-
-
Method Details
-
getAllCollections
@GET @Produces("application/json") public de.intranda.api.iiif.presentation.v3.Collection3 getAllCollections() throws IndexUnreachableExceptionReturns the top-level collections of a Solr field's collection hierarchy.Only the top-level collections for the given field are listed as items of the returned collection; use the collection endpoint to descend into a single collection's own children and records. Unlike the version 1 endpoint, a field without any collections yields an empty collection instead of a not-found response.
- Returns:
- the
Collection3listing the field's top-level collections - Throws:
IndexUnreachableException
-
getCollection
@GET @Path("/{collection}") @Produces("application/json") public de.intranda.api.iiif.presentation.v3.Collection3 getCollection(@PathParam("collection") String collectionName) throws PresentationException, IndexUnreachableException Returns a single collection of a Solr field's hierarchy, together with its immediate child collections and directly contained records.Child collections are annotated with their own record and sub-collection counts. Records are returned as manifests, except anchor records for multi-volume works, which are returned as nested collections that resolve to the anchor's volumes. A Solr query the index rejects — for example an undefined collection field — results in a not-found response; a collection name with no matching records simply yields an empty collection.
- Parameters:
collectionName- name of the collection. Must be a value of the SOLR field the collection is based on- Returns:
- the
Collection3for the given collection - Throws:
PresentationExceptionIndexUnreachableException
-