Class Data


  • public class Data
    extends APIRequestHandler
    /api/annotation/data : Accesses binary data for annotations.

    Some layers have have their type set to a MIME type, e.g. "image/png". On those layers, each annotation is associated with binary data of the given MIME type, e.g. an PNG image. This endpoint provides access to that data.

    The request method can be GET or POST

    Parameters:
    id - One or more annotations IDs.
    expression - An expression to determine the annotations IDs. e.g. "['e_144_17346', 'e_144_17347'].includes(id)"
    name - Optional name of the collection.
    show - Optional parameter for suppressing disposition/filename headers, intended to allow easy display of the image in a browser, without the browser offering to download the file.

    One of id or expression must be specified.

    Output: If one annotation ID is specified, the associated data file is returned. If multiple IDs are specified, a ZIP file is returned, which contains all the data files.

    Author:
    Robert Fromont
    • Constructor Detail

      • Data

        public Data()
        Constructor
    • Method Detail

      • post

        public void post​(RequestParameters parameters,
                         OutputStream out,
                         Consumer<String> contentType,
                         Consumer<String> fileName,
                         Consumer<Integer> httpStatus)
        The GET or POST method for the servlet.
        Parameters:
        parameters - Request parameter map.
        out - Response body stream.
        contentType - Receives the content type for specification in the response headers.
        fileName - Receives the filename for specification in the response headers.
        httpStatus - Receives the response status code, in case or error.