X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=webservices%2Fcompbio%2Fws%2Fclient%2FJws2Client.java;h=dbe999a464c67ee2455d7408c5217d3c5dd90ac1;hb=b2a2fdc2bd95a64b3908d8ea2f31270b6c7199d3;hp=2a2f3d1804cc3d77132a2a4156dccd0d3859b4ca;hpb=fcc1bd4d46b998cc86a85b31f763310e659707b7;p=jabaws.git diff --git a/webservices/compbio/ws/client/Jws2Client.java b/webservices/compbio/ws/client/Jws2Client.java index 2a2f3d1..dbe999a 100644 --- a/webservices/compbio/ws/client/Jws2Client.java +++ b/webservices/compbio/ws/client/Jws2Client.java @@ -27,7 +27,6 @@ import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; -import java.io.OutputStream; import java.io.PrintWriter; import java.io.Writer; import java.net.ConnectException; @@ -58,7 +57,9 @@ import compbio.data.sequence.SequenceUtil; import compbio.data.sequence.UnknownFileFormatException; import compbio.metadata.JobSubmissionException; import compbio.metadata.Option; +import compbio.metadata.Limit; import compbio.metadata.Preset; +import compbio.metadata.PresetManager; import compbio.metadata.ResultNotAvailableException; import compbio.metadata.WrongParameterException; import compbio.util.FileUtil; @@ -188,17 +189,30 @@ public class Jws2Client { IOHelper.writeOut(writer, alignment); writer.close(); } + AlignmentMetadata md = alignment.getMetadata(); + System.out.println("Output has been prepared with " + md.getProgram()); } } if (CmdHelper.listParameters(cmd)) { - System.out.println(MetadataHelper.getParametersList(thews)); + List> opts = MetadataHelper.getParametersList(thews, hostname); + for (Option o : opts) { + System.out.println("##############################################################################\n" + o.toString()); + } } if (CmdHelper.listPresets(cmd)) { - System.out.println(MetadataHelper.getPresetList(thews)); + PresetManager psm = MetadataHelper.getPresetList(thews); + if (null != psm) { + System.out.print(psm); + } else { + System.out.println("No presets are defined for the Web service"); + } } if (CmdHelper.listLimits(cmd)) { - System.out.println(MetadataHelper.getLimits(thews)); + List> lims = MetadataHelper.getLimits(thews); + for (Limit l : lims) { + System.out.println("##############################################################################\n" + l.toString()); + } } log.fine("Disconnecting..."); ((Closeable) thews).close(); @@ -306,8 +320,8 @@ public class Jws2Client { private static void listAllServices(String hostname) throws WebServiceException, IOException { RegistryWS registry = connectToRegistry(hostname); - Set func_services = Collections.EMPTY_SET; - Set nonfunc_services = Collections.EMPTY_SET; + Set func_services = Collections.emptySet(); + Set nonfunc_services = Collections.emptySet(); if (registry != null) { func_services = registry.getSupportedServices(); nonfunc_services = registry.getNonoperatedServices(); @@ -512,7 +526,6 @@ public class Jws2Client { * */ public static void main(String[] args) { - if (args == null) { System.out.println(Constraints.help_text); System.exit(1); @@ -522,7 +535,6 @@ public class Jws2Client { System.out.println(Constraints.help_text); System.exit(1); } - try { new Jws2Client(args); } catch (IOException e) {