- }\r
- }\r
- return alignment;\r
- }\r
-\r
- /**\r
- * Returns a list of options supported by web service\r
- * \r
- * @param <T>\r
- * web service type\r
- * @param msaws\r
- * web service proxy\r
- * @return List of options supported by a web service\r
- */\r
- <T> List<Option<T>> getParametersList(MsaWS<T> msaws) {\r
- assert msaws != null;\r
- return msaws.getRunnerOptions().getArguments();\r
- }\r
-\r
- /**\r
- * Returns an objects from which the list of presets supported by web\r
- * service <T> can be obtained\r
- * \r
- * @param <T>\r
- * web service type\r
- * @param msaws\r
- * web service proxy\r
- * @return PresetManager, object which operates on presets\r
- */\r
- <T> PresetManager<T> getPresetList(MsaWS<T> msaws) {\r
- assert msaws != null;\r
- PresetManager<T> presetman = msaws.getPresets();\r
- return presetman;\r
- }\r
-\r
- /**\r
- * Returns a list of limits supported by web service Each limit correspond\r
- * to a particular preset.\r
- * \r
- * @param <T>\r
- * web service type\r
- * @param msaws\r
- * web service proxy\r
- * @return List of limits supported by a web service\r
- */\r
- <T> List<Limit<T>> getLimits(MsaWS<T> msaws) {\r
- assert msaws != null;\r
- LimitsManager<T> lmanger = msaws.getLimits();\r
-\r
- return lmanger != null ? lmanger.getLimits() : null;\r
- }\r
-\r
- /**\r
- * Prints Jws2Client usage information to standard out\r
- * \r
- * @param exitStatus\r
- */\r
- static void printUsage(int exitStatus) {\r
- System.out.println();\r
- System.out.println("Usage: <Class or Jar file name> " + hostkey\r
- + pseparator + "host_and_context " + servicekey + pseparator\r
- + "serviceName ACTION [OPTIONS] ");\r
- System.out.println();\r
- System.out\r
- .println(hostkey\r
- + pseparator\r
- + "<host_and_context> - a full URL to the JWS2 web server including context path e.g. http://10.31.1.159:8080/ws");\r
- System.out.println(servicekey + pseparator + "<ServiceName> - one of "\r
- + Arrays.toString(Services.values()));\r
- System.out.println();\r
- System.out.println("ACTIONS: ");\r
- System.out\r
- .println(inputkey\r
- + pseparator\r
- + "<inputFile> - full path to fasta formatted sequence file, from which to align sequences");\r
- System.out.println(paramList\r
- + " - lists parameters supported by web service");\r
- System.out.println(presetList\r
- + " - lists presets supported by web service");\r
- System.out.println(limitList + " - lists web services limits");\r
- System.out\r
- .println("Please note that if input file is specified other actions are ignored");\r
-\r
- System.out.println();\r
- System.out.println("OPTIONS (only for use with -i action):");\r
-\r
- System.out.println(presetkey + pseparator\r
- + "<presetName> - name of the preset to use");\r
- System.out\r
- .println(outputkey\r
- + pseparator\r
- + "<outputFile> - full path to the file where to write an alignment");\r
- System.out\r
- .println("-f=<parameterInputFile> - the name of the file with the list of parameters to use.");\r
- System.out\r
- .println("Please note that -r and -f options cannot be used together. "\r
- + "Alignment is done with either preset or a parameters from the file, but not both!");\r
-\r
- System.exit(exitStatus);\r
- }\r
-\r
- /**\r
- * Starts command line client, if no parameter are supported print help. Two\r
- * parameters are required for successfull call the JWS2 host name and a\r
- * service name.\r
- * \r
- * @param args\r
- * Usage: <Class or Jar file name> -h=host_and_context\r
- * -s=serviceName ACTION [OPTIONS]\r
- * \r
- * -h=<host_and_context> - a full URL to the JWS2 web server\r
- * including context path e.g. http://10.31.1.159:8080/ws\r
- * \r
- * -s=<ServiceName> - one of [MafftWS, MuscleWS, ClustalWS,\r
- * TcoffeeWS, ProbconsWS] ACTIONS:\r
- * \r
- * -i=<inputFile> - full path to fasta formatted sequence file,\r
- * from which to align sequences\r
- * \r
- * -parameters - lists parameters supported by web service\r
- * \r
- * -presets - lists presets supported by web service\r
- * \r
- * -limits - lists web services limits Please note that if input\r
- * file is specified other actions are ignored\r
- * \r
- * OPTIONS: (only for use with -i action):\r
- * \r
- * -r=<presetName> - name of the preset to use\r
- * \r
- * -o=<outputFile> - full path to the file where to write an\r
- * alignment -f=<parameterInputFile> - the name of the file with\r
- * the list of parameters to use. Please note that -r and -f\r
- * options cannot be used together. Alignment is done with either\r
- * preset or a parameters from the file, but not both!\r
- * \r
- */\r
- public static void main(String[] args) {\r
-\r
- if (args == null) {\r
- printUsage(1);\r