Class CanvasGenerator
java.lang.Object
org.dspace.app.iiif.model.generator.CanvasGenerator
- All Implemented Interfaces:
IIIFResource
This generator wraps the domain model for a single
Canvas.- Author:
- Michael Spalti mspalti@willamette.edu, Andrea Bollini (andrea.bollini at 4science.it)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddImage(de.digitalcollections.iiif.model.sharedcanvas.Resource<de.digitalcollections.iiif.model.ImageContent> imageContent) Add to the list of image content resources for the canvas.voidaddMetadata(String field, String value, String... rest) Adds single metadata field to Manifest.addThumbnail(de.digitalcollections.iiif.model.sharedcanvas.Resource<de.digitalcollections.iiif.model.ImageContent> thumbnail) Adds the thumbnail resource that will be assigned to the canvas.de.digitalcollections.iiif.model.sharedcanvas.Resource<de.digitalcollections.iiif.model.sharedcanvas.Canvas>Returns the canvas.setHeight(int height) Sets the canvas height.Adds a canvas label.setWidth(int width) Sets the canvas width.
-
Constructor Details
-
CanvasGenerator
Constructor- Parameters:
identifier- the canvas identifier
-
-
Method Details
-
getIdentifier
-
setLabel
Adds a canvas label.- Parameters:
label-
-
setHeight
Sets the canvas height. A canvas annotation with motivationsc:paintingmust have an pixel height.- Parameters:
height- canvas height in pixels
-
setWidth
Sets the canvas width. A canvas annotation with motivationsc:paintingmust have a pixel width.- Parameters:
width- canvas width in pixels
-
addMetadata
Adds single metadata field to Manifest.- Parameters:
field- property fieldvalue- property value
-
generateResource
public de.digitalcollections.iiif.model.sharedcanvas.Resource<de.digitalcollections.iiif.model.sharedcanvas.Canvas> generateResource()Returns the canvas.- Specified by:
generateResourcein interfaceIIIFResource- Returns:
- canvas model
-