Class IIIFPresentationAPIHandler

java.lang.Object
io.goobi.viewer.controller.imaging.IIIFPresentationAPIHandler

public class IIIFPresentationAPIHandler extends Object
Creates urls to IIIF Presentation api calls to get manifests, canvases, annotationLists or layers
Author:
Florian Alpers
  • Constructor Details

  • Method Details

    • getPageManifestUrl

      public String getPageManifestUrl(String pi, int pageNo) throws URISyntaxException
      Returns the url to the manifest for the given pi
      Parameters:
      pi - a String object.
      pageNo -
      Returns:
      The IIIF manifest
      Throws:
      URISyntaxException - if any.
    • getManifestUrl

      public String getManifestUrl(String pi) throws URISyntaxException
      Returns the url to the manifest for the given pi
      Parameters:
      pi - a String object.
      Returns:
      The IIIF manifest
      Throws:
      URISyntaxException - if any.
    • getCollectionUrl

      public String getCollectionUrl() throws URISyntaxException
      Returns the url to a IIIF collection resource containing all top level collections for the field DC
      Returns:
      The IIIF collection url
      Throws:
      URISyntaxException - if any.
    • getCollectionUrl

      public String getCollectionUrl(String field) throws URISyntaxException
      Returns the url to a IIIF collection resource containing all top level collections for the given field
      Parameters:
      field - a String object.
      Returns:
      The IIIF collection url
      Throws:
      URISyntaxException - if any.
    • getCollectionUrl

      public String getCollectionUrl(String field, String collection) throws URISyntaxException
      Returns the url to a IIIF collection resource for the given collection name for the given field
      Parameters:
      field - a String object.
      collection - a String object.
      Returns:
      The IIIF collection url
      Throws:
      URISyntaxException - if any.
    • getLayerUrl

      public String getLayerUrl(String pi, String annotationType) throws URISyntaxException
      Returns a IIIF layer with all annotations of the given type within the work of the given pi
      Parameters:
      pi - a String object.
      annotationType - a String object.
      Returns:
      The IIIF layer url
      Throws:
      URISyntaxException - if any.
    • getAnnotationsUrl

      public String getAnnotationsUrl(String pi, int pageOrder, String annotationType) throws URISyntaxException
      Returns a IIIF annotation list containing all annotations of the given type for the given page
      Parameters:
      pi - a String object.
      pageOrder - a int.
      annotationType - a String object.
      Returns:
      The IIIF annotation list
      Throws:
      URISyntaxException - if any.
    • getCanvasUrl

      public String getCanvasUrl(String pi, int pageOrder) throws URISyntaxException
      Returns the IIIF canvas for the given page
      Parameters:
      pi - a String object.
      pageOrder - a int.
      Returns:
      The IIIF canvas url
      Throws:
      URISyntaxException - if any.
    • getRangeUrl

      public String getRangeUrl(String pi, String logId) throws URISyntaxException
      Returns a IIIF range representing the structural element for the given PI and logid. If the logid is the logid of the work itself, The "CONTENT" range is returned, containing all topmost ranges but no canvases and no metadata
      Parameters:
      pi - a String object.
      logId - a String object.
      Returns:
      The IIIF range url
      Throws:
      URISyntaxException - if any.