This package provides the necessary infrastructure for writing tasks that do things for users, along the same lines as ADAM A-tasks. An example of use is given in the separate NDTools package.
At the moment all the necessary machinery is provided for invoking tasks from the command line in a way that looks ADAM-like, but it is designed so that, for instance, a GUI-style invoker could be written to invoke the same tasks.
The provided components are as follows:
Parameter
can be subclassed to enforce different validity
constraints or so it knows how to return itself as some object other
than a string (see for instance
{@link uk.ac.starlink.task.IntegerParameter}).
{@link uk.ac.starlink.task.Environment}
Environment
which assumes a user
is sitting at a terminal with standard input and standard output.
Task
objects will use a
TerminalEnvironment
to invoke tasks from
an args
-style string array.
{@link uk.ac.starlink.task.Task}
Setting up a user-level package containing tasks is then a case of
writing a top-level class with a main
method which invokes
TerminalInvoker
, and writing a number of classes which
implement Task
. See the NDTools package for an example.
To invoke the same tasks from a GUI you'd want to write something like
a GUIEnvironment
and GUIInvoker
class.