Class ManifestGenerator

  • All Implemented Interfaces:
    IIIFResource

    @RequestScope
    @Component
    public class ManifestGenerator
    extends Object
    implements IIIFResource
    This generator wraps a domain model for the Manifest.

    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 Detail

      • ManifestGenerator

        public ManifestGenerator()
    • 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
      • 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 optional seeAlso element 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 optional related field 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 field
        value - 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: IIIFResource
        Creates and returns a resource model.
        Specified by:
        generateResource in interface IIIFResource
        Returns:
        resource model