Minor tweaks
authorpvtroshin <pvtroshin@e3abac25-378b-4346-85de-24260fe3988d>
Mon, 27 Jun 2011 15:33:31 +0000 (15:33 +0000)
committerpvtroshin <pvtroshin@e3abac25-378b-4346-85de-24260fe3988d>
Mon, 27 Jun 2011 15:33:31 +0000 (15:33 +0000)
git-svn-id: link to svn.lifesci.dundee.ac.uk/svn/barton/ptroshin/JABA2@4340 e3abac25-378b-4346-85de-24260fe3988d

conf/Executable.properties
datamodel/compbio/metadata/LimitsManager.java
webservices/compbio/ws/client/WSTester.java

index d43ff97..f345f86 100644 (file)
@@ -78,8 +78,7 @@ local.jronn.bin.windows=D:\\Java\\jdk1.6.0_24\\bin\\java.exe
 local.jronn.bin=/sw/java/latest/bin/java\r
 cluster.jronn.bin=/sw/java/latest/bin/java\r
 jronn.jar.file=binaries/windows/jronn3.1.jar\r
-#jronn.parameters.file=conf/settings/JronnParameters.xml\r
-#jronn.limits.file=conf/settings/JronnLimits.xml\r
+jronn.limits.file=conf/settings/JronnLimits.xml\r
 #jronn.cluster.cpunum=4\r
 #jronn.cluster.settings=-q 64bit-pri.q -pe smp 4 -l h_vmem=1700M -l ram=1700M -l h_cpu=24:00:00\r
 \r
@@ -94,7 +93,7 @@ cluster.disembl.bin=/homes/pvtroshin/workspace/jaba2/binaries/src/disembl/DisEMB
 local.globplot.bin=binaries/src/globplot/GlobPlot.py\r
 cluster.globplot.bin=/homes/pvtroshin/workspace/jaba2/binaries/src/globplot/GlobPlot.py\r
 #globplot.bin.env=PYTHONPATH#/homes/pvtroshin/workspace/jaba2/binaries/src/globplot/biopython-1.50 \r
-#globplot.limits.file=conf/settings/GlobPlotLimits.xml\r
+globplot.limits.file=conf/settings/GlobPlotLimits.xml\r
 #globplot.cluster.settings=-l h_cpu=24:00:00 -l h_vmem=6000M -l ram=6000M\r
 \r
 ### IUPred configuration ### \r
index 9e8dfb4..94de517 100644 (file)
@@ -54,8 +54,14 @@ public class LimitsManager<T> {
 \r
        @Override\r
        public String toString() {\r
-               return "LimitsManager [limits=" + limit + ", runnerClassName="\r
-                               + runnerClassName + "]";\r
+               if (limit == null) {\r
+                       return "";\r
+               }\r
+               String value = "";\r
+               for (Limit<T> lim : limit) {\r
+                       value += lim.toString();\r
+               }\r
+               return value;\r
        }\r
 \r
        /**\r
index 7091f02..4f721fe 100644 (file)
@@ -209,7 +209,7 @@ public class WSTester {
         *             executable does not exists for a server platform\r
         */\r
        @SuppressWarnings("unchecked")\r
-       private <T> boolean checkService(JABAService wservice) {\r
+       private <T> boolean checkService(JABAService wservice, Services service) {\r
                try {\r
                        if (wservice == null) {\r
                                throw new NullPointerException(\r
@@ -219,7 +219,8 @@ public class WSTester {
                        if (wservice instanceof MsaWS) {\r
                                return testMsaWS((MsaWS<T>) wservice);\r
                        } else if (wservice instanceof SequenceAnnotation) {\r
-                               return testSequenceAnnotationWS((SequenceAnnotation<T>) wservice);\r
+                               return testSequenceAnnotationWS(\r
+                                               (SequenceAnnotation<T>) wservice, service);\r
                        } else {\r
                                throw new UnsupportedOperationException("The service: "\r
                                                + wservice.getClass() + " is not supported! ");\r
@@ -230,11 +231,15 @@ public class WSTester {
                }\r
        }\r
 \r
-       private <T> boolean testSequenceAnnotationWS(SequenceAnnotation<T> wservice)\r
-                       throws Exception {\r
+       private <T> boolean testSequenceAnnotationWS(\r
+                       SequenceAnnotation<T> wservice, Services service) throws Exception {\r
                writer.print("Calling analyse.........");\r
-               boolean success = testDefaultAnalyse(loadAlignment(), wservice, null,\r
-                               null);\r
+\r
+               List<FastaSequence> input = loadSeqs();\r
+               if (service == Services.AAConWS) {\r
+                       input = loadAlignment();\r
+               }\r
+               boolean success = testDefaultAnalyse(input, wservice, null, null);\r
 \r
                PresetManager<T> presetman = wservice.getPresets();\r
                if (presetman != null) {\r
@@ -242,8 +247,7 @@ public class WSTester {
                        if (presets != null && !presets.isEmpty()) {\r
                                Preset<T> preset = presets.get(0);\r
                                writer.print("Calling analyse with Preset.........");\r
-                               success = testDefaultAnalyse(loadAlignment(), wservice, preset,\r
-                                               null);\r
+                               success = testDefaultAnalyse(input, wservice, preset, null);\r
                        }\r
                }\r
                testMetadata(wservice);\r
@@ -304,6 +308,7 @@ public class WSTester {
                LimitsManager<T> limits = msaws.getLimits();\r
                if (limits != null && limits.getLimits().size() > 0) {\r
                        writer.println(OK);\r
+                       // writer.println("Limits details: \n" + limits.toString());\r
                } else {\r
                        writer.println(UNSUPPORTED);\r
                }\r
@@ -408,7 +413,7 @@ public class WSTester {
                boolean succeed = false;\r
                try {\r
                        writer.println("Checking service " + service.toString());\r
-                       succeed = checkService(ws);\r
+                       succeed = checkService(ws, service);\r
                } finally {\r
                        FileUtil.closeSilently(((Closeable) ws));\r
                }\r