import static compbio.ws.client.Constraints.hostkey;\r
import static compbio.ws.client.Constraints.limitList;\r
import static compbio.ws.client.Constraints.listServices;\r
+import static compbio.ws.client.Constraints.listServicesOld;\r
import static compbio.ws.client.Constraints.paramList;\r
import static compbio.ws.client.Constraints.presetList;\r
import static compbio.ws.client.Constraints.presetkey;\r
* @return\r
*/\r
static boolean listServices(String[] cmd) {\r
- return keyFound(cmd, listServices);\r
+ return (keyFound(cmd, listServices) || keyFound(cmd, listServicesOld));\r
}\r
\r
/**\r
final static String servicekey = "-s";\r
\r
final static String listServices = "-list";\r
+ final static String listServicesOld = "-list_services";\r
final static String testKey = "-test";\r
\r
// Actions\r
*/\r
public class Jws2Client {\r
\r
- /*\r
+ /**\r
* Use java.util.Logger instead of log4j logger to reduce the size of the client package\r
*/\r
private static final Logger log = Logger.getLogger(Jws2Client.class.getCanonicalName());\r
return;\r
}\r
if (!func_services.isEmpty()) {\r
- String mess = "\n\rAvailable services: ";\r
+ System.out.println("There are " + func_services.size() + " services at " + hostname + ":");\r
+ String mess = "\n\rThe list:\n";\r
System.out.println(mess + Services.toString(func_services));\r
}\r
if (!nonfunc_services.isEmpty()) {\r
- String mess = "Non-available services (internal tests failed): ";\r
+ System.out.println("There are " + nonfunc_services.size() + " non-available services at " + hostname + ":");\r
+ String mess = "The list (internal tests failed): ";\r
System.out.println(mess + Services.toString(nonfunc_services));\r
}\r
}\r
\r
public static String toString(Set<Services> services) {\r
if (services == null || services.isEmpty()) {\r
- return "";\r
+ return "No known services...\n";\r
}\r
String value = "";\r
- String delim = ", ";\r
for (Services serv : services) {\r
- value += serv.toString() + delim;\r
+ if (null != serv) {\r
+ value += serv + "\n";\r
+ } else {\r
+ value += "Unknown Service\n";\r
+ }\r
}\r
- value = value.substring(0, value.length() - delim.length());\r
return value;\r
}\r
\r