Class Intervals
- java.lang.Object
-
- nzilbb.labbcat.server.api.APIRequestHandler
-
- nzilbb.labbcat.server.api.edit.annotations.Intervals
-
@RequiredRole("edit") public class Intervals extends APIRequestHandler
/api/edit/annotations/intervals : Handler for receiving and processing interval labels in an annotated CSV results file./api/edit/annotations/intervals
POST uploads an annotated CSV results file and imports the specified column(s) of labels for annotating intervals - i.e. from given start times to given end times.
The multipart-encoded parameters are:
- csv
- CSV file containing the attribute values to import.
- transcriptColumn
- The (zero based) index of the column that contains the transcript name to annotate.
- startTimeColumn
- The (zero based) index of the column that contains the start time for the annotation.
- endTimeColumn
- The (zero based) index of the column that contains the end time for the annotation.
- columnLayer
- Multiple values, where the index of the value corresponds to the (zero based) CSV column index, and the value is blank to ignore the column, or the layer ID of a layer to update with an annotation labelled with the CSV cell's content.
Output: A JSON-encoded response containing the threadId of a task that is processing the request.
- Author:
- Robert Fromont robert@fromont.net.nz
-
-
Field Summary
-
Fields inherited from class nzilbb.labbcat.server.api.APIRequestHandler
SC_BAD_REQUEST, SC_CONFLICT, SC_CREATED, SC_FORBIDDEN, SC_INTERNAL_SERVER_ERROR, SC_METHOD_NOT_ALLOWED, SC_NOT_FOUND, SC_OK, SC_UNAUTHORIZED, SC_UNPROCESSABLE_CONTENT, SC_UNSUPPORTED_MEDIA_TYPE
-
-
Constructor Summary
Constructors Constructor Description Intervals()Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.json.JsonObjectpost(RequestParameters requestParameters, Consumer<Integer> httpStatus)The POST method for the servlet.-
Methods inherited from class nzilbb.labbcat.server.api.APIRequestHandler
getContext, GetSystemAttribute, init, writeResponse
-
-
-
-
Method Detail
-
post
public javax.json.JsonObject post(RequestParameters requestParameters, Consumer<Integer> httpStatus)
The POST method for the servlet.- Parameters:
requestParameters- Request parameter map.httpStatus- Receives the response status code, in case of error.- Returns:
- JSON-encoded object representing the response
-
-