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 IIIFranges. 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 Summary
Constructors Constructor Description RangeGenerator(RangeService rangeService)TheRangeServiceis used for defining hierarchical sub ranges.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RangeGeneratoraddCanvas(CanvasGenerator canvas)Adds canvas to range canvas list.voidaddSubRange(RangeGenerator range)Sets the range identifier and adds a sub range to the ranges list.RangeGeneratoraddViewingHint(String hint)de.digitalcollections.iiif.model.sharedcanvas.Resource<de.digitalcollections.iiif.model.sharedcanvas.Range>generateResource()Creates and returns a resource model.StringgetIdentifier()RangeGeneratorsetIdentifier(@NotNull String identifier)Sets mandatory range identifier.RangeGeneratorsetLabel(String label)Sets the optional range label.
-
-
-
Constructor Detail
-
RangeGenerator
public RangeGenerator(RangeService rangeService)
TheRangeServiceis used for defining hierarchical sub ranges.- Parameters:
rangeService- range service
-
-
Method Detail
-
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:IIIFResourceCreates and returns a resource model.- Specified by:
generateResourcein interfaceIIIFResource- Returns:
- resource model
-
-