From: pvtroshin Date: Mon, 18 Apr 2011 14:59:49 +0000 (+0000) Subject: Refactor: X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=021b24f125d8b1e8390e99b4a835469dabdd7be1;p=jabaws.git Refactor: relocate getLimit() method from Util client to Util engine as SkeletalExecutable (part of the engine depends on it) Update compile ant task to get rid of warnings. However, ant still does not complile due to cast issue. TODO later Updating version of utils and datamodel as it includes the utils git-svn-id: link to svn.lifesci.dundee.ac.uk/svn/barton/ptroshin/JABA2@3967 e3abac25-378b-4346-85de-24260fe3988d --- diff --git a/.classpath b/.classpath index 59011e3..6d71866 100644 --- a/.classpath +++ b/.classpath @@ -10,8 +10,8 @@ - + diff --git a/TODO.txt b/TODO.txt index e08270c..a0a2706 100644 --- a/TODO.txt +++ b/TODO.txt @@ -1,5 +1,11 @@ TODO: +add to help text: To disable a web service remove it from WEB-INF/sun-jaxws.xml descriptor + +add to help: VirtualBox 4.0.4 works fine with JABAWS update links + +rename jaba.war to jabaws.war and make sure jabaws context path is used throughout. + Current stat collector has to rely on file dates! Test all WS as names from Executables were removed diff --git a/WEB-INF/lib/compbio-util-1.3.jar b/WEB-INF/lib/compbio-util-1.3.jar deleted file mode 100644 index 9042b5a..0000000 Binary files a/WEB-INF/lib/compbio-util-1.3.jar and /dev/null differ diff --git a/WEB-INF/lib/compbio-util-1.4.jar b/WEB-INF/lib/compbio-util-1.4.jar new file mode 100644 index 0000000..7abd95e Binary files /dev/null and b/WEB-INF/lib/compbio-util-1.4.jar differ diff --git a/build.xml b/build.xml index 5597457..f368ec3 100644 --- a/build.xml +++ b/build.xml @@ -1,14 +1,14 @@ - + - + - + @@ -27,8 +27,8 @@ - - + + @@ -43,7 +43,7 @@ - + @@ -72,41 +72,41 @@ - - + + - - + + - - + + - - + + - - - + + + - - - - - + + + + + - - - + + + - - - + + + + - - - + + + - - - + + + + - Jar file: Minimal WS client jar - - - - - - - - - - - - - - - - - - - - + Jar file: Minimal WS client jar + + + + + + + + + + + + + + + + + + + + + Jar file: Minimal WS client jar - + + - + @@ -191,41 +191,43 @@ - + - Jar file: AAConWS client jar - - - - - - - - - - - - - - - - - + Jar file: AAConWS client jar + + + + + + + + + + + + + + + + + + - + + - + - + - + - + @@ -236,10 +238,10 @@ - + - - + + @@ -250,26 +252,27 @@ - Jar file: Full WS client jar - - - - - - - - - - - - - - - - - - - + Jar file: Full WS client jar + + + + + + + + + + + + + + + + + + + + Packing binaries, and configuration files @@ -280,51 +283,53 @@ - + - Jar file: Full WS client jar - - - - - - - - - - - - - - - - - - - - - - - + Jar file: Full WS client jar + + + + + + + + + + + + + + + + + + + + + + + + + - + - - + + - - - + + + - - + + @@ -336,101 +341,108 @@ - Preparing war file without JAXWS and binaries - - - - - - - - - - - - - - - - - - - - + Preparing war file without JAXWS and binaries + + + + + + + + + + + + + + + + + + + + + + - Packing data for internal web site - - - - - - - + Packing data for internal web site + + + + + + + + - Preparing war file without JAXWS - + Preparing war file without JAXWS + + - + - + - Preparing war file without JAXWS - + Preparing war file without JAXWS + + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + - Preparing a complete war file - - - - - + Preparing a complete war file + + + + + - Preparing a complete war file - - - - - + Preparing a complete war file + + + + + - Preparing a complete war file - - - - - - + Preparing a complete war file + + + + + + - + + @@ -455,142 +467,143 @@ --> - + - + + - + - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + - + - + \ No newline at end of file diff --git a/engine/compbio/engine/client/PathValidator.java b/engine/compbio/engine/client/PathValidator.java index c59c957..97b5315 100644 --- a/engine/compbio/engine/client/PathValidator.java +++ b/engine/compbio/engine/client/PathValidator.java @@ -46,6 +46,9 @@ public final class PathValidator { } } + /* + * TODO move to Utils + */ public static boolean isValidDirectory(String directory) { if (Util.isEmpty(directory)) { return false; diff --git a/engine/compbio/engine/client/SkeletalExecutable.java b/engine/compbio/engine/client/SkeletalExecutable.java index 19fde7e..744bb33 100644 --- a/engine/compbio/engine/client/SkeletalExecutable.java +++ b/engine/compbio/engine/client/SkeletalExecutable.java @@ -323,7 +323,7 @@ public abstract class SkeletalExecutable implements Executable { public LimitsManager getLimits() { synchronized (SkeletalExecutable.class) { if (limits == null) { - limits = compbio.runner.Util.getLimits(this.getType()); + limits = compbio.engine.client.Util.getLimits(this.getType()); } } return limits; diff --git a/engine/compbio/engine/client/Util.java b/engine/compbio/engine/client/Util.java index afe2b6c..63181ea 100644 --- a/engine/compbio/engine/client/Util.java +++ b/engine/compbio/engine/client/Util.java @@ -32,6 +32,7 @@ import compbio.engine.client.Executable.ExecProvider; import compbio.engine.conf.DirectoryManager; import compbio.engine.conf.PropertyHelperManager; import compbio.metadata.JobStatus; +import compbio.metadata.LimitsManager; import compbio.metadata.ResultNotAvailableException; import compbio.util.FileUtil; import compbio.util.PropertyHelper; @@ -303,4 +304,37 @@ public final class Util { return exec; } + /** + * For now just assume that all parameters which came in needs setting it + * will be a client responsibility to prepare RunnerConfig object then + * + * @param rconfig + * @return + * + * public static List toOptionString(RunnerConfig + * rconfig) { String option = ""; List options = new + * ArrayList(); for (Parameter par : + * rconfig.getParameters()) { if (par.getPossibleValues().isEmpty()) + * { option = par.getOptionName(); } else { option = + * par.getOptionName() + "=" + par.getPossibleValues().get(0); } // + * separate options options.add(option); } return options; } + */ + + public static LimitsManager getLimits(Class> clazz) { + LimitsManager limits = null; + try { + limits = ConfExecutable.getRunnerLimits(clazz); + } catch (FileNotFoundException e) { + Util.log.warn( + "No limits are found for " + clazz + " executable! " + + e.getLocalizedMessage(), e.getCause()); + // its ok, limit may not be initialized + } catch (IOException e) { + Util.log.warn("IO exception while attempting to read limits for " + + clazz + " executable! " + e.getLocalizedMessage(), + e.getCause()); + } + return limits; + } + } diff --git a/runner/compbio/runner/Util.java b/runner/compbio/runner/Util.java index bfced2a..47f169b 100644 --- a/runner/compbio/runner/Util.java +++ b/runner/compbio/runner/Util.java @@ -37,53 +37,19 @@ import compbio.engine.client.ConfExecutable; import compbio.engine.client.ConfiguredExecutable; import compbio.engine.client.Executable; import compbio.engine.conf.PropertyHelperManager; -import compbio.metadata.LimitsManager; import compbio.metadata.PresetManager; import compbio.metadata.RunnerConfig; import compbio.util.PropertyHelper; public final class Util { - private static Logger log = Logger.getLogger(Util.class); + public static Logger log = Logger.getLogger(Util.class); private static final PropertyHelper ph = PropertyHelperManager .getPropertyHelper(); public static final String SPACE = " "; - /** - * For now just assume that all parameters which came in needs setting it - * will be a client responsibility to prepare RunnerConfig object then - * - * @param rconfig - * @return - * - * public static List toOptionString(RunnerConfig - * rconfig) { String option = ""; List options = new - * ArrayList(); for (Parameter par : - * rconfig.getParameters()) { if (par.getPossibleValues().isEmpty()) - * { option = par.getOptionName(); } else { option = - * par.getOptionName() + "=" + par.getPossibleValues().get(0); } // - * separate options options.add(option); } return options; } - */ - - public static LimitsManager getLimits(Class> clazz) { - LimitsManager limits = null; - try { - limits = ConfExecutable.getRunnerLimits(clazz); - } catch (FileNotFoundException e) { - log.warn( - "No limits are found for " + clazz + " executable! " - + e.getLocalizedMessage(), e.getCause()); - // its ok, limit may not be initialized - } catch (IOException e) { - log.warn("IO exception while attempting to read limits for " - + clazz + " executable! " + e.getLocalizedMessage(), - e.getCause()); - } - return limits; - } - public static synchronized RunnerConfig getSupportedOptions( Class> clazz) { try { diff --git a/testsrc/compbio/metadata/AllTestSuit.java b/testsrc/compbio/metadata/AllTestSuit.java index 794565a..24ca11d 100644 --- a/testsrc/compbio/metadata/AllTestSuit.java +++ b/testsrc/compbio/metadata/AllTestSuit.java @@ -32,21 +32,21 @@ public class AllTestSuit { .getPresets(ClustalW.class); public static final RunnerConfig CLUSTAL_PARAMETERS = Util .getSupportedOptions(ClustalW.class); - public static final LimitsManager CLUSTAL_LIMITS = Util + public static final LimitsManager CLUSTAL_LIMITS = compbio.engine.client.Util .getLimits(new ClustalW().getType()); public static final PresetManager TCOFFEE_PRESETS = Util .getPresets(Tcoffee.class); public static final RunnerConfig TCOFFEE_PARAMETERS = Util .getSupportedOptions(Tcoffee.class); - public static final LimitsManager TCOFFEE_LIMITS = Util + public static final LimitsManager TCOFFEE_LIMITS = compbio.engine.client.Util .getLimits(new Tcoffee().getType()); public static final PresetManager MUSCLE_PRESETS = Util .getPresets(Muscle.class); public static final RunnerConfig MUSCLE_PARAMETERS = Util .getSupportedOptions(Muscle.class); - public static final LimitsManager MUSCLE_LIMITS = Util + public static final LimitsManager MUSCLE_LIMITS = compbio.engine.client.Util .getLimits(new Muscle().getType()); public final static String test_group_cluster = "cluster"; diff --git a/webservices/compbio/ws/server/AAConWS.java b/webservices/compbio/ws/server/AAConWS.java index e6f8122..1ffbbf3 100644 --- a/webservices/compbio/ws/server/AAConWS.java +++ b/webservices/compbio/ws/server/AAConWS.java @@ -51,7 +51,7 @@ public class AAConWS implements SequenceAnnotation { private static final PresetManager aaconPresets = Util .getPresets(AACon.class); - private static final LimitsManager limitMan = compbio.runner.Util + private static final LimitsManager limitMan = compbio.engine.client.Util .getLimits(new AACon().getType()); ConfiguredExecutable init(List sequences) diff --git a/webservices/compbio/ws/server/ClustalWS.java b/webservices/compbio/ws/server/ClustalWS.java index a5fc701..93d0c7f 100644 --- a/webservices/compbio/ws/server/ClustalWS.java +++ b/webservices/compbio/ws/server/ClustalWS.java @@ -66,7 +66,7 @@ public class ClustalWS implements MsaWS { private static final PresetManager clustalPresets = Util .getPresets(ClustalW.class); - private static final LimitsManager limitMan = compbio.runner.Util + private static final LimitsManager limitMan = compbio.engine.client.Util .getLimits(new ClustalW().getType()); /* diff --git a/webservices/compbio/ws/server/DisemblWS.java b/webservices/compbio/ws/server/DisemblWS.java index 62f70d3..213711c 100644 --- a/webservices/compbio/ws/server/DisemblWS.java +++ b/webservices/compbio/ws/server/DisemblWS.java @@ -47,7 +47,7 @@ public class DisemblWS implements SequenceAnnotation { private static final PresetManager disemblPresets = Util .getPresets(Disembl.class); - private static final LimitsManager limitMan = compbio.runner.Util + private static final LimitsManager limitMan = compbio.engine.client.Util .getLimits(new Disembl().getType()); ConfiguredExecutable init(List sequences) diff --git a/webservices/compbio/ws/server/GlobPlotWS.java b/webservices/compbio/ws/server/GlobPlotWS.java index 603c7dd..affe48e 100644 --- a/webservices/compbio/ws/server/GlobPlotWS.java +++ b/webservices/compbio/ws/server/GlobPlotWS.java @@ -47,7 +47,7 @@ public class GlobPlotWS implements SequenceAnnotation { private static final PresetManager globPlotPresets = Util .getPresets(GlobPlot.class); - private static final LimitsManager limitMan = compbio.runner.Util + private static final LimitsManager limitMan = compbio.engine.client.Util .getLimits(new GlobPlot().getType()); ConfiguredExecutable init(List sequences) diff --git a/webservices/compbio/ws/server/JronnWS.java b/webservices/compbio/ws/server/JronnWS.java index 202cad1..97d4ceb 100644 --- a/webservices/compbio/ws/server/JronnWS.java +++ b/webservices/compbio/ws/server/JronnWS.java @@ -49,7 +49,7 @@ public class JronnWS implements SequenceAnnotation { private static final PresetManager jronnPresets = Util .getPresets(Jronn.class); - private static final LimitsManager limitMan = compbio.runner.Util + private static final LimitsManager limitMan = compbio.engine.client.Util .getLimits(new Jronn().getType()); ConfiguredExecutable init(List sequences) diff --git a/webservices/compbio/ws/server/MafftWS.java b/webservices/compbio/ws/server/MafftWS.java index d2de592..9b74ce6 100644 --- a/webservices/compbio/ws/server/MafftWS.java +++ b/webservices/compbio/ws/server/MafftWS.java @@ -64,7 +64,7 @@ public class MafftWS implements MsaWS { private static final PresetManager mafftPresets = Util .getPresets(Mafft.class); - private static final LimitsManager limitMan = compbio.runner.Util + private static final LimitsManager limitMan = compbio.engine.client.Util .getLimits(new Mafft().getType()); @Override diff --git a/webservices/compbio/ws/server/MuscleWS.java b/webservices/compbio/ws/server/MuscleWS.java index d6a9ba1..80f67b2 100644 --- a/webservices/compbio/ws/server/MuscleWS.java +++ b/webservices/compbio/ws/server/MuscleWS.java @@ -64,7 +64,7 @@ public class MuscleWS implements MsaWS { private static final PresetManager musclePresets = Util .getPresets(Muscle.class); - private static final LimitsManager limitMan = compbio.runner.Util + private static final LimitsManager limitMan = compbio.engine.client.Util .getLimits(new Muscle().getType()); @Override diff --git a/webservices/compbio/ws/server/ProbconsWS.java b/webservices/compbio/ws/server/ProbconsWS.java index 3600c46..586352b 100644 --- a/webservices/compbio/ws/server/ProbconsWS.java +++ b/webservices/compbio/ws/server/ProbconsWS.java @@ -61,7 +61,7 @@ public class ProbconsWS implements MsaWS { private static final RunnerConfig probconsOptions = Util .getSupportedOptions(Probcons.class); - private static final LimitsManager limitMan = compbio.runner.Util + private static final LimitsManager limitMan = compbio.engine.client.Util .getLimits(new Probcons().getType()); @Override diff --git a/webservices/compbio/ws/server/TcoffeeWS.java b/webservices/compbio/ws/server/TcoffeeWS.java index 5608a53..feb35f0 100644 --- a/webservices/compbio/ws/server/TcoffeeWS.java +++ b/webservices/compbio/ws/server/TcoffeeWS.java @@ -66,7 +66,7 @@ public class TcoffeeWS implements MsaWS { private static final PresetManager tcoffeePresets = Util .getPresets(Tcoffee.class); - private static final LimitsManager limitMan = compbio.runner.Util + private static final LimitsManager limitMan = compbio.engine.client.Util .getLimits(new Tcoffee().getType()); @Override diff --git a/website/archive/datamodel-1.1.jar b/website/archive/datamodel-1.1.jar new file mode 100644 index 0000000..36dfa7f Binary files /dev/null and b/website/archive/datamodel-1.1.jar differ