Class AnnotationResource

java.lang.Object
io.goobi.viewer.api.rest.v1.annotations.AnnotationResource

@Path("/annotations") public class AnnotationResource extends Object
Author:
florian
  • Constructor Details

    • AnnotationResource

      public AnnotationResource()
  • Method Details

    • getAnnotationCollection

      @GET @Produces("application/json") public de.intranda.api.annotation.wa.collection.AnnotationCollection getAnnotationCollection() throws PresentationException, IndexUnreachableException
      Returns:
      AnnotationCollection
      Throws:
      DAOException
      IndexUnreachableException
      PresentationException
    • getAnnotationCollectionPage

      @GET @Path("/{page}") @Produces("application/json") public de.intranda.api.annotation.wa.collection.AnnotationPage getAnnotationCollectionPage(@PathParam("page") Integer page) throws de.unigoettingen.sub.commons.contentlib.exceptions.ContentLibException, DAOException
      Parameters:
      page -
      Returns:
      <a>
      Throws:
      DAOException
      de.unigoettingen.sub.commons.contentlib.exceptions.ContentLibException
      IndexUnreachableException
      PresentationException
    • getAnnotation

      @GET @Path("/annotation_{id}") @Produces("application/json") public de.intranda.api.annotation.IAnnotation getAnnotation(@PathParam("id") Long id) throws DAOException, de.unigoettingen.sub.commons.contentlib.exceptions.ContentLibException
      Parameters:
      id -
      Returns:
      IAnnotation
      Throws:
      DAOException
      de.unigoettingen.sub.commons.contentlib.exceptions.ContentLibException
      IndexUnreachableException
      PresentationException
    • getComment

      @GET @Path("/comment_{id}") @Produces("application/json") public de.intranda.api.annotation.IAnnotation getComment(@PathParam("id") Long id) throws DAOException, de.unigoettingen.sub.commons.contentlib.exceptions.ContentLibException
      Parameters:
      id -
      Returns:
      IAnnotation
      Throws:
      DAOException
      de.unigoettingen.sub.commons.contentlib.exceptions.ContentLibException
      IndexUnreachableException
      PresentationException
    • addAnnotation

      @POST @Consumes("application/json") @Produces("application/json") public de.intranda.api.annotation.IAnnotation addAnnotation(de.intranda.api.annotation.IncomingAnnotation anno) throws DAOException, NotImplementedException
      Parameters:
      anno -
      Returns:
      IAnnotation
      Throws:
      DAOException
      NotImplementedException
    • deleteAnnotation

      @DELETE @Path("/annotation_{id}") @Produces("application/json") public de.intranda.api.annotation.IAnnotation deleteAnnotation(@PathParam("id") Long id) throws DAOException, de.unigoettingen.sub.commons.contentlib.exceptions.ContentLibException
      Parameters:
      id -
      Returns:
      IAnnotation
      Throws:
      DAOException
      de.unigoettingen.sub.commons.contentlib.exceptions.ContentLibException
      ViewerConfigurationException
    • createPersistentAnnotation

      public CrowdsourcingAnnotation createPersistentAnnotation(de.intranda.api.annotation.IAnnotation anno)
      Parameters:
      anno -
      Returns:
      CrowdsourcingAnnotation
    • getUser

      public User getUser()
      Returns:
      User from session