Class Corpus


  • public class Corpus
    extends APIRequestHandler
    /api/corpus/{ID} : statistics about a given corpus.

    Allows access to information about a given corpus, including participant count, count of distinc word types, durations, etc.

    Only the GET HTTP method is supported:

    GET
    • Response Body - the standard JSON envelope, with the model as an object where each key is the name of a statistic and the value is the statistic's value.
    • Response Status 200 on success, or 404 if the corpus ID is invalid.

    Author:
    Robert Fromont
    • Constructor Detail

      • Corpus

        public Corpus()
        Constructor
    • Method Detail

      • get

        public javax.json.JsonObject get​(String pathInfo,
                                         Consumer<Integer> httpStatus)
        Generate the response to a request.

        This returns statistical information about the given corpus.

        Parameters:
        pathInfo - The URL path from which the upload ID can be inferred.
        httpStatus - Receives the response status code, in case of error.
        Returns:
        JSON-encoded object representing the response