Class RangeGenerator

java.lang.Object
org.dspace.app.iiif.model.generator.RangeGenerator
All Implemented Interfaces:
IIIFResource

public class RangeGenerator extends Object implements IIIFResource
This generator wraps the domain model for IIIF ranges. In Presentation API version 2.1.1, adding a range to the manifest allows the client to display a structured hierarchy to enable the user to navigate within the object without merely stepping through the current sequence. This is used to populate the "structures" element of the Manifest. The structure is derived from the iiif.toc metadata and the ordered sequence of bitstreams (canvases)
Author:
Michael Spalti mspalti@willamette.edu, Andrea Bollini (andrea.bollini at 4science.it)
  • Constructor Details

    • RangeGenerator

      public RangeGenerator(RangeService rangeService)
      The RangeService is used for defining hierarchical sub ranges.
      Parameters:
      rangeService - range service
  • Method Details

    • setIdentifier

      public RangeGenerator setIdentifier(@NotNull @NotNull String identifier)
      Sets mandatory range identifier.
      Parameters:
      identifier - range identifier
    • getIdentifier

      public String getIdentifier()
    • setLabel

      public RangeGenerator setLabel(String label)
      Sets the optional range label.
      Parameters:
      label - range label
    • addViewingHint

      public RangeGenerator addViewingHint(String hint)
    • addCanvas

      public RangeGenerator addCanvas(CanvasGenerator canvas)
      Adds canvas to range canvas list.
      Parameters:
      canvas - list of canvas generators
    • addSubRange

      public void addSubRange(RangeGenerator range)
      Sets the range identifier and adds a sub range to the ranges list.
      Parameters:
      range - range generator
    • generateResource

      public de.digitalcollections.iiif.model.sharedcanvas.Resource<de.digitalcollections.iiif.model.sharedcanvas.Range> generateResource()
      Description copied from interface: IIIFResource
      Creates and returns a resource model.
      Specified by:
      generateResource in interface IIIFResource
      Returns:
      resource model