Class ManifestGenerator
- java.lang.Object
-
- org.dspace.app.iiif.model.generator.ManifestGenerator
-
- All Implemented Interfaces:
IIIFResource
@RequestScope @Component public class ManifestGenerator extends Object implements IIIFResource
This generator wraps a domain model for theManifest.Please note that this is a request scoped bean. This mean that for each http request a different instance will be initialized by Spring and used to serve this specific request.
The Manifest is an overall description of the structure and properties of the digital representation of an object. It carries information needed for the viewer to present the digitized content to the user, such as a title and other descriptive information about the object or the intellectual work that it conveys. Each manifest describes how to present a single object such as a book, a photograph, or a statue.
Please note that this is a request scoped bean. This means that for each http request a different instance will be initialized by Spring and used to serve this specific request.- Author:
- Michael Spalti mspalti@willamette.edu, Andrea Bollini (andrea.bollini at 4science.it)
-
-
Constructor Summary
Constructors Constructor Description ManifestGenerator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddDescription(String value)Adds optional description to Manifest.voidaddLicense(String license)Adds an optional license to manifest.voidaddLogo(ImageContentGenerator logo)voidaddMetadata(String field, String value, String... rest)Adds a single metadata field to Manifest.voidaddRange(RangeGenerator rangeGenerator)Adds optional Range to the manifest's structures element.voidaddRelated(ExternalLinksGenerator related)Adds an optionalrelatedfield to the manifest.voidaddRendering(ExternalLinksGenerator otherContent)Adds a rendering annotation to the Sequence.voidaddSeeAlso(ExternalLinksGenerator seeAlso)Adds an optionalseeAlsoelement to Manifest.voidaddSequence(CanvasItemsGenerator sequence)Adds add single (mandatory) to the manifest.voidaddService(ContentSearchGenerator searchService)Adds optional search service to the manifest.voidaddThumbnail(ImageContentGenerator thumbnail)Adds optional thumbnail image resource to manifest.voidaddViewingHint(String viewingHint)Sets the viewing hint.de.digitalcollections.iiif.model.sharedcanvas.Resource<de.digitalcollections.iiif.model.sharedcanvas.Manifest>generateResource()Creates and returns a resource model.voidsetIdentifier(@NotNull String identifier)Sets the mandatory manifest identifier.voidsetLabel(String label)Sets the manifest label.
-
-
-
Method Detail
-
setIdentifier
public void setIdentifier(@NotNull @NotNull String identifier)Sets the mandatory manifest identifier.- Parameters:
identifier- manifest identifier
-
setLabel
public void setLabel(String label)
Sets the manifest label.- Parameters:
label- manifest label
-
addLogo
public void addLogo(ImageContentGenerator logo)
-
addViewingHint
public void addViewingHint(String viewingHint)
Sets the viewing hint. In IIIF Presentation API version 3.0 semantics this becomes the "behavior"- Parameters:
viewingHint- a viewing hint
-
addSequence
public void addSequence(CanvasItemsGenerator sequence)
Adds add single (mandatory) to the manifest. In IIIF Presentation API 3.0 "sequence" is replaced by "items"- Parameters:
sequence- canvas list model (sequence)
-
addSeeAlso
public void addSeeAlso(ExternalLinksGenerator seeAlso)
Adds an optionalseeAlsoelement to Manifest.- Parameters:
seeAlso- other content model
-
addThumbnail
public void addThumbnail(ImageContentGenerator thumbnail)
Adds optional thumbnail image resource to manifest.- Parameters:
thumbnail- an image content generator
-
addRelated
public void addRelated(ExternalLinksGenerator related)
Adds an optionalrelatedfield to the manifest.- Parameters:
related- other content generator
-
addService
public void addService(ContentSearchGenerator searchService)
Adds optional search service to the manifest.- Parameters:
searchService- search service generator
-
addMetadata
public void addMetadata(String field, String value, String... rest)
Adds a single metadata field to Manifest.- Parameters:
field- property fieldvalue- property value
-
addLicense
public void addLicense(String license)
Adds an optional license to manifest.- Parameters:
license- license terms
-
addDescription
public void addDescription(String value)
Adds optional description to Manifest.- Parameters:
value- the description value
-
addRange
public void addRange(RangeGenerator rangeGenerator)
Adds optional Range to the manifest's structures element.- Parameters:
rangeGenerator- to add
-
addRendering
public void addRendering(ExternalLinksGenerator otherContent)
Adds a rendering annotation to the Sequence. The rendering is a link to an external resource intended for display or download by a human user. This is typically going to be a PDF file.- Parameters:
otherContent- generator for the resource
-
generateResource
public de.digitalcollections.iiif.model.sharedcanvas.Resource<de.digitalcollections.iiif.model.sharedcanvas.Manifest> generateResource()
Description copied from interface:IIIFResourceCreates and returns a resource model.- Specified by:
generateResourcein interfaceIIIFResource- Returns:
- resource model
-
-