Class IIIFPresentation2ResourceBuilder
java.lang.Object
io.goobi.viewer.api.rest.resourcebuilders.IIIFPresentation2ResourceBuilder
- Author:
- florian
-
Constructor Summary
ConstructorDescriptionIIIFPresentation2ResourceBuilder
(AbstractApiUrlManager urls, javax.servlet.http.HttpServletRequest request) -
Method Summary
Modifier and TypeMethodDescriptionde.intranda.api.iiif.presentation.v2.Sequence
getBaseSequence
(String pi, BuildMode buildMode, String preferedViewName) de.intranda.api.iiif.presentation.IPresentationModelElement
de.intranda.api.iiif.presentation.v2.Collection2
getCollection
(String collectionField, String topElement, List<String> ignore) Returns a iiif collection of the given topCollection for the give collection field.Getter for the fieldcollectionBuilder
.de.intranda.api.iiif.presentation.v2.Collection2
getCollections
(String collectionField, List<String> ignore) Returns a iiif collection of all collections from the given solr-field.de.intranda.api.iiif.presentation.v2.Collection2
getCollectionsWithGrouping
(String collectionField, List<String> ignore, String groupingField) Returns a iiif collection of all collections from the given solr-field.de.intranda.api.iiif.presentation.v2.Collection2
getCollectionWithGrouping
(String collectionField, String topElement, String facetField, List<String> ignore) Returns a iiif collection of the given topCollection for the give collection field The response includes the metadata and subcollections of the direct child collections.de.intranda.api.iiif.presentation.v2.Layer
Getter for the fieldlayerBuilder
.de.intranda.api.iiif.presentation.IPresentationModelElement
getManifest
(String pi, List<Integer> pagesToInclude, BuildMode mode) Getter for the fieldmanifestBuilder
.List<de.intranda.api.iiif.presentation.IPresentationModelElement>
getManifestsForQuery
(String query, String sortFields, int first, int rows) getPreferedPageTypeForCanvas
(String preferredViewName) de.intranda.api.iiif.presentation.v2.Range2
Getter for the fieldsequenceBuilder
.
-
Constructor Details
-
IIIFPresentation2ResourceBuilder
public IIIFPresentation2ResourceBuilder(AbstractApiUrlManager urls, javax.servlet.http.HttpServletRequest request)
-
-
Method Details
-
getManifest
public de.intranda.api.iiif.presentation.IPresentationModelElement getManifest(String pi, List<Integer> pagesToInclude, BuildMode mode) throws PresentationException, IndexUnreachableException, de.unigoettingen.sub.commons.contentlib.exceptions.ContentNotFoundException, URISyntaxException, ViewerConfigurationException, DAOException - Parameters:
pi
-pagesToInclude
-mode
-- Returns:
IPresentationModelElement
- Throws:
PresentationException
IndexUnreachableException
de.unigoettingen.sub.commons.contentlib.exceptions.ContentNotFoundException
URISyntaxException
ViewerConfigurationException
DAOException
-
getRange
public de.intranda.api.iiif.presentation.v2.Range2 getRange(String pi, String logId) throws PresentationException, IndexUnreachableException, de.unigoettingen.sub.commons.contentlib.exceptions.ContentNotFoundException, URISyntaxException, ViewerConfigurationException, DAOException - Parameters:
pi
-logId
-- Returns:
Range2
- Throws:
PresentationException
IndexUnreachableException
de.unigoettingen.sub.commons.contentlib.exceptions.ContentNotFoundException
URISyntaxException
ViewerConfigurationException
DAOException
-
getBaseSequence
public de.intranda.api.iiif.presentation.v2.Sequence getBaseSequence(String pi, BuildMode buildMode, String preferedViewName) throws PresentationException, IndexUnreachableException, URISyntaxException, ViewerConfigurationException, DAOException, de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException, de.unigoettingen.sub.commons.contentlib.exceptions.ContentNotFoundException - Parameters:
pi
-buildMode
-preferedViewName
-- Returns:
Sequence
- Throws:
PresentationException
IndexUnreachableException
URISyntaxException
ViewerConfigurationException
DAOException
de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException
de.unigoettingen.sub.commons.contentlib.exceptions.ContentNotFoundException
-
getPreferedPageTypeForCanvas
- Parameters:
preferredViewName
-- Returns:
- Preferred
PageType
for given preferredViewName
-
getLayer
public de.intranda.api.iiif.presentation.v2.Layer getLayer(String pi, String typeName) throws PresentationException, IndexUnreachableException, URISyntaxException, ViewerConfigurationException, DAOException, de.unigoettingen.sub.commons.contentlib.exceptions.ContentNotFoundException, de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException, IOException - Parameters:
pi
-typeName
-- Returns:
Layer
- Throws:
PresentationException
IndexUnreachableException
URISyntaxException
ViewerConfigurationException
DAOException
de.unigoettingen.sub.commons.contentlib.exceptions.ContentNotFoundException
de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException
IOException
-
getCanvas
public de.intranda.api.iiif.presentation.IPresentationModelElement getCanvas(String pi, Integer pageNo) throws URISyntaxException, ViewerConfigurationException, de.unigoettingen.sub.commons.contentlib.exceptions.ContentNotFoundException, PresentationException, IndexUnreachableException, DAOException - Parameters:
pi
-pageNo
-- Returns:
IPresentationModelElement
- Throws:
ViewerConfigurationException
URISyntaxException
de.unigoettingen.sub.commons.contentlib.exceptions.ContentNotFoundException
IndexUnreachableException
PresentationException
DAOException
-
getManifestBuilder
Getter for the field
manifestBuilder
.- Returns:
- a
ManifestBuilder
object.
-
getSequenceBuilder
Getter for the field
sequenceBuilder
.- Returns:
- a
SequenceBuilder
object.
-
getLayerBuilder
Getter for the field
layerBuilder
.- Returns:
- a
LayerBuilder
object.
-
getCollections
public de.intranda.api.iiif.presentation.v2.Collection2 getCollections(String collectionField, List<String> ignore) throws PresentationException, IndexUnreachableException, URISyntaxException, ViewerConfigurationException, de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException Returns a iiif collection of all collections from the given solr-field. The response includes the metadata and subcollections of the topmost collections. Child collections may be accessed following the links in the @id properties in the member-collections Requires passing a language to set the language for all metadata values- Parameters:
collectionField
- aString
object.ignore
-- Returns:
- a
Collection2
object. - Throws:
PresentationException
- if any.IndexUnreachableException
- if any.URISyntaxException
- if any.ViewerConfigurationException
- if any.de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException
-
getCollectionsWithGrouping
public de.intranda.api.iiif.presentation.v2.Collection2 getCollectionsWithGrouping(String collectionField, List<String> ignore, String groupingField) throws PresentationException, IndexUnreachableException, URISyntaxException, ViewerConfigurationException, de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException Returns a iiif collection of all collections from the given solr-field. The response includes the metadata and subcollections of the topmost collections. Child collections may be accessed following the links in the @id properties in the member-collections Requires passing a language to set the language for all metadata values- Parameters:
collectionField
- aString
object.ignore
-groupingField
-- Returns:
- a
Collection2
object. - Throws:
PresentationException
- if any.IndexUnreachableException
- if any.URISyntaxException
- if any.ViewerConfigurationException
- if any.de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException
-
getCollection
public de.intranda.api.iiif.presentation.v2.Collection2 getCollection(String collectionField, String topElement, List<String> ignore) throws IndexUnreachableException, URISyntaxException, PresentationException, ViewerConfigurationException, de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException Returns a iiif collection of the given topCollection for the give collection field. The response includes the metadata and subcollections of the direct child collections. Collections further down the hierarchy may be accessed following the links in the @id properties in the member-collections Requires passing a language to set the language for all metadata values- Parameters:
collectionField
- aString
object.topElement
- aString
object.ignore
-- Returns:
- a
Collection2
object. - Throws:
IndexUnreachableException
- if any.URISyntaxException
- if any.PresentationException
- if any.ViewerConfigurationException
- if any.de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException
- If the topElement is not a collection
-
getManifestsForQuery
public List<de.intranda.api.iiif.presentation.IPresentationModelElement> getManifestsForQuery(String query, String sortFields, int first, int rows) throws DAOException, PresentationException, IndexUnreachableException, URISyntaxException, ViewerConfigurationException - Parameters:
query
-sortFields
-first
-rows
-- Returns:
- List
- Throws:
DAOException
PresentationException
IndexUnreachableException
URISyntaxException
ViewerConfigurationException
-
getCollectionWithGrouping
public de.intranda.api.iiif.presentation.v2.Collection2 getCollectionWithGrouping(String collectionField, String topElement, String facetField, List<String> ignore) throws IndexUnreachableException, URISyntaxException, PresentationException, ViewerConfigurationException, de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException Returns a iiif collection of the given topCollection for the give collection field The response includes the metadata and subcollections of the direct child collections. Collections further down the hierarchy may be accessed following the links in the @id properties in the member-collections Requires passing a language to set the language for all metadata values- Parameters:
collectionField
- aString
object.topElement
- aString
object.facetField
-ignore
-- Returns:
- a
Collection2
object. - Throws:
IndexUnreachableException
- if any.URISyntaxException
- if any.PresentationException
- if any.ViewerConfigurationException
- if any.de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException
- if the topElement is not a collection
-
getCollectionBuilder
Getter for the field
collectionBuilder
.- Returns:
- the manifestBuilder
-