Usage:
   run/run-analysis-client -h[elp]
   run/run-analysis-client <find-arguments> [options] [inputs] [results] 
or
   run/run-analysis -h[elp]
   run/run-analysis <find-arguments> [options] [inputs] [results] 
or
   . run/source.me.sh
   java AnalysisClient -h[elp]
   java AnalysisClient <find-arguments> [options] [inputs] [results] 

where <find-arguments> defines what web service to use:

   -name <service>   ... mandatory (unless -e given);
                         a name of a service to be called
   -job <job-ID>     ... an ID of a previously created job
                         (no default value)
   -l <host>         ... host name (default: localhost)
   -p <port>         ... port number (defaullt: 8080)
   -e <url>          ... the full service URL (an endpoint),
                         but without the service name
                         (e.g. http://www.ebi.ac.uk/soaplab/services)

where the main <options> are one of the following (the behaviour may
depend on whether also parameter '-job' is given):

   -j  ... create a job, but not start it
   -x                ... create a job and start it, but do not wait for it
   -x -job <job-ID>  ... start given job, do not wait for it
   -w                ... create a job, start it, wait for its completion
   -w -job <job-ID>  ... wait for completion of the given job
   -k -job <job-ID>  ... kill the given job
   -jp <file>        ... store a job ID into given file
                         (default: print it on standard error)

where other <options> are (they are associated either with a job
created in the same invocation, or with a job defined by a '-job' parameter):

   -s                ... print job status
   -c                ... print job time characteristics
   -le               ... print the last event associated with a job
                         (TBD: more options related to notification)
   -clean            ... destroy given job and all its resources
                         (which includes removing also results)

where remaining options (not associated with any particular job) are:

   -d                ... show analysis full description
                         (it prints an XML file with all details)
   -t                ... show analysis type and few other properties
   -i                ... show names of analysis inputs
   -ii               ... show names and attributes of analysis inputs
   -o                ... show names of possible results
   -oo               ... show names and types of possible results
   -q                ... quiet mode (useful when you want to redirect
                         a result into a file)

where <inputs> is a list of input names and its values:
	             available names can be found using option -i,
   input-name input-value
   input-name :input-value
	             a value starting with ':' is treated as a file name
	             and the contents of this file is used as an input
   input-name ::input-value
	             a value starting with '::' is treated as a file name
                     in which every line is again a filename,
	             and the contents of all such file is used as an input

where <results> defines if any results will be returned back:

   -r                ... return results
   <list of names>   ... what results to retrieve,
                         available result names can be found using option -o
                         (no list means getting all available results);
                         Note: the binary results are written into a file,
                               or into several files, with unique names.

Examples:
---------
Return only metadata, do not start the analysis:
   java AnalysisClient -name Classic.HelloWorld -d
   java AnalysisClient -name Classic.HelloWorld -i -o -t
   java AnalysisClient  \
      -e http://www.ebi.ac.uk/soaplab/services  \
      -name edit.seqret -t

Execute an analysis, wait until it is completed and return all results:
   java AnalysisClient -name Classic.HelloWorld -w -r
The same but with an input parameter:
   java AnalysisClient -name Classic.HelloWorld Greeting Ciao -w -r

Create a job with input data 'file' and 'type', but nothing more:
   java AnalysisClient -name a_service file /tmp/a.tmp type big -j
Start the job just created (the XXX was just printed):
   java AnalysisClient -name a_service -job XXX -x
Ask what is the status of the same job:
   java AnalysisClient -name a_service -job XXX -s -c -le
And kill it...:
   java AnalysisClient -name a_service -job XXX -k
...or wait for its completion and return a result named 'report':
   java AnalysisClient -name a_service -job XXX -w -r report


