Package org.dspace.app.iiif.service
Class CanvasService
- java.lang.Object
-
- org.dspace.app.iiif.service.AbstractResourceService
-
- org.dspace.app.iiif.service.CanvasService
-
@RequestScope @Component public class CanvasService extends AbstractResourceService
This service provides methods for creatingCanvases. There should be a single instance of this service per request. The@RequestScopeprovides 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 Modifier and Type Field Description protected String[]BITSTREAM_METADATA_FIELDS-
Fields inherited from class org.dspace.app.iiif.service.AbstractResourceService
BITSTREAM_PATH_PREFIX, CLIENT_URL, DEFAULT_CANVAS_HEIGHT, DEFAULT_CANVAS_HEIGHT_FALLBACK, DEFAULT_CANVAS_WIDTH, DEFAULT_CANVAS_WIDTH_FALLBACK, DOCUMENT_VIEWING_HINT, IIIF_ENDPOINT, IIIF_LOGO_IMAGE, IMAGE_PATH, IMAGE_SERVICE, SEARCH_URL, THUMBNAIL_PATH
-
-
Constructor Summary
Constructors Constructor Description CanvasService(org.dspace.services.ConfigurationService configurationService)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected CanvasGeneratorgetCanvas(Context context, String manifestId, Bitstream bitstream, Bundle bundle, Item item, int count, String mimeType)Creates a singleCanvasGenerator.protected CanvasGeneratorgetRangeCanvasReference(String startCanvas)Ranges expect the Canvas object to have only an identifier.-
Methods inherited from class org.dspace.app.iiif.service.AbstractResourceService
getManifestId, setConfiguration
-
-
-
-
Field Detail
-
BITSTREAM_METADATA_FIELDS
protected String[] BITSTREAM_METADATA_FIELDS
-
-
Method Detail
-
getCanvas
protected CanvasGenerator getCanvas(Context context, String manifestId, Bitstream bitstream, Bundle bundle, Item item, int count, String mimeType)
Creates a singleCanvasGenerator.- Parameters:
context- DSpace ContextmanifestId- manifest idbitstream- DSpace bitstreambundle- DSpace bundleitem- DSpace itemcount- the canvas position in the sequence.mimeType- bitstream mimetype- Returns:
- a canvas generator
-
getRangeCanvasReference
protected CanvasGenerator getRangeCanvasReference(String startCanvas)
Ranges expect the Canvas object to have only an identifier.- Parameters:
startCanvas- the start canvas identifier- Returns:
- canvas generator
-
-