Webservice Updated for scoremanager but I think I broke something on the way.
[jabaws.git] / webservices / compbio / ws / client / Jws2Client.java
index 888ec5f..18424f6 100644 (file)
@@ -50,7 +50,7 @@ import compbio.data.msa.RegistryWS;
 import compbio.data.msa.SequenceAnnotation;\r
 import compbio.data.sequence.Alignment;\r
 import compbio.data.sequence.FastaSequence;\r
-import compbio.data.sequence.RNAstruct;\r
+import compbio.data.sequence.RNAStruct;\r
 import compbio.data.sequence.ScoreManager;\r
 import compbio.data.sequence.ClustalAlignmentUtil;\r
 import compbio.data.sequence.SequenceUtil;\r
@@ -150,7 +150,6 @@ public class Jws2Client {
                String presetName = CmdHelper.getPresetName(cmd);\r
 \r
                Metadata<T> msaws = (Metadata<T>) connect(hostname, service);\r
-               Metadata<T> foldws = (Metadata<T>) connect(hostname, service);\r
                Preset<T> preset = null;\r
                if (presetName != null) {\r
                        preset = MetadataHelper.getPreset(msaws, presetName);\r
@@ -161,8 +160,9 @@ public class Jws2Client {
                        customOptions = MetadataHelper.processParameters(prms,\r
                                        msaws.getRunnerOptions());\r
                }\r
+//             System.out.println("The Options read from the command line: " + customOptions);\r
+               \r
                Alignment alignment = null;\r
-               RNAstruct rnastruct = null;\r
                if (inputFile != null) {\r
                        Writer writer = null;\r
                        if (outFile != null) {\r
@@ -181,12 +181,6 @@ public class Jws2Client {
                                alignment = align(inputFile, (MsaWS<T>) msaws, preset,\r
                                                customOptions);\r
                                IOHelper.writeOut(writer, alignment);\r
-                       } else if (service.getServiceType() == FoldWS.class) {\r
-                               rnastruct = fold(inputFile, (FoldWS<T>) foldws, preset, customOptions);\r
-                               // No IOHelper method for rnastruct/String yet\r
-                               if (writer != null) {\r
-                                       writer.write(rnastruct.toString());\r
-                               }\r
                        }\r
                        writer.close();\r
                }\r
@@ -532,14 +526,14 @@ public class Jws2Client {
         *            Preset to use optional\r
         * @param customOptions\r
         *            file which contains new line separated list of options\r
-        * @return RNAstruct\r
+        * @return String\r
         */\r
        \r
-       static <T> RNAstruct fold(File file, FoldWS<T> foldws, Preset<T> preset,\r
+       static <T> String fold(File file, FoldWS<T> foldws, Preset<T> preset,\r
                        List<Option<T>> customOptions) {\r
                FileInputStream instream = null;\r
                Alignment alignment = null;\r
-               RNAstruct rnastruct = null;\r
+               String rnastruct = null;\r
                try {\r
                        instream = new FileInputStream(file);\r
                        alignment = ClustalAlignmentUtil.readClustalFile(instream);\r
@@ -559,8 +553,6 @@ public class Jws2Client {
                        System.out.println("\n\ncalling fold.........");\r
                        Thread.sleep(1000);\r
                        rnastruct = foldws.getResult(jobId);\r
-                       log.info("log test print results:\n" + rnastruct.toString());\r
-                       System.out.println("print test results:\n " + rnastruct.toString());\r
                                \r
                } catch (IOException e) {\r
                        System.err.println("Exception while reading the input file. Exception details: ");\r