Class ManifestBuilder
java.lang.Object
io.goobi.viewer.model.iiif.presentation.v2.builder.AbstractBuilder
io.goobi.viewer.model.iiif.presentation.v2.builder.ManifestBuilder
Builds IIIF Presentation API v2 Manifest resources from Solr index data and content files.
- Author:
- Florian Alpers
-
Field Summary
FieldsFields inherited from class io.goobi.viewer.model.iiif.presentation.v2.builder.AbstractBuilder
config, REQUIRED_SOLR_FIELDS, urls -
Constructor Summary
ConstructorsConstructorDescriptionManifestBuilder(AbstractApiUrlManager apiUrlManager) Creates a new ManifestBuilder instance. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAnchor.voidaddRenderings(de.intranda.api.iiif.presentation.v2.AbstractPresentationModelElement2 manifest, StructElement ele, Optional<PhysicalElement> page) voidaddSeeAlsos(de.intranda.api.iiif.presentation.v2.AbstractPresentationModelElement2 manifest, StructElement ele) voidaddVolumes(de.intranda.api.iiif.presentation.v2.Collection2 anchor, List<StructElement> volumes) addVolumes.de.intranda.api.iiif.presentation.v2.AbstractPresentationModelElement2generateManifest(StructElement ele, List<Integer> pagesToInclude) generateManifest.Getter for the fieldbuildMode.protected booleanisAltoAvailable(StructElement ele, Optional<PhysicalElement> page) protected booleanisHasPages(StructElement ele, Optional<PhysicalElement> page) protected booleanisPlaintextAvailable(StructElement ele, Optional<PhysicalElement> page) voidpopulate(StructElement ele, de.intranda.api.iiif.presentation.v2.AbstractPresentationModelElement2 manifest, List<PhysicalElement> pages) populate.setBuildMode(BuildMode buildMode) Setter for the fieldbuildMode.Methods inherited from class io.goobi.viewer.model.iiif.presentation.v2.builder.AbstractBuilder
absolutize, absolutize, addCrowdourcingAnnotations, addEventMetadataToWorkElement, addLanguageFields, addMetadata, addRendering, addSeeAlso, contained, getAnnotationListURI, getAnnotationListURI, getAnnotationURI, getAnnotationURI, getAttributions, getAutoCompleteServiceURI, getAutoSuggestURI, getCanvasURI, getCollectionURI, getCommentAnnotationURI, getDescription, getDocument, getDocumentWithChildren, getEventFields, getExternalManifestURI, getImageAnnotationURI, getLabel, getLabel, getLabelIfExists, getLayerURI, getLidoResolverUrl, getLocale, getManifestURI, getManifestURI, getMetsResolverUrl, getPageManifestURI, getPageOrderFromCanvasURI, getPIFromCanvasURI, getRangeURI, getRenderings, getSearchServiceURI, getSearchURI, getSeeAlsos, getSequenceURI, getSolrFieldList, getViewUrl
-
Field Details
-
imageDelivery
-
-
Constructor Details
-
ManifestBuilder
Creates a new ManifestBuilder instance.- Parameters:
apiUrlManager- API URL manager for building IIIF resource URIs
-
-
Method Details
-
generateManifest
public de.intranda.api.iiif.presentation.v2.AbstractPresentationModelElement2 generateManifest(StructElement ele, List<Integer> pagesToInclude) throws URISyntaxException, PresentationException, IndexUnreachableException, ViewerConfigurationException, DAOException generateManifest.- Parameters:
ele- top-level structure element of the recordpagesToInclude- list of physical page orders to include; empty means all pages- Returns:
- the generated IIIF Manifest or Collection for the given structure element
- Throws:
URISyntaxException- if any.PresentationException- if any.IndexUnreachableException- if any.ViewerConfigurationException- if any.DAOException- if any.
-
populate
public void populate(StructElement ele, de.intranda.api.iiif.presentation.v2.AbstractPresentationModelElement2 manifest, List<PhysicalElement> pages) throws ViewerConfigurationException, IndexUnreachableException, DAOException, PresentationException populate.- Parameters:
ele- structure element providing metadata and hierarchymanifest- IIIF presentation element to populate with datapages- resolved physical pages used for thumbnail and rendering links- Throws:
ViewerConfigurationException- if any.IndexUnreachableException- if any.DAOException- if any.PresentationException- if any.
-
addSeeAlsos
public void addSeeAlsos(de.intranda.api.iiif.presentation.v2.AbstractPresentationModelElement2 manifest, StructElement ele) -
addRenderings
public void addRenderings(de.intranda.api.iiif.presentation.v2.AbstractPresentationModelElement2 manifest, StructElement ele, Optional<PhysicalElement> page) - Parameters:
manifest- the manifest to add rendering links toele- the top-level structure element of the recordpage- optional single page; if present, page-level rendering URLs are used- Throws:
URISyntaxException
-
isPlaintextAvailable
-
isAltoAvailable
-
isHasPages
-
addVolumes
public void addVolumes(de.intranda.api.iiif.presentation.v2.Collection2 anchor, List<StructElement> volumes) addVolumes.- Parameters:
anchor- IIIF collection representing the anchor recordvolumes- list of volume structure elements to add as manifests
-
addAnchor
public void addAnchor(de.intranda.api.iiif.presentation.v2.Manifest2 manifest, String anchorPI) throws PresentationException, IndexUnreachableException, URISyntaxException, DAOException addAnchor.- Parameters:
manifest- volume manifest to add the anchor reference toanchorPI- persistent identifier of the anchor record- Throws:
PresentationException- if any.IndexUnreachableException- if any.URISyntaxException- if any.DAOException- if any.
-
getBuildMode
Getter for the fieldbuildMode.- Returns:
- the build mode controlling which parts of the manifest are generated
-
setBuildMode
Setter for the fieldbuildMode.- Parameters:
buildMode- the build mode controlling which parts of the manifest are generated- Returns:
- this ManifestBuilder instance for method chaining
-