Class IIIFPresentationAPIHandler
java.lang.Object
io.goobi.viewer.controller.imaging.IIIFPresentationAPIHandler
Creates urls to IIIF Presentation api calls to get manifests, canvases, annotationLists or layers.
- Author:
- Florian Alpers
-
Constructor Summary
ConstructorsConstructorDescriptionIIIFPresentationAPIHandler(AbstractApiUrlManager urls, Configuration configuration) Creates a new IIIFPresentationAPIHandler instance. -
Method Summary
Modifier and TypeMethodDescriptiongetAnnotationsUrl(String pi, int pageOrder, String annotationType) Returns a IIIF annotation list containing all annotations of the given type for the given page.getCanvasUrl(String pi, int pageOrder) Returns the IIIF canvas for the given page.Returns the url to a IIIF collection resource containing all top level collections for the field DC.getCollectionUrl(String field) Returns the url to a IIIF collection resource containing all top level collections for the given field.getCollectionUrl(String field, String collection) Returns the url to a IIIF collection resource for the given collection name for the given field.getLayerUrl(String pi, String annotationType) Returns a IIIF layer with all annotations of the giventypewithin the work of the given pi.getManifestUrl(String pi) Returns the url to the manifest for the given pi.getPageManifestUrl(String pi, int pageNo) Returns the url to the manifest for the given pi.getRangeUrl(String pi, String logId) Returns a IIIF range representing the structural element for the given PI and logid.
-
Constructor Details
-
IIIFPresentationAPIHandler
public IIIFPresentationAPIHandler(AbstractApiUrlManager urls, Configuration configuration) throws URISyntaxException Creates a new IIIFPresentationAPIHandler instance.- Parameters:
urls- API URL manager for building IIIF resource URLsconfiguration- viewer configuration used to initialize the builder- Throws:
URISyntaxException- if any.
-
-
Method Details
-
getPageManifestUrl
Returns the url to the manifest for the given pi.- Parameters:
pi- persistent identifier of the recordpageNo- physical page number- Returns:
- The IIIF manifest
- Throws:
URISyntaxException- if any.
-
getManifestUrl
Returns the url to the manifest for the given pi.- Parameters:
pi- persistent identifier of the record- Returns:
- The IIIF manifest
- Throws:
URISyntaxException- if any.
-
getCollectionUrl
Returns the url to a IIIF collection resource containing all top level collections for the field DC.- Returns:
- The IIIF collection url
- Throws:
URISyntaxException- if any.
-
getCollectionUrl
Returns the url to a IIIF collection resource containing all top level collections for the given field.- Parameters:
field- Solr field name identifying the collection hierarchy- Returns:
- The IIIF collection url
- Throws:
URISyntaxException- if any.
-
getCollectionUrl
Returns the url to a IIIF collection resource for the given collection name for the given field.- Parameters:
field- Solr field name identifying the collection hierarchycollection- collection name within the field hierarchy- Returns:
- The IIIF collection url
- Throws:
URISyntaxException- if any.
-
getLayerUrl
Returns a IIIF layer with all annotations of the giventypewithin the work of the given pi.- Parameters:
pi- persistent identifier of the recordannotationType- name of the annotation type to filter by- Returns:
- The IIIF layer url
- Throws:
URISyntaxException- if any.
-
getAnnotationsUrl
public String getAnnotationsUrl(String pi, int pageOrder, String annotationType) throws URISyntaxException Returns a IIIF annotation list containing all annotations of the given type for the given page.- Parameters:
pi- persistent identifier of the recordpageOrder- physical page order numberannotationType- name of the annotation type to filter by- Returns:
- The IIIF annotation list
- Throws:
URISyntaxException- if any.
-
getCanvasUrl
Returns the IIIF canvas for the given page.- Parameters:
pi- persistent identifier of the recordpageOrder- physical page order number- Returns:
- The IIIF canvas url
- Throws:
URISyntaxException- if any.
-
getRangeUrl
Returns a IIIF range representing the structural element for the given PI and logid. If the logid is the logid of the work itself, The "CONTENT" range is returned, containing all topmost ranges but no canvases and no metadata- Parameters:
pi- persistent identifier of the recordlogId- logical structure element identifier- Returns:
- The IIIF range url
- Throws:
URISyntaxException- if any.
-