Page History
Table of Contents | ||||||
---|---|---|---|---|---|---|
|
Info |
---|
This documentation provides a guide for how to programmatically create Curation Tasks. For more information configuring Curation Tasks, see the Curation System section of the documentation |
Writing your own tasks
A task is just a java class that can contain arbitrary code, but it must have 2 properties:
...
For very fine-grained information, a task may write to a reporting stream. This stream is sent to standard out, so is only available when running a task from the command line. Unlike the result string, there is no limit to the amount of data that may be pushed to this stream.
...
Accessing task output in calling code
The status code, reporting stream, and the result string are accessed (or set) by methods on the Curation Curator object:
Code Block | ||
---|---|---|
| ||
Curator curator = new Curator(); curator.setReporter(new OutputStreamWriter(System.out)); curator.addTask("vscan").curate(coll); int status = curator.getStatus("vscan"); String result = curator.getResult("vscan"); |
...