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
FieldsFields inherited from class io.goobi.viewer.model.iiif.presentation.v2.builder.AbstractBuilder
config, REQUIRED_SOLR_FIELDS, urls -
Constructor Summary
ConstructorsConstructorDescriptionSequenceBuilder(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, jakarta.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.voidaddRenderings(PhysicalElement page, de.intranda.api.iiif.presentation.v2.Canvas2 canvas) voidaddSeeAlsos(de.intranda.api.iiif.presentation.v2.Canvas2 canvas, PhysicalElement page) addSeeAlsos.de.intranda.api.iiif.presentation.v2.Canvas2generateCanvas(String pi, PhysicalElement page) generateCanvas.Getter for the fieldbuildMode.getPage(StructElement doc, int order) getPage.Getter for the fieldpreferredView.voidmerge(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, jakarta.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- aStructElementobject.manifestId- aStringobject.pagesToInclude-request-- Returns:
- a
Mapobject. - 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- aCanvas2object.page- aPhysicalElementobject.- 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- aStructElementobject.order- a int.- Returns:
- a
PhysicalElementobject. - 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, DAOException generateCanvas.
- Parameters:
pi- Record identifierpage- aPhysicalElementobject.- Returns:
- a
Canvas2object. - Throws:
URISyntaxException- if any.ViewerConfigurationException- if any.IndexUnreachableException- if any.PresentationException- if any.DAOException
-
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- aStructElementobject.page- aPhysicalElementobject.canvas- aCanvas2object.populate- a boolean.- Returns:
- a
Mapobject. - 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
SequenceBuilderobject.
-
getPreferedView
Getter for the field
preferredView.- Returns:
- the preferredView
-
setPreferedView
Setter for the field
preferredView.- Parameters:
preferredView- the preferredView to set- Returns:
- a
SequenceBuilderobject.
-