Class DFGViewerImage

All Implemented Interfaces:
Servlet, ServletConfig, Serializable

public class DFGViewerImage extends HttpServlet implements Serializable
Servlet that delivers images in the format expected by the DFG Viewer image protocol.
Author:
Florian Alpers
See Also:
  • Constructor Details

    • DFGViewerImage

      public DFGViewerImage()
      Creates a new DFGViewerImage instance.
  • Method Details

    • doGet

      protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
      Handles GET requests by redirecting to the corresponding IIIF image API URL.

      The path info must have exactly four segments: /{pi}/{width}/{rotation}/{filename}.

      Overrides:
      doGet in class HttpServlet
      Parameters:
      request - the HTTP request
      response - the HTTP response
      Throws:
      ServletException - if a servlet-specific error occurs
      IOException - if an I/O error occurs
    • parseScale

      public de.unigoettingen.sub.commons.contentlib.imagelib.transform.Scale parseScale(String widthString) throws de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException, de.unigoettingen.sub.commons.contentlib.exceptions.ServiceNotImplementedException
      parseScale.
      Parameters:
      widthString - numeric width or scale method name
      Returns:
      the Scale instance parsed from the given width or method name
      Throws:
      de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException - if any.
      de.unigoettingen.sub.commons.contentlib.exceptions.ServiceNotImplementedException - if any.