Class CollectionsResource

java.lang.Object
io.goobi.viewer.api.rest.v2.collections.CollectionsResource

@Path("/collections/{field}") public class CollectionsResource extends Object
REST resource providing IIIF Presentation v3 collection endpoints for collection browsing.
Author:
Florian Alpers
  • Constructor Details

  • Method Details

    • getAllCollections

      @GET @Produces("application/json") public de.intranda.api.iiif.presentation.v3.Collection3 getAllCollections() throws IndexUnreachableException
      Returns 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 Collection3 listing 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 Collection3 for the given collection
      Throws:
      PresentationException
      IndexUnreachableException