Refactoring: rename duplicated Util classes
[jabaws.git] / webservices / compbio / ws / client / ServicesUtil.java
index 9873875..7084028 100644 (file)
@@ -5,6 +5,7 @@ import java.io.File;
 import compbio.engine.client.ConfExecutable;\r
 import compbio.engine.client.Executable;\r
 import compbio.runner.conservation.AACon;\r
+import compbio.runner.predictors.Jpred;\r
 import compbio.runner.disorder.Disembl;\r
 import compbio.runner.disorder.GlobPlot;\r
 import compbio.runner.disorder.IUPred;\r
@@ -34,6 +35,8 @@ public class ServicesUtil {
                switch (service) {\r
                        case AAConWS :\r
                                return AACon.class;\r
+                       case JpredWS :\r
+                               return Jpred.class;\r
                        case ClustalOWS :\r
                                return ClustalO.class;\r
                        case ClustalWS :\r
@@ -57,14 +60,11 @@ public class ServicesUtil {
                        case RNAalifoldWS :\r
                                return RNAalifold.class;\r
                        default :\r
-                               throw new RuntimeException(\r
-                                               "Unknown web service implementation class for service: "\r
-                                                               + service);\r
+                               throw new RuntimeException("Unknown web service implementation class for service: " + service);\r
                }\r
        }\r
 \r
-       public static Class<? extends Executable<?>> getRunnerByJobDirectory(\r
-                       File jobdir) {\r
+       public static Class<? extends Executable<?>> getRunnerByJobDirectory(File jobdir) {\r
                Services service = getServiceByRunnerName(getRunnerNameByJobDirectory(jobdir));\r
                return getServiceImpl(service);\r
        }\r
@@ -85,8 +85,7 @@ public class ServicesUtil {
 \r
        private static Services getServiceByRunnerName(String name) {\r
                for (Services service : Services.values()) {\r
-                       String runnerName = getServiceImpl(service).getSimpleName()\r
-                                       .toLowerCase();\r
+                       String runnerName = getServiceImpl(service).getSimpleName().toLowerCase();\r
                        name = name.trim().toLowerCase();\r
                        if (name.startsWith(runnerName)) {\r
                                return service;\r