Class SequenceBuilder
java.lang.Object
io.goobi.viewer.model.iiif.presentation.v2.builder.AbstractBuilder
io.goobi.viewer.model.iiif.presentation.v2.builder.SequenceBuilder
SequenceBuilder class.
- Author:
- Florian Alpers
-
Field Summary
Fields inherited from class io.goobi.viewer.model.iiif.presentation.v2.builder.AbstractBuilder
config, REQUIRED_SOLR_FIELDS, urls
-
Constructor Summary
ConstructorDescriptionSequenceBuilder
(AbstractApiUrlManager apiUrlManager) Constructor for SequenceBuilder. -
Method Summary
Modifier and TypeMethodDescriptionMap<de.intranda.api.iiif.presentation.enums.AnnotationType,
List<de.intranda.api.iiif.presentation.v2.AnnotationList>> addBaseSequence
(de.intranda.api.iiif.presentation.v2.Manifest2 manifest, StructElement doc, String manifestId, List<Integer> pagesToInclude, javax.servlet.http.HttpServletRequest request) Creates a sequence from all pages within the given doc and appends it to manifest.List<de.intranda.api.iiif.presentation.v2.AnnotationList>
addComments
(Map<Integer, de.intranda.api.iiif.presentation.v2.Canvas2> canvases, String pi, boolean populate) Adds a comment annotation to all cavases which contain comments.Map<de.intranda.api.iiif.presentation.enums.AnnotationType,
de.intranda.api.iiif.presentation.v2.AnnotationList> addOtherContent
(StructElement doc, PhysicalElement page, de.intranda.api.iiif.presentation.v2.Canvas2 canvas, boolean populate) addOtherContent.void
addRenderings
(PhysicalElement page, de.intranda.api.iiif.presentation.v2.Canvas2 canvas) void
addSeeAlsos
(de.intranda.api.iiif.presentation.v2.Canvas2 canvas, PhysicalElement page) addSeeAlsos.de.intranda.api.iiif.presentation.v2.Canvas2
generateCanvas
(String pi, PhysicalElement page) generateCanvas.Getter for the fieldbuildMode
.getPage
(StructElement doc, int order) getPage.Getter for the fieldpreferredView
.void
merge
(Map<de.intranda.api.iiif.presentation.enums.AnnotationType, List<de.intranda.api.iiif.presentation.v2.AnnotationList>> annotationMap, Map<de.intranda.api.iiif.presentation.enums.AnnotationType, de.intranda.api.iiif.presentation.v2.AnnotationList> content) merge.setBuildMode
(BuildMode buildMode) Setter for the fieldbuildMode
.setPreferedView
(PageType preferredView) Setter for the fieldpreferredView
.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
-
SequenceBuilder
Constructor for SequenceBuilder.
- Parameters:
apiUrlManager
-
-
-
Method Details
-
addBaseSequence
public Map<de.intranda.api.iiif.presentation.enums.AnnotationType,List<de.intranda.api.iiif.presentation.v2.AnnotationList>> addBaseSequence(de.intranda.api.iiif.presentation.v2.Manifest2 manifest, StructElement doc, String manifestId, List<Integer> pagesToInclude, javax.servlet.http.HttpServletRequest request) throws URISyntaxException, PresentationException, IndexUnreachableException, DAOException, ViewerConfigurationException Creates a sequence from all pages within the given doc and appends it to manifest.- Parameters:
manifest
- The manifest to include the sequence. May be nulldoc
- aStructElement
object.manifestId
- aString
object.pagesToInclude
-request
-- Returns:
- a
Map
object. - Throws:
URISyntaxException
- if any.PresentationException
- if any.IndexUnreachableException
- if any.DAOException
- if any.ViewerConfigurationException
- if any.
-
addSeeAlsos
public void addSeeAlsos(de.intranda.api.iiif.presentation.v2.Canvas2 canvas, PhysicalElement page) throws URISyntaxException, ViewerConfigurationException addSeeAlsos.
- Parameters:
canvas
- aCanvas2
object.page
- aPhysicalElement
object.- Throws:
URISyntaxException
- if any.ViewerConfigurationException
- if any.
-
addRenderings
public void addRenderings(PhysicalElement page, de.intranda.api.iiif.presentation.v2.Canvas2 canvas) - Parameters:
page
-canvas
-
-
addComments
public List<de.intranda.api.iiif.presentation.v2.AnnotationList> addComments(Map<Integer, de.intranda.api.iiif.presentation.v2.Canvas2> canvases, String pi, boolean populate) throws DAOException, URISyntaxException, ViewerConfigurationExceptionAdds a comment annotation to all cavases which contain comments.- Parameters:
canvases
- All canvases which may get comments, mapped by their page orderpi
- The pi of the work containing the pagespopulate
- if true, the actual annotations will be included in the resources property- Returns:
- a map with the list of all annotationlists (one list per page)
- Throws:
DAOException
- if any.URISyntaxException
- if any.ViewerConfigurationException
- if any.
-
merge
public void merge(Map<de.intranda.api.iiif.presentation.enums.AnnotationType, List<de.intranda.api.iiif.presentation.v2.AnnotationList>> annotationMap, Map<de.intranda.api.iiif.presentation.enums.AnnotationType, de.intranda.api.iiif.presentation.v2.AnnotationList> content) merge.
-
getPage
public PhysicalElement getPage(StructElement doc, int order) throws IndexUnreachableException, DAOException, PresentationException getPage.
- Parameters:
doc
- aStructElement
object.order
- a int.- Returns:
- a
PhysicalElement
object. - Throws:
IndexUnreachableException
- if any.DAOException
- if any.PresentationException
-
generateCanvas
public de.intranda.api.iiif.presentation.v2.Canvas2 generateCanvas(String pi, PhysicalElement page) throws URISyntaxException, ViewerConfigurationException, IndexUnreachableException, PresentationException generateCanvas.
- Parameters:
pi
- Record identifierpage
- aPhysicalElement
object.- Returns:
- a
Canvas2
object. - Throws:
URISyntaxException
- if any.ViewerConfigurationException
- if any.IndexUnreachableException
- if any.PresentationException
- if any.
-
addOtherContent
public Map<de.intranda.api.iiif.presentation.enums.AnnotationType,de.intranda.api.iiif.presentation.v2.AnnotationList> addOtherContent(StructElement doc, PhysicalElement page, de.intranda.api.iiif.presentation.v2.Canvas2 canvas, boolean populate) throws URISyntaxException, IndexUnreachableException, ViewerConfigurationException addOtherContent.
- Parameters:
doc
- aStructElement
object.page
- aPhysicalElement
object.canvas
- aCanvas2
object.populate
- a boolean.- Returns:
- a
Map
object. - Throws:
URISyntaxException
- if any.IndexUnreachableException
- if any.ViewerConfigurationException
- if any.
-
getBuildMode
Getter for the field
buildMode
.- Returns:
- the buildMode
-
setBuildMode
Setter for the field
buildMode
.- Parameters:
buildMode
- the buildMode to set- Returns:
- a
SequenceBuilder
object.
-
getPreferedView
Getter for the field
preferredView
.- Returns:
- the preferredView
-
setPreferedView
Setter for the field
preferredView
.- Parameters:
preferredView
- the preferredView to set- Returns:
- a
SequenceBuilder
object.
-