Class IIIFController


  • @RestController
    @RequestMapping("/iiif")
    @ConditionalOnProperty("iiif.enabled")
    public class IIIFController
    extends Object
    Controller for IIIF Presentation and Search API.
    Author:
    Michael Spalti mspalti@willamette.edu, Andrea Bollini (andrea.bollini at 4science.it)
    • Constructor Detail

      • IIIFController

        public IIIFController()
    • Method Detail

      • findOne

        @RequestMapping(method=GET,
                        value="/{id}/manifest")
        public String findOne​(@PathVariable
                              UUID id)
        The manifest response contains sufficient information for the client to initialize itself and begin to display something quickly to the user. The manifest resource represents a single object and any intellectual work or works embodied within that object. In particular it includes the descriptive, rights and linking information for the object. It then embeds the sequence(s) of canvases that should be rendered to the user. Called with GET to retrieve the manifest for a single DSpace item.
        Parameters:
        id - DSpace Item uuid
        Returns:
        manifest as JSON
      • searchInManifest

        @RequestMapping(method=GET,
                        value="/{id}/manifest/search")
        public String searchInManifest​(@PathVariable
                                       UUID id,
                                       @RequestParam(name="q")
                                       String query)
        Any resource in the Presentation API may have a search service associated with it. The resource determines the scope of the content that will be searched. A service associated with a manifest will search all of the annotations on canvases or other objects below the manifest, a service associated with a particular range will only search the canvases within the range, or a service on a canvas will search only annotations on that particular canvas. The URIs for services associated with different resources must be different to allow the client to use the correct one for the desired scope of the search. This endpoint for searches within the manifest scope (by DSpace item uuid).
        Parameters:
        id - DSpace Item uuid
        query - query terms
        Returns:
        AnnotationList as JSON
      • findSeeAlsoList

        @RequestMapping(method=GET,
                        value="/{id}/manifest/seeAlso")
        public String findSeeAlsoList​(@PathVariable
                                      UUID id)
        All resources can link to semantic descriptions of themselves via the seeAlso property. These could be METS, ALTO, full text, or a schema.org descriptions. Since there's currently no reliable way to associate "seeAlso" links and individual canvases (e.g. associate a single image with its ALTO file) the scope is the entire manifest (or DSpace Item).
        Parameters:
        id - DSpace Item uuid
        Returns:
        AnnotationList as JSON
      • findCanvas

        @RequestMapping(method=GET,
                        value="/{id}/canvas/{cid}")
        public String findCanvas​(@PathVariable
                                 UUID id,
                                 @PathVariable
                                 String cid)
        The canvas represents an individual page or view and acts as a central point for laying out the different content resources that make up the display. This information should be embedded within a sequence. This endpoint allows canvases to be dereferenced separately from the manifest. This is an atypical use case.
        Parameters:
        id - DSpace Item uuid
        cid - canvas identifier
        Returns:
        canvas as JSON