Class IIIFServiceFacade


  • @Service
    public class IIIFServiceFacade
    extends Object
    IIIF Service facade to support IIIF Presentation and Search API requests.
    Author:
    Michael Spalti mspalti@willamette.edu, Andrea Bollini (andrea.bollini at 4science.it)
    • Constructor Detail

      • IIIFServiceFacade

        public IIIFServiceFacade()
    • Method Detail

      • getManifest

        @Cacheable(key="#id.toString()",
                   cacheNames="manifests")
        @PreAuthorize("hasPermission(#id, \'ITEM\', \'READ\')")
        public String getManifest​(Context context,
                                  UUID id)
                           throws org.springframework.data.rest.webmvc.ResourceNotFoundException
        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. Returns manifest for single DSpace item.
        Parameters:
        id - DSpace Item uuid
        Returns:
        manifest as JSON
        Throws:
        org.springframework.data.rest.webmvc.ResourceNotFoundException
      • getCanvas

        @PreAuthorize("hasPermission(#id, \'ITEM\', \'READ\')")
        public String getCanvas​(Context context,
                                UUID id,
                                String canvasId)
                         throws org.springframework.data.rest.webmvc.ResourceNotFoundException
        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.
        Parameters:
        id - DSpace item uuid
        canvasId - canvas identifier
        Returns:
        canvas as JSON
        Throws:
        org.springframework.data.rest.webmvc.ResourceNotFoundException
      • searchInManifest

        @PreAuthorize("hasPermission(#id, \'ITEM\', \'READ\')")
        public String searchInManifest​(Context context,
                                       UUID id,
                                       String query)
        Returns search hits and word coordinates as an AnnotationList. Search scope is a single DSpace item or manifest.
        Parameters:
        id - DSpace item uuid
        query - query terms
        Returns:
        AnnotationList as JSON
      • getSeeAlsoAnnotations

        @PreAuthorize("hasPermission(#id, \'ITEM\', \'READ\')")
        public String getSeeAlsoAnnotations​(Context context,
                                            UUID id)
        Returns annotations for machine readable metadata that describes the resource.
        Parameters:
        id - the Item uuid
        Returns:
        AnnotationList as JSON