Parameters Tester updated. Untested webservice code. generate xsd/wsdl?
[jabaws.git] / runner / compbio / runner / msa / Tcoffee.java
index 949c4f1..645b994 100644 (file)
@@ -1,6 +1,6 @@
-/* Copyright (c) 2009 Peter Troshin\r
+/* Copyright (c) 2011 Peter Troshin\r
  *  \r
- *  JAva Bioinformatics Analysis Web Services (JABAWS) @version: 1.0\r
+ *  JAva Bioinformatics Analysis Web Services (JABAWS) @version: 2.0     \r
  * \r
  *  This library is free software; you can redistribute it and/or modify it under the terms of the\r
  *  Apache License version 2 as published by the Apache Software Foundation\r
@@ -20,7 +20,6 @@ package compbio.runner.msa;
 \r
 import java.io.FileNotFoundException;\r
 import java.io.IOException;\r
-import java.security.InvalidParameterException;\r
 import java.util.Arrays;\r
 import java.util.List;\r
 \r
@@ -28,28 +27,23 @@ import org.apache.log4j.Logger;
 \r
 import compbio.data.sequence.Alignment;\r
 import compbio.data.sequence.UnknownFileFormatException;\r
-import compbio.engine.client.ClusterNativeSpecExecutable;\r
 import compbio.engine.client.CommandBuilder;\r
 import compbio.engine.client.Executable;\r
 import compbio.engine.client.PipedExecutable;\r
 import compbio.engine.client.SkeletalExecutable;\r
 import compbio.engine.conf.PropertyHelperManager;\r
-import compbio.metadata.Limit;\r
-import compbio.metadata.LimitsManager;\r
 import compbio.metadata.ResultNotAvailableException;\r
 import compbio.runner.Util;\r
 import compbio.util.PropertyHelper;\r
 \r
-public class Tcoffee extends SkeletalExecutable<Tcoffee> implements\r
-PipedExecutable<Tcoffee>, ClusterNativeSpecExecutable<Tcoffee> {\r
+public class Tcoffee extends SkeletalExecutable<Tcoffee>\r
+               implements\r
+                       PipedExecutable<Tcoffee> {\r
 \r
        private static Logger log = Logger.getLogger(Tcoffee.class);\r
 \r
        private static PropertyHelper ph = PropertyHelperManager\r
-       .getPropertyHelper();\r
-\r
-       // Cache for Limits information\r
-       private static LimitsManager<Tcoffee> limits;\r
+                       .getPropertyHelper();\r
 \r
        public static final String KEY_VALUE_SEPARATOR = "=";\r
 \r
@@ -65,8 +59,6 @@ PipedExecutable<Tcoffee>, ClusterNativeSpecExecutable<Tcoffee> {
        private final static String ncorePrm = "-n_core";\r
 \r
        /**\r
-        * \r
-        * @param workDirectory\r
         */\r
        public Tcoffee() {\r
                super(KEY_VALUE_SEPARATOR);\r
@@ -88,7 +80,7 @@ PipedExecutable<Tcoffee>, ClusterNativeSpecExecutable<Tcoffee> {
        @SuppressWarnings("unchecked")\r
        @Override\r
        public Alignment getResults(String workDirectory)\r
-       throws ResultNotAvailableException {\r
+                       throws ResultNotAvailableException {\r
                try {\r
                        return Util.readClustalFile(workDirectory, getOutput());\r
                } catch (FileNotFoundException e) {\r
@@ -140,46 +132,9 @@ PipedExecutable<Tcoffee>, ClusterNativeSpecExecutable<Tcoffee> {
                return super.getParameters(provider);\r
        }\r
 \r
+       @SuppressWarnings("unchecked")\r
        @Override\r
-       public Limit<Tcoffee> getLimit(String presetName) {\r
-               if (limits == null) {\r
-                       limits = getLimits();\r
-               }\r
-\r
-               Limit<Tcoffee> limit = null;\r
-               if (limits != null) {\r
-                       // this returns default limit if preset is undefined!\r
-                       limit = limits.getLimitByName(presetName);\r
-               }\r
-               // If limit is not defined for a particular preset, then return default\r
-               // limit\r
-               if (limit == null) {\r
-                       log.debug("Limit for the preset " + presetName\r
-                                       + " is not found. Using default");\r
-                       limit = limits.getDefaultLimit();\r
-               }\r
-               return limit;\r
-       }\r
-\r
-       @Override\r
-       public LimitsManager<Tcoffee> getLimits() {\r
-               // synchronise on static field\r
-               synchronized (log) {\r
-                       if (limits == null) {\r
-                               limits = Util.getLimits(this.getClass());\r
-                       }\r
-               }\r
-               return limits;\r
-       }\r
-\r
-       @Override\r
-       public String getNativeSpecs() {\r
-               return getClusterSettings();\r
-       }\r
-\r
-\r
-       @Override\r
-       public Class<? extends Executable<?>> getType() {\r
-               return this.getClass();\r
+       public Class<Tcoffee> getType() {\r
+               return (Class<Tcoffee>) this.getClass();\r
        }\r
 }\r