Class RangeGenerator
java.lang.Object
org.dspace.app.iiif.model.generator.RangeGenerator
- All Implemented Interfaces:
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 Summary
ConstructorsConstructorDescriptionRangeGenerator(RangeService rangeService) TheRangeServiceis used for defining hierarchical sub ranges. -
Method Summary
Modifier and TypeMethodDescriptionaddCanvas(CanvasGenerator canvas) Adds canvas to range canvas list.voidaddSubRange(RangeGenerator range) Sets the range identifier and adds a sub range to the ranges list.addViewingHint(String hint) de.digitalcollections.iiif.model.sharedcanvas.Resource<de.digitalcollections.iiif.model.sharedcanvas.Range>Creates and returns a resource model.setIdentifier(@NotNull String identifier) Sets mandatory range identifier.Sets the optional range label.
-
Constructor Details
-
RangeGenerator
TheRangeServiceis used for defining hierarchical sub ranges.- Parameters:
rangeService- range service
-
-
Method Details
-
setIdentifier
Sets mandatory range identifier.- Parameters:
identifier- range identifier
-
getIdentifier
-
setLabel
Sets the optional range label.- Parameters:
label- range label
-
addViewingHint
-
addCanvas
Adds canvas to range canvas list.- Parameters:
canvas- list of canvas generators
-
addSubRange
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
-