Final fixing of Jpred problem with casting
[jabaws.git] / webservices / compbio / ws / client / Jws2Client.java
index eac049e..666fa58 100644 (file)
@@ -27,7 +27,6 @@ import java.io.File;
 import java.io.FileInputStream;\r
 import java.io.FileOutputStream;\r
 import java.io.IOException;\r
-import java.io.OutputStream;\r
 import java.io.PrintWriter;\r
 import java.io.Writer;\r
 import java.net.ConnectException;\r
@@ -176,7 +175,7 @@ public class Jws2Client {
                                Alignment alignment = align(infile, (MsaWS<T>) thews, preset, customOptions);\r
                                if (serviceName.equalsIgnoreCase("JpredWS")) {\r
                                        writer.close();\r
-                                       JpredAlignment jpred = new JpredAlignment(alignment.getSequences(), alignment.getMetadata());\r
+                                       JpredAlignment jpred = (JpredAlignment)alignment;\r
                                        if (outfile != null) {\r
                                                FileOutputStream fout = new FileOutputStream(outfile);\r
                                                SequenceUtil.writeFastaKeepTheStream(fout, jpred.getJpredSequences(), 60);\r
@@ -188,6 +187,8 @@ public class Jws2Client {
                                        IOHelper.writeOut(writer, alignment);\r
                                        writer.close();\r
                                }\r
+                               AlignmentMetadata md = alignment.getMetadata();\r
+                               System.out.println("Output has been prepared with " + md.getProgram());\r
                        }\r
                }\r
 \r
@@ -512,7 +513,6 @@ public class Jws2Client {
         * \r
         */\r
        public static void main(String[] args) {\r
-\r
                if (args == null) {\r
                        System.out.println(Constraints.help_text);\r
                        System.exit(1);\r
@@ -522,7 +522,6 @@ public class Jws2Client {
                        System.out.println(Constraints.help_text);\r
                        System.exit(1);\r
                }\r
-\r
                try {\r
                        new Jws2Client(args);\r
                } catch (IOException e) {\r