1c4283da39f3300033c18e35447a2a35969196bd
[jabaws.git] / webservices / compbio / ws / client / Constraints.java
1 /* Copyright (c) 2011 Peter Troshin\r
2  *  \r
3  *  JAva Bioinformatics Analysis Web Services (JABAWS) @version: 2.0     \r
4  * \r
5  *  This library is free software; you can redistribute it and/or modify it under the terms of the\r
6  *  Apache License version 2 as published by the Apache Software Foundation\r
7  * \r
8  *  This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without\r
9  *  even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Apache \r
10  *  License for more details.\r
11  * \r
12  *  A copy of the license is in apache_license.txt. It is also available here:\r
13  * @see: http://www.apache.org/licenses/LICENSE-2.0.txt\r
14  * \r
15  * Any republication or derived work distributed in source code form\r
16  * must include this copyright and license notice.\r
17  */\r
18 package compbio.ws.client;\r
19 \r
20 class Constraints {\r
21 \r
22         final static String pseparator = "=";\r
23 \r
24         // Parameters for required command line options\r
25         final static String hostkey = "-h";\r
26         final static String servicekey = "-s";\r
27 \r
28         final static String listServices = "-list";\r
29         final static String testKey = "-test";\r
30 \r
31         // Actions\r
32         final static String inputkey = "-i";\r
33 \r
34         final static String paramList = "-parameters";\r
35         final static String presetList = "-presets";\r
36         final static String limitList = "-limits";\r
37 \r
38         // Options\r
39         final static String paramFile = "-f";\r
40         final static String outputkey = "-o";\r
41         final static String parameterkey = "-p";\r
42         final static String presetkey = "-r";\r
43 \r
44         final static String help_text = "\r\n" + \r
45                         "Usage: java -jar <JAR file name> -h=host_and_context <-s=serviceName> ACTION [OPTIONS] \r\n" + \r
46                         "\r\n" + \r
47                         "       -h=<host_context> - a full URL to the JABAWS web server including context path e.g. http://10.31.1.159:8080/ws\r\n" + \r
48                         "       -s=<ServiceName>  - a name of servise (the full list can be obtain with the option -list)\r\n" + \r
49                         "                           <serviceName> is required for all ACTIONS except -list\r\n\r\n" + \r
50                         "ACTIONS: \r\n" + \r
51                         "        -i=<inputFile>  - defines an input file. For most services this is a FASTA file with initial sequences\r\n" + \r
52                         "        -list           - lists all available web services\r\n" + \r
53                         "        -test           - tests functioning of <ServiceName> \r\n" + \r
54                         "        -parameters     - lists parameters supported by <ServiceName>\r\n" + \r
55                         "        -presets        - lists presets supported by <ServiceName>\r\n" + \r
56                         "        -limits         - lists limits of <ServiceName>\r\n" + \r
57                         "\r\n" + \r
58                         "N.B. If an input file is specified with -i other actions are ignored!\r\n\r\n" + \r
59                         "OPTIONS (used with the -i action only):\r\n" + \r
60                         "        -r=<presetName>  - name of the preset to use\r\n" + \r
61                         "        -o=<outputFile>  - file with output results\r\n" + \r
62                         "        -f=<paramFile>   - file with the list of parameters to use.\r\n\r\n" + \r
63                         "Please note that -r and -f options cannot be used together. \r\n" + \r
64                         "Alignment/Prediction is done with either preset or a parameters from the file, but not both!\r\n\r\n" + \r
65                         "EXAMPLES: \r\n" +\r
66                         "<THECLIENT> is java -jar <JAR file name>\r\n\r\n" +\r
67                         "1) List all available services on the host:\r\n" + \r
68                         "   <THECLIENT> -h=http://www.compbio.dundee.ac.uk/jabaws -list\r\n" + \r
69                         "\r\n" + \r
70                         "2) Test Clustal web service:\r\n" + \r
71                         "   <THECLIENT> -h=http://www.compbio.dundee.ac.uk/jabaws -s=ClustalWS -test \r\n" + \r
72                         "\r\n" + \r
73                         "3) Align sequence from file input.txt with Probcons. Record resulting alignment \r\n" + \r
74                         "   into the output.txt:\r\n" + \r
75                         "   <THECLIENT> -h=http://www.compbio.dundee.ac.uk/jabaws -s=ProbconsWS -i=input.txt -o=output.txt\r\n" + \r
76                         "\r\n" + \r
77                         "4) Calculate disorder with Disembl take input from input.txt with output results\r\n " +\r
78                         "   to be printed out to the standard output:\r\n" + \r
79                         "    <THECLIENT> -h=http://www.compbio.dundee.ac.uk/jabaws -s=DisemblWS -i=input.txt \r\n" + \r
80                         "\r\n" + \r
81                         "5) List all parameters available for AAconWS service:\r\n" + \r
82                         "   <THECLIENT> -h=http://www.compbio.dundee.ac.uk/jabaws -s=AAconWS -parameters\r\n" + \r
83                         "\r\n" + \r
84                         "6) Calculate conservation with AAConWS using LANDGRAF method, for Clustal alignment \r\n" + \r
85                         "   from input.txt and report the scores to the standard output:\r\n" + \r
86                         "   <THECLIENT> -h=http://www.compbio.dundee.ac.uk/jabaws -s=AAconWS -i=input.txt -f=prm.txt \r\n" + \r
87                         "\r\n" + \r
88                         "   Where the content of prm.txt file is -m=LANDGRAF\r\n" + \r
89                         "N.B. The list of the supported parameters can be obtained as shown in the example 5.\r\n" + \r
90                         "";\r
91 \r
92 }\r