Class CanvasBuilder
java.lang.Object
io.goobi.viewer.model.iiif.presentation.v3.builder.AbstractBuilder
io.goobi.viewer.model.iiif.presentation.v3.builder.CanvasBuilder
- Author:
- Florian Alpers
-
Field Summary
Fields inherited from class io.goobi.viewer.model.iiif.presentation.v3.builder.AbstractBuilder
config, dataRetriever, request, thumbHeight, thumbWidth, urls, v1Builder -
Constructor Summary
ConstructorsConstructorDescriptionCanvasBuilder(AbstractApiUrlManager apiUrlManager, HttpServletRequest request) -
Method Summary
Modifier and TypeMethodDescriptionde.intranda.api.iiif.presentation.v3.Canvas3build(PhysicalElement page) de.intranda.api.iiif.presentation.v3.Canvas3de.intranda.api.annotation.wa.collection.AnnotationPagebuildFulltextAnnotations(String pi, int order) voidPre-fetches image dimensions (WIDTH, HEIGHT) for all pages of the given record in one Solr query.voidPre-fetches access permissions for all pages of the given record in one Solr query.Methods inherited from class io.goobi.viewer.model.iiif.presentation.v3.builder.AbstractBuilder
absolutize, absolutize, addMetadata, contained, createAnchorLink, createLabel, createRecordLink, escapeURI, getAnnotationListURI, getAnnotationListURI, getAnnotationURI, getAnnotationURI, getAttributions, getAutoCompleteServiceURI, getAutoSuggestURI, getCanvasURI, getCollectionURI, getCommentAnnotationURI, getDescription, getExternalManifestURI, getFilename, getImageAnnotationURI, getLabel, getLabel, getLabelIfExists, getLidoResolverUrl, getLocale, getManifestURI, getMetsResolverUrl, getPageOrderFromCanvasURI, getPIFromCanvasURI, getProvider, getRangeURI, getRequiredStatement, getRightsStatement, getSearchServiceURI, getSearchURI, getSolrFieldValue, getThumbnail, getThumbnail, getThumbnail, getThumbnail, getViewUrl, isAccessGranted, isAccessGranted
-
Constructor Details
-
CanvasBuilder
- Parameters:
apiUrlManager- URL manager providing API endpoint pathsrequest- current HTTP servlet request
-
-
Method Details
-
preparePagePermissions
Pre-fetches access permissions for all pages of the given record in one Solr query. Must be called before the page loop (fromManifestBuilder) to enable O(1) per-page lookups instead of O(n) Solr queries.- Parameters:
pi- persistent identifier of the record whose pages to pre-fetch
-
preparePageDimensions
Pre-fetches image dimensions (WIDTH, HEIGHT) for all pages of the given record in one Solr query. Must be called before the page loop (fromManifestBuilder) to avoid O(n) disk reads via ImageHandler.getImageInformation() in addImageResource().- Parameters:
pi- persistent identifier of the record whose page dimensions to pre-fetch
-
build
public de.intranda.api.iiif.presentation.v3.Canvas3 build(String pi, int order) throws PresentationException, IndexUnreachableException, de.unigoettingen.sub.commons.contentlib.exceptions.ContentLibException, URISyntaxException, DAOException - Parameters:
pi- persistent identifier of the recordorder- physical page order number of the canvas to build- Returns:
Canvas3- Throws:
PresentationExceptionIndexUnreachableExceptionde.unigoettingen.sub.commons.contentlib.exceptions.ContentLibExceptionURISyntaxExceptionDAOException
-
buildFulltextAnnotations
public de.intranda.api.annotation.wa.collection.AnnotationPage buildFulltextAnnotations(String pi, int order) throws de.unigoettingen.sub.commons.contentlib.exceptions.ContentLibException, URISyntaxException, PresentationException, IndexUnreachableException, DAOException - Parameters:
pi- persistent identifier of the recordorder- physical page order number whose fulltext annotations to build- Returns:
AnnotationPage- Throws:
de.unigoettingen.sub.commons.contentlib.exceptions.ContentLibExceptionURISyntaxExceptionPresentationExceptionIndexUnreachableExceptionDAOException
-
build
public de.intranda.api.iiif.presentation.v3.Canvas3 build(PhysicalElement page) throws de.unigoettingen.sub.commons.contentlib.exceptions.ContentLibException, URISyntaxException, PresentationException, IndexUnreachableException, DAOException - Parameters:
page- physical page element to build the canvas from- Returns:
Canvas3- Throws:
de.unigoettingen.sub.commons.contentlib.exceptions.ContentLibExceptionURISyntaxExceptionPresentationExceptionIndexUnreachableExceptionDAOException
-