Class AnnotationsResourceBuilder
java.lang.Object
io.goobi.viewer.api.rest.resourcebuilders.AnnotationsResourceBuilder
- Author:
- florian
-
Constructor Summary
ConstructorDescriptionAnnotationsResourceBuilder
(AbstractApiUrlManager urls, javax.servlet.http.HttpServletRequest request) Default constructor. -
Method Summary
Modifier and TypeMethodDescriptionOptional<de.intranda.api.annotation.wa.WebAnnotation>
getCommentWebAnnotation
(long id) de.intranda.api.annotation.IAnnotationCollection
getOAnnotationListForPage
(String pi, Integer pageNo, URI uri) de.intranda.api.iiif.presentation.v2.AnnotationList
getOAnnotationListForPageComments
(String pi, Integer pageNo, URI uri) de.intranda.api.iiif.presentation.v2.AnnotationList
getOAnnotationListForRecord
(String pi, URI uri) de.intranda.api.iiif.presentation.v2.AnnotationList
getOAnnotationListForRecordComments
(String pi, URI uri) Optional<de.intranda.api.annotation.oa.OpenAnnotation>
Optional<de.intranda.api.annotation.wa.WebAnnotation>
getWebAnnotation
(long id) de.intranda.api.annotation.wa.collection.AnnotationCollection
de.intranda.api.annotation.wa.collection.AnnotationCollection
getWebAnnotationCollectionForPage
(String pi, Integer pageNo, URI uri) de.intranda.api.annotation.wa.collection.AnnotationCollection
getWebAnnotationCollectionForPageComments
(String pi, int pageNo, URI uri) de.intranda.api.annotation.wa.collection.AnnotationCollection
getWebAnnotationCollectionForRecord
(String pi, URI uri) de.intranda.api.annotation.wa.collection.AnnotationCollection
de.intranda.api.annotation.wa.collection.AnnotationPage
getWebAnnotationPage
(Integer page) de.intranda.api.annotation.wa.collection.AnnotationPage
getWebAnnotationPageForPage
(String pi, Integer pageNo, URI uri, Integer page) de.intranda.api.annotation.wa.collection.AnnotationPage
getWebAnnotationPageForPageComments
(String pi, Integer pageNo, URI uri) de.intranda.api.annotation.wa.collection.AnnotationPage
getWebAnnotationPageForPageComments
(String pi, URI uri, Integer pageNo, Integer collectionPage) de.intranda.api.annotation.wa.collection.AnnotationPage
getWebAnnotationPageForRecord
(String pi, URI uri, Integer page) de.intranda.api.annotation.wa.collection.AnnotationPage
getWebAnnotationPageForRecordComments
(String pi, URI uri, Integer page)
-
Constructor Details
-
AnnotationsResourceBuilder
public AnnotationsResourceBuilder(AbstractApiUrlManager urls, javax.servlet.http.HttpServletRequest request) Default constructor.- Parameters:
urls
- TheApiUrlManager handling the creation of annotation urls/idsrequest
- Used to check access to restricted annotations. May be null, which prevents delivering any annotations with accessconditions other than OPENACCESS
-
-
Method Details
-
getWebAnnotationCollection
public de.intranda.api.annotation.wa.collection.AnnotationCollection getWebAnnotationCollection() throws PresentationException, IndexUnreachableException -
getWebAnnotationPage
public de.intranda.api.annotation.wa.collection.AnnotationPage getWebAnnotationPage(Integer page) throws de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException, DAOException - Parameters:
page
-- Returns:
AnnotationPage
- Throws:
de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException
DAOException
-
getWebAnnotationCollectionForRecord
public de.intranda.api.annotation.wa.collection.AnnotationCollection getWebAnnotationCollectionForRecord(String pi, URI uri) throws DAOException - Parameters:
pi
-uri
-- Returns:
AnnotationCollection
- Throws:
DAOException
-
getWebAnnotationCollectionForPage
public de.intranda.api.annotation.wa.collection.AnnotationCollection getWebAnnotationCollectionForPage(String pi, Integer pageNo, URI uri) throws DAOException - Parameters:
pi
-pageNo
-uri
-- Returns:
AnnotationCollection
- Throws:
DAOException
-
getOAnnotationListForRecord
public de.intranda.api.iiif.presentation.v2.AnnotationList getOAnnotationListForRecord(String pi, URI uri) throws DAOException - Parameters:
pi
-uri
-- Returns:
AnnotationList
- Throws:
DAOException
-
getOAnnotationListForPage
public de.intranda.api.annotation.IAnnotationCollection getOAnnotationListForPage(String pi, Integer pageNo, URI uri) throws DAOException - Parameters:
pi
-pageNo
-uri
-- Returns:
IAnnotationCollection
- Throws:
DAOException
-
getWebAnnotationPageForRecord
public de.intranda.api.annotation.wa.collection.AnnotationPage getWebAnnotationPageForRecord(String pi, URI uri, Integer page) throws DAOException, de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException - Parameters:
pi
-uri
-page
-- Returns:
AnnotationPage
- Throws:
DAOException
de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException
-
getWebAnnotationPageForPage
public de.intranda.api.annotation.wa.collection.AnnotationPage getWebAnnotationPageForPage(String pi, Integer pageNo, URI uri, Integer page) throws DAOException, de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException - Parameters:
pi
-pageNo
-uri
-page
-- Returns:
AnnotationPage
- Throws:
DAOException
de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException
-
getWebAnnotationCollectionForRecordComments
public de.intranda.api.annotation.wa.collection.AnnotationCollection getWebAnnotationCollectionForRecordComments(String pi, URI uri) throws DAOException - Parameters:
pi
-uri
-- Returns:
AnnotationCollection
- Throws:
DAOException
-
getWebAnnotationCollectionForPageComments
public de.intranda.api.annotation.wa.collection.AnnotationCollection getWebAnnotationCollectionForPageComments(String pi, int pageNo, URI uri) throws DAOException - Parameters:
pi
-pageNo
-uri
-- Returns:
AnnotationCollection
- Throws:
DAOException
-
getWebAnnotationPageForRecordComments
public de.intranda.api.annotation.wa.collection.AnnotationPage getWebAnnotationPageForRecordComments(String pi, URI uri, Integer page) throws DAOException, de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException - Parameters:
pi
-uri
-page
-- Returns:
AnnotationPage
- Throws:
DAOException
de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException
-
getWebAnnotationPageForPageComments
public de.intranda.api.annotation.wa.collection.AnnotationPage getWebAnnotationPageForPageComments(String pi, URI uri, Integer pageNo, Integer collectionPage) throws DAOException, de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException - Throws:
DAOException
de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException
-
getOAnnotationListForRecordComments
public de.intranda.api.iiif.presentation.v2.AnnotationList getOAnnotationListForRecordComments(String pi, URI uri) throws DAOException - Parameters:
pi
-uri
-- Returns:
AnnotationList
- Throws:
DAOException
-
getOAnnotationListForPageComments
public de.intranda.api.iiif.presentation.v2.AnnotationList getOAnnotationListForPageComments(String pi, Integer pageNo, URI uri) throws DAOException - Parameters:
pi
-pageNo
-uri
-- Returns:
AnnotationList
- Throws:
DAOException
-
getWebAnnotationPageForPageComments
public de.intranda.api.annotation.wa.collection.AnnotationPage getWebAnnotationPageForPageComments(String pi, Integer pageNo, URI uri) throws DAOException - Parameters:
pi
-pageNo
-uri
-- Returns:
AnnotationPage
- Throws:
DAOException
-
getWebAnnotation
public Optional<de.intranda.api.annotation.wa.WebAnnotation> getWebAnnotation(long id) throws DAOException - Parameters:
id
-- Returns:
- Optional
- Throws:
IndexUnreachableException
PresentationException
DAOException
-
getCommentWebAnnotation
public Optional<de.intranda.api.annotation.wa.WebAnnotation> getCommentWebAnnotation(long id) throws DAOException - Parameters:
id
-- Returns:
- Optional
- Throws:
DAOException
-
getOpenAnnotation
public Optional<de.intranda.api.annotation.oa.OpenAnnotation> getOpenAnnotation(Long id) throws DAOException - Parameters:
id
-- Returns:
- Optional
- Throws:
IndexUnreachableException
PresentationException
DAOException
-