Class RecordResource
java.lang.Object
io.goobi.viewer.api.rest.v1.records.RecordResource
- Author:
- florian
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionde.intranda.api.iiif.search.AutoSuggestResultautoCompleteInManifest(String pi, String query, String motivation, String date, String user, Integer page) autoCompleteInManifest.deleteRecord(Boolean createTraceDocument) deleteRecord.getAlto()jakarta.ws.rs.core.StreamingOutputde.intranda.api.annotation.IAnnotationCollectiongetAnnotationsForRecord(String format) static BuildModegetBuildeMode(String mode) getCmdiLanguage(String language) de.intranda.api.annotation.wa.collection.AnnotationPagede.intranda.api.annotation.IAnnotationCollectiongetCommentsForRecord(String format) de.intranda.api.iiif.presentation.IPresentationModelElementde.intranda.api.iiif.presentation.IPresentationModelElementgetManifest(String mode) getNERTags(Integer start, Integer end, Integer stepSize, String type) jakarta.ws.rs.core.StreamingOutputjakarta.ws.rs.core.ResponsegetRecordMetadataAsJson(String pi, String template) getRISAsText.jakarta.ws.rs.core.StreamingOutputgetTei()jakarta.ws.rs.core.StreamingOutputgetTeiAsZip(String language) getTeiLanguage(String language) de.intranda.api.iiif.search.SearchResultsearchInManifest(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 jakarta.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:
PresentationExceptionIndexUnreachableExceptionDAOExceptionde.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
Stringobject. - 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:
PresentationExceptionIndexUnreachableExceptionde.unigoettingen.sub.commons.contentlib.exceptions.ContentNotFoundExceptionDAOExceptionViewerConfigurationException
-
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:
DAOExceptionde.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException
-
getSource
@GET @Path("/metadata/source") @Produces("text/xml") public jakarta.ws.rs.core.StreamingOutput getSource() throws de.unigoettingen.sub.commons.contentlib.exceptions.ContentNotFoundException, PresentationException, IndexUnreachableException- Throws:
de.unigoettingen.sub.commons.contentlib.exceptions.ContentNotFoundExceptionPresentationExceptionIndexUnreachableException
-
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.ContentNotFoundExceptionPresentationExceptionIndexUnreachableExceptionURISyntaxExceptionViewerConfigurationExceptionDAOException
-
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.ContentNotFoundExceptionPresentationExceptionIndexUnreachableExceptionURISyntaxExceptionViewerConfigurationExceptionDAOExceptionde.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestExceptionIOException
-
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 jakarta.ws.rs.core.StreamingOutput getPlaintextAsZip() throws PresentationException, IndexUnreachableException, IOException, de.unigoettingen.sub.commons.contentlib.exceptions.ContentLibException- Throws:
PresentationExceptionIndexUnreachableExceptionIOExceptionde.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:
PresentationExceptionIndexUnreachableExceptionIOExceptionde.unigoettingen.sub.commons.contentlib.exceptions.ContentLibException
-
getAltoAsZip
@GET @Path("/alto.zip") @Produces("application/zip") public jakarta.ws.rs.core.StreamingOutput getAltoAsZip() throws PresentationException, IndexUnreachableException, IOException, de.unigoettingen.sub.commons.contentlib.exceptions.ContentLibException- Throws:
PresentationExceptionIndexUnreachableExceptionIOExceptionde.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:
PresentationExceptionIndexUnreachableExceptionIOExceptionde.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:
PresentationExceptionIndexUnreachableExceptionIOExceptionde.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:
PresentationExceptionIndexUnreachableExceptionIOExceptionde.unigoettingen.sub.commons.contentlib.exceptions.ContentLibException
-
getTeiAsZip
@GET @Path("/tei.zip") @Produces("application/zip") public jakarta.ws.rs.core.StreamingOutput getTeiAsZip(@QueryParam("lang") String language) throws PresentationException, IndexUnreachableException, IOException, de.unigoettingen.sub.commons.contentlib.exceptions.ContentLibException - Throws:
PresentationExceptionIndexUnreachableExceptionIOExceptionde.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
SearchResultcontaining 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- aStringobject.query- aStringobject.motivation- aStringobject.date- aStringobject.user- aStringobject.page- aIntegerobject.- Returns:
- a
AutoSuggestResultobject. - 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
-
getRecordMetadataAsJson
@GET @Path("/json/{template}") @Produces("application/json") public jakarta.ws.rs.core.Response getRecordMetadataAsJson(@PathParam("pi") String pi, @PathParam("template") String template) throws IndexUnreachableException, PresentationException - Parameters:
pi- Record identifiertemplate- JSON configuration template name- Returns:
Response- Throws:
IndexUnreachableExceptionPresentationException
-