Package org.dspace.app.iiif.service
Class RangeService
java.lang.Object
org.dspace.app.iiif.service.AbstractResourceService
org.dspace.app.iiif.service.RangeService
This service provides methods for creating a
Range. There should be a single instance of this service
per request. The @RequestScope provides a single instance created and available during complete lifecycle
of the HTTP request.- Author:
- Michael Spalti mspalti@willamette.edu, Andrea Bollini (andrea.bollini at 4science.it)
-
Field Summary
Fields inherited from class org.dspace.app.iiif.service.AbstractResourceService
BITSTREAM_PATH_PREFIX, CLIENT_URL, DEFAULT_CANVAS_HEIGHT, DEFAULT_CANVAS_WIDTH, defaultCanvasHeightFallback, defaultCanvasWidthFallback, DOCUMENT_VIEWING_HINT, IIIF_ENDPOINT, IIIF_LOGO_IMAGE, IMAGE_PATH, IMAGE_SERVICE, SEARCH_URL, THUMBNAIL_PATH -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetRangeReference(RangeGenerator range) Ranges expect the sub-range to have only an identifier.Get the root range generator.Gets the current ranges.voidsetRootRange(String manifestId) Sets the root range generator to which sub-ranges will be added.voidupdateRanges(Bitstream bitstream, String bundleToCPrefix, CanvasGenerator canvas) Updates the current range and adds sub-ranges.Methods inherited from class org.dspace.app.iiif.service.AbstractResourceService
getManifestId, setConfiguration, setDefaultCanvasDimensions
-
Constructor Details
-
RangeService
public RangeService(org.dspace.services.ConfigurationService configurationService)
-
-
Method Details
-
getRootRange
Get the root range generator. This will contain table of contents entries.- Returns:
-
setRootRange
Sets the root range generator to which sub-ranges will be added.- Parameters:
manifestId- id of the manifest to which ranges will be added.
-
getTocRanges
Gets the current ranges.- Returns:
- map of toc ranges.
-
updateRanges
Updates the current range and adds sub-ranges.- Parameters:
bitstream- bitstream DSObundleToCPrefix- range prefix from bundle metadatacanvas- the current canvas generator
-
getRangeReference
Ranges expect the sub-range to have only an identifier.- Parameters:
range- the sub-range to reference- Returns:
- RangeGenerator able to create the reference
-