Package nzilbb.labbcat.server.api
Class Corpus
- java.lang.Object
-
- nzilbb.labbcat.server.api.APIRequestHandler
-
- nzilbb.labbcat.server.api.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
-
-
Field Summary
-
Fields inherited from class nzilbb.labbcat.server.api.APIRequestHandler
SC_BAD_REQUEST, SC_CONFLICT, SC_FORBIDDEN, SC_INTERNAL_SERVER_ERROR, SC_METHOD_NOT_ALLOWED, SC_NOT_FOUND, SC_OK, SC_UNPROCESSABLE_CONTENT, SC_UNSUPPORTED_MEDIA_TYPE
-
-
Constructor Summary
Constructors Constructor Description Corpus()
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.json.JsonObject
get(String pathInfo, Consumer<Integer> httpStatus)
Generate the response to a request.-
Methods inherited from class nzilbb.labbcat.server.api.APIRequestHandler
GetSystemAttribute, init, writeResponse
-
-
-
-
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
-
-