Clean-up, refactoring, commenting. Parameters file containts only options since Jalvi...
[jabaws.git] / webservices / compbio / ws / client / Jws2Client.java
index ae38d9f..7b781a2 100644 (file)
@@ -43,7 +43,6 @@ import javax.xml.ws.Service;
 import javax.xml.ws.WebServiceException;\r
 \r
 import compbio.data.msa.JABAService;\r
-import compbio.data.msa.FoldWS;\r
 import compbio.data.msa.Metadata;\r
 import compbio.data.msa.MsaWS;\r
 import compbio.data.msa.RegistryWS;\r
@@ -51,7 +50,6 @@ import compbio.data.msa.SequenceAnnotation;
 import compbio.data.sequence.Alignment;\r
 import compbio.data.sequence.FastaSequence;\r
 import compbio.data.sequence.ScoreManager;\r
-import compbio.data.sequence.ClustalAlignmentUtil;\r
 import compbio.data.sequence.SequenceUtil;\r
 import compbio.data.sequence.UnknownFileFormatException;\r
 import compbio.metadata.JobSubmissionException;\r
@@ -516,76 +514,6 @@ public class Jws2Client {
        }\r
        \r
        /**\r
-        * Return RNA secondary structure from a file using FoldWS\r
-        * \r
-        * @param <T>\r
-        *            web service type e.g. Clustal\r
-        * @param file\r
-        *            to read the results from\r
-        * @param foldws\r
-        *            FoldWS required\r
-        * @param preset\r
-        *            Preset to use optional\r
-        * @param customOptions\r
-        *            file which contains new line separated list of options\r
-        * @return String\r
-        */\r
-       \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
-//             String rnastruct = null;\r
-//             try {\r
-//                     instream = new FileInputStream(file);\r
-//                     alignment = ClustalAlignmentUtil.readClustalFile(instream);\r
-//                     instream.close();\r
-//                     String jobId = null;\r
-//                     if (customOptions != null && preset != null) {\r
-//                             System.out.println("WARN: Parameters (-f) are defined together"\r
-//                                             + "with a preset (-r), ignoring preset! ");\r
-//                     }\r
-//                     if (customOptions != null) {\r
-//                             jobId = foldws.customFold(alignment, customOptions);\r
-//                     } else if (preset != null) {\r
-//                             jobId = foldws.presetFold(alignment, preset);\r
-//                     } else {\r
-//                             jobId = foldws.fold(alignment);\r
-//                     }\r
-//                     System.out.println("\n\ncalling fold.........");\r
-//                     Thread.sleep(1000);\r
-//                     rnastruct = foldws.getResult(jobId);\r
-//                             \r
-//             } catch (IOException e) {\r
-//                     System.err.println("Exception while reading the input file. Exception details: ");\r
-//                     e.printStackTrace();\r
-//             } catch (UnknownFileFormatException e) {\r
-//                     System.err.println("Exception while reading input file. Doesnt look like a Clustal format file");\r
-//                     e.printStackTrace();\r
-//             } catch (JobSubmissionException e) {\r
-//                     System.err.println("Exception while submitting job to the web server. ");\r
-//                     e.printStackTrace();\r
-//             } catch (ResultNotAvailableException e) {\r
-//                     System.err.println("Exception while waiting for results. Exception details: ");\r
-//                     e.printStackTrace();\r
-//             } catch (InterruptedException ignored) {\r
-//                     // ignore and propagate an interruption\r
-//                     Thread.currentThread().interrupt();\r
-//             } catch (WrongParameterException e) {\r
-//                     e.printStackTrace();\r
-//             } finally {\r
-//                     if (instream != null) {\r
-//                             try {\r
-//                                     instream.close();\r
-//                             } catch (IOException ignored) {\r
-//                                     // ignore\r
-//                             }\r
-//                     }\r
-//             }\r
-//             return rnastruct;\r
-//     }\r
-//             \r
-       /**\r
         * Prints Jws2Client usage information to standard out\r
         * \r
         * @param exitStatus\r