Class RecordResource
java.lang.Object
io.goobi.viewer.api.rest.v1.records.RecordResource
- Author:
- florian
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionde.intranda.api.iiif.search.AutoSuggestResult
autoCompleteInManifest
(String pi, String query, String motivation, String date, String user, Integer page) autoCompleteInManifest.deleteRecord
(Boolean createTraceDocument) deleteRecord.getAlto()
javax.ws.rs.core.StreamingOutput
de.intranda.api.annotation.IAnnotationCollection
getAnnotationsForRecord
(String format) static BuildMode
getBuildeMode
(String mode) getCmdiLanguage
(String language) de.intranda.api.annotation.wa.collection.AnnotationPage
de.intranda.api.annotation.IAnnotationCollection
getCommentsForRecord
(String format) de.intranda.api.iiif.presentation.IPresentationModelElement
de.intranda.api.iiif.presentation.IPresentationModelElement
getManifest
(String mode) getNERTags
(Integer start, Integer end, Integer stepSize, String type) javax.ws.rs.core.StreamingOutput
getRISAsText.javax.ws.rs.core.StreamingOutput
getTei()
javax.ws.rs.core.StreamingOutput
getTeiAsZip
(String language) getTeiLanguage
(String language) de.intranda.api.iiif.search.SearchResult
searchInManifest
(String pi, String query, String motivation, String date, String user, Integer page) Endpoint for IIIF Search API service in a manifest.
-
Constructor Details
-
RecordResource
public RecordResource(@Context javax.servlet.http.HttpServletRequest request, @PathParam("pi") String pi)
-
-
Method Details
-
getRISAsFile
@GET @Path("/ris") @Produces("text/plain") public String getRISAsFile() throws PresentationException, IndexUnreachableException, DAOException, de.unigoettingen.sub.commons.contentlib.exceptions.ContentLibException- Throws:
PresentationException
IndexUnreachableException
DAOException
de.unigoettingen.sub.commons.contentlib.exceptions.ContentLibException
-
getRISAsText
@GET @Path("/ris.txt") @Produces("text/plain") public String getRISAsText() throws PresentationException, IndexUnreachableException, de.unigoettingen.sub.commons.contentlib.exceptions.ContentNotFoundException, DAOExceptiongetRISAsText.
- Returns:
- a
String
object. - Throws:
PresentationException
- if any.IndexUnreachableException
- if any.de.unigoettingen.sub.commons.contentlib.exceptions.ContentNotFoundException
- if any.DAOException
- if any.
-
getTOCAsText
@GET @Path("/toc") @Produces("text/plain") public String getTOCAsText() throws PresentationException, IndexUnreachableException, de.unigoettingen.sub.commons.contentlib.exceptions.ContentNotFoundException, DAOException, ViewerConfigurationException- Throws:
PresentationException
IndexUnreachableException
de.unigoettingen.sub.commons.contentlib.exceptions.ContentNotFoundException
DAOException
ViewerConfigurationException
-
getAnnotationsForRecord
@GET @Path("/annotations") @Produces("application/json") public de.intranda.api.annotation.IAnnotationCollection getAnnotationsForRecord(@QueryParam("format") String format) throws DAOException - Throws:
DAOException
-
getCommentsForRecord
@GET @Path("/comments") @Produces("application/json") public de.intranda.api.annotation.IAnnotationCollection getCommentsForRecord(@QueryParam("format") String format) throws DAOException - Throws:
DAOException
-
getCommentPageForRecord
@GET @Path("/comments/{page}") @Produces("application/json") public de.intranda.api.annotation.wa.collection.AnnotationPage getCommentPageForRecord(@PathParam("page") Integer page) throws DAOException, de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException - Throws:
DAOException
de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException
-
getSource
@GET @Path("/metadata/source") @Produces("text/xml") public javax.ws.rs.core.StreamingOutput getSource() throws de.unigoettingen.sub.commons.contentlib.exceptions.ContentNotFoundException, PresentationException, IndexUnreachableException- Throws:
de.unigoettingen.sub.commons.contentlib.exceptions.ContentNotFoundException
PresentationException
IndexUnreachableException
-
getManifest
@GET @Path("/manifest") @Produces("application/json") public de.intranda.api.iiif.presentation.IPresentationModelElement getManifest(@QueryParam("mode") String mode) throws de.unigoettingen.sub.commons.contentlib.exceptions.ContentNotFoundException, PresentationException, IndexUnreachableException, URISyntaxException, ViewerConfigurationException, DAOException - Throws:
de.unigoettingen.sub.commons.contentlib.exceptions.ContentNotFoundException
PresentationException
IndexUnreachableException
URISyntaxException
ViewerConfigurationException
DAOException
-
getLayer
@GET @Path("/layers/{name}") @Produces("application/json") public de.intranda.api.iiif.presentation.IPresentationModelElement getLayer(@PathParam("name") String layerName, @QueryParam("mode") String mode) throws de.unigoettingen.sub.commons.contentlib.exceptions.ContentNotFoundException, PresentationException, IndexUnreachableException, URISyntaxException, ViewerConfigurationException, DAOException, de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException, IOException - Throws:
de.unigoettingen.sub.commons.contentlib.exceptions.ContentNotFoundException
PresentationException
IndexUnreachableException
URISyntaxException
ViewerConfigurationException
DAOException
de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException
IOException
-
getNERTags
@GET @Path("/ner/tags") @Produces("application/json") public DocumentReference getNERTags(@QueryParam("start") Integer start, @QueryParam("end") Integer end, @QueryParam("step") Integer stepSize, @QueryParam("type") String type) throws PresentationException, IndexUnreachableException -
getPlaintext
@GET @Path("/plaintext") @Produces("text/plain") public String getPlaintext() throws PresentationException, IndexUnreachableException, IOException -
getPlaintextAsZip
@GET @Path("/plaintext.zip") @Produces("application/zip") public javax.ws.rs.core.StreamingOutput getPlaintextAsZip() throws PresentationException, IndexUnreachableException, IOException, de.unigoettingen.sub.commons.contentlib.exceptions.ContentLibException- Throws:
PresentationException
IndexUnreachableException
IOException
de.unigoettingen.sub.commons.contentlib.exceptions.ContentLibException
-
getAlto
@GET @Path("/alto") @Produces("text/xml") public String getAlto() throws PresentationException, IndexUnreachableException, IOException, de.unigoettingen.sub.commons.contentlib.exceptions.ContentLibException- Throws:
PresentationException
IndexUnreachableException
IOException
de.unigoettingen.sub.commons.contentlib.exceptions.ContentLibException
-
getAltoAsZip
@GET @Path("/alto.zip") @Produces("application/zip") public javax.ws.rs.core.StreamingOutput getAltoAsZip() throws PresentationException, IndexUnreachableException, IOException, de.unigoettingen.sub.commons.contentlib.exceptions.ContentLibException- Throws:
PresentationException
IndexUnreachableException
IOException
de.unigoettingen.sub.commons.contentlib.exceptions.ContentLibException
-
getCmdiLanguage
@GET @Path("/cmdi/{lang}") @Produces("text/xml") public String getCmdiLanguage(@PathParam("lang") String language) throws PresentationException, IndexUnreachableException, IOException, de.unigoettingen.sub.commons.contentlib.exceptions.ContentLibException - Throws:
PresentationException
IndexUnreachableException
IOException
de.unigoettingen.sub.commons.contentlib.exceptions.ContentLibException
-
getTeiLanguage
@GET @Path("/tei/{lang}") @Produces("text/xml") public String getTeiLanguage(@PathParam("lang") String language) throws PresentationException, IndexUnreachableException, IOException, de.unigoettingen.sub.commons.contentlib.exceptions.ContentLibException - Throws:
PresentationException
IndexUnreachableException
IOException
de.unigoettingen.sub.commons.contentlib.exceptions.ContentLibException
-
getTei
@GET @Path("/tei") @Produces("text/xml") public String getTei() throws PresentationException, IndexUnreachableException, IOException, de.unigoettingen.sub.commons.contentlib.exceptions.ContentLibException- Throws:
PresentationException
IndexUnreachableException
IOException
de.unigoettingen.sub.commons.contentlib.exceptions.ContentLibException
-
getTeiAsZip
@GET @Path("/tei.zip") @Produces("application/zip") public javax.ws.rs.core.StreamingOutput getTeiAsZip(@QueryParam("lang") String language) throws PresentationException, IndexUnreachableException, IOException, de.unigoettingen.sub.commons.contentlib.exceptions.ContentLibException - Throws:
PresentationException
IndexUnreachableException
IOException
de.unigoettingen.sub.commons.contentlib.exceptions.ContentLibException
-
searchInManifest
@GET @Path("/manifest/search") @Produces("application/json") public de.intranda.api.iiif.search.SearchResult searchInManifest(@PathParam("pi") String pi, @QueryParam("q") String query, @QueryParam("motivation") String motivation, @QueryParam("date") String date, @QueryParam("user") String user, @QueryParam("page") Integer page) throws IndexUnreachableException, PresentationException Endpoint for IIIF Search API service in a manifest. Depending on the given motivation parameters, fulltext (motivation=painting), user comments (motivation=commenting) and general (crowdsourcing-) annotations (motivation=describing) may be searched.- Parameters:
pi
- The pi of the manifest to searchquery
- The search query; a list of space separated terms. The search is for all complete words which match any of the query terms. Terms may contain the wildcard charachter '*' to represent an arbitrary number of characters within the wordmotivation
- a space separated list of motivations of annotations to search for. Search for the following motivations is implemented:- painting: fulltext resources
- non-painting: all supported resources except fulltext
- commenting: user comments
- describing: Crowdsourced or other general annotations
date
- not supported. If this parameter is given, it will be included in the 'ignored' property of the 'within' property of the answeruser
- not supported. If this parameter is given, it will be included in the 'ignored' property of the 'within' property of the answerpage
- the page number for paged result sets. if this is empty, page=1 is assumed- Returns:
- a
SearchResult
containing all annotations matching the query in the 'resources' property - Throws:
IndexUnreachableException
- if any.PresentationException
- if any.
-
autoCompleteInManifest
@GET @Path("/manifest/autocomplete") @Produces("application/json") public de.intranda.api.iiif.search.AutoSuggestResult autoCompleteInManifest(@PathParam("pi") String pi, @QueryParam("q") String query, @QueryParam("motivation") String motivation, @QueryParam("date") String date, @QueryParam("user") String user, @QueryParam("page") Integer page) throws IndexUnreachableException, PresentationException autoCompleteInManifest.
- Parameters:
pi
- aString
object.query
- aString
object.motivation
- aString
object.date
- aString
object.user
- aString
object.page
- aInteger
object.- Returns:
- a
AutoSuggestResult
object. - Throws:
IndexUnreachableException
- if any.PresentationException
- if any.
-
getBuildeMode
- Parameters:
mode
-- Returns:
BuildMode
-
deleteRecord
@DELETE @Produces("application/json") @Consumes("application/json") public String deleteRecord(@QueryParam("trace") Boolean createTraceDocument) deleteRecord.
- Parameters:
createTraceDocument
-- Returns:
- Short summary of files deleted
-