Package nzilbb.labbcat.server.api
Class Files
- java.lang.Object
-
- nzilbb.labbcat.server.api.APIRequestHandler
-
- nzilbb.labbcat.server.api.Files
-
public class Files extends APIRequestHandler
/api/files : Exports media/transcript files for specified transcripts.Batch access to transcript files, or media files, stored on the server.
The request method can be GET or POST
- Parameters:
id
- One or more graph IDs.query
- Graph QL expression to identify the graph IDs, if no id parameter is supplied.mimeType
- Optional content-type of media to export; if not specified, original transcript files are exported instead of media.trackSuffix
- Optional track suffix for the media to export.name
- Optional name of the collection.
Output: The media or transcript files for the given transcripts.
This may be a single file or multiple files, depending on how many transcripts are specified. If there is only one, the file in returned as the response to the request. If there are more than one, the response is a zip file containing the output files.
- 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 Files()
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
get(RequestParameters parameters, OutputStream out, Consumer<String> contentType, Consumer<String> fileName, Consumer<Integer> httpStatus)
The GET method for the servlet.-
Methods inherited from class nzilbb.labbcat.server.api.APIRequestHandler
GetSystemAttribute, init, writeResponse
-
-
-
-
Method Detail
-
get
public void get(RequestParameters parameters, OutputStream out, Consumer<String> contentType, Consumer<String> fileName, Consumer<Integer> httpStatus)
The GET 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.
-
-