From: pvtroshin Date: Fri, 17 Jun 2011 14:06:30 +0000 (+0000) Subject: Refactoring of all SequenceAnnotation web services X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=603a6be6b9459625f535bf42c6d8ec5462e218e2;p=jabaws.git Refactoring of all SequenceAnnotation web services New version of Metro Definition for IUPred exec Stubs regenerated git-svn-id: link to svn.lifesci.dundee.ac.uk/svn/barton/ptroshin/JABA2@4280 e3abac25-378b-4346-85de-24260fe3988d --- diff --git a/TODO.txt b/TODO.txt index ac892fa..ca7bc9c 100644 --- a/TODO.txt +++ b/TODO.txt @@ -1,5 +1,8 @@ +TODO write some help on the executable.properties within this file! check that after binaries relocation build tasks point to correct locations! GET rid of binaries/help directory! +update binaries + TODO: Registry 1 week webservices - 1 week diff --git a/WEB-INF/lib/webservices-api.jar b/WEB-INF/lib/webservices-api.jar index 87294ed..84f50ae 100644 Binary files a/WEB-INF/lib/webservices-api.jar and b/WEB-INF/lib/webservices-api.jar differ diff --git a/WEB-INF/lib/webservices-rt.jar b/WEB-INF/lib/webservices-rt.jar index c7b7086..6741549 100644 Binary files a/WEB-INF/lib/webservices-rt.jar and b/WEB-INF/lib/webservices-rt.jar differ diff --git a/WEB-INF/lib/webservices-tools.jar b/WEB-INF/lib/webservices-tools.jar index 651722d..e0426b8 100644 Binary files a/WEB-INF/lib/webservices-tools.jar and b/WEB-INF/lib/webservices-tools.jar differ diff --git a/conf/Executable.properties b/conf/Executable.properties index b9bdac3..f0b72c8 100644 --- a/conf/Executable.properties +++ b/conf/Executable.properties @@ -30,6 +30,7 @@ muscle.cluster.settings=-l h_cpu=24:00:00 -l h_vmem=6000M -l ram=6000M #local.mafft.bin.windows= local.mafft.bin=binaries/src/mafft/binaries/mafft cluster.mafft.bin=/homes/pvtroshin/workspace/jaba2/binaries/src/mafft/core/mafft +# These paths will be converted to absolute if relative. mafft.bin.env=MAFFT_BINARIES#binaries/src/mafft/binaries;FASTA_4_MAFFT#binaries/src/fasta34/fasta34; mafft.--aamatrix.path=binaries/matrices mafft.presets.file=conf/settings/MafftPresets.xml @@ -92,7 +93,9 @@ globplot.cluster.settings=-l h_cpu=24:00:00 -l h_vmem=6000M -l ram=6000M local.iupred.bin.windows=binaries/windows/iupred/iupred.exe local.iupred.bin=binaries/src/iupred/iupred # This must point to the directory where iupred binary is, with other files it depends on -iupred.bin.env=IUPred_PATH#/homes/pvtroshin/workspace/jaba2/binaries/src/iupred +#iupred.bin.env=IUPred_PATH#/homes/pvtroshin/workspace/jaba2/binaries/src/iupred +# This path will be converted to absolute if relative. +iupred.bin.env=IUPred_PATH#binaries/src/iupred cluster.iupred.bin=/homes/pvtroshin/workspace/jaba2/binaries/src/iupred/iupred iupred.parameters.file=conf/settings/IUPredParameters.xml iupred.limits.file=conf/settings/IUPredLimits.xml diff --git a/datamodel/compbio/data/sequence/FastaReader.java b/datamodel/compbio/data/sequence/FastaReader.java index 2e1357f..38f1ccb 100644 --- a/datamodel/compbio/data/sequence/FastaReader.java +++ b/datamodel/compbio/data/sequence/FastaReader.java @@ -19,6 +19,7 @@ package compbio.data.sequence; import java.io.File; import java.io.FileNotFoundException; +import java.io.InputStream; import java.util.Iterator; import java.util.Scanner; @@ -92,6 +93,19 @@ public class FastaReader implements Iterator { } }); } + + /** + * This class will not close the incoming stream! So the client should do + * so. + * + * @param inputStream + * @throws FileNotFoundException + */ + public FastaReader(final InputStream inputStream) + throws FileNotFoundException { + input = new Scanner(inputStream); + input.useDelimiter("\\s*>"); + } /** * {@inheritDoc} * diff --git a/datamodel/compbio/data/sequence/SequenceUtil.java b/datamodel/compbio/data/sequence/SequenceUtil.java index 1c6d2e8..d65494e 100644 --- a/datamodel/compbio/data/sequence/SequenceUtil.java +++ b/datamodel/compbio/data/sequence/SequenceUtil.java @@ -41,8 +41,9 @@ import compbio.util.Util; /** * Utility class for operations on sequences * - * @author Petr Troshin - * @version 1.0 + * @author Peter Troshin + * @since 1.0 + * @version 2.0 June 2011 */ public final class SequenceUtil { @@ -99,19 +100,6 @@ public final class SequenceUtil { private SequenceUtil() { } // utility class, no instantiation - /* - * public static void write_PirSeq(OutputStream os, FastaSequence seq) - * throws IOException { BufferedWriter pir_out = new BufferedWriter(new - * OutputStreamWriter(os)); pir_out.write(">P1;" + seq.getId() + - * SysPrefs.newlinechar); pir_out.write(seq.getSequence() + - * SysPrefs.newlinechar); pir_out.close(); } public static void - * write_FastaSeq(OutputStream os, FastaSequence seq) throws IOException { - * BufferedWriter fasta_out = new BufferedWriter( new - * OutputStreamWriter(os)); fasta_out.write(">" + seq.getId() + - * SysPrefs.newlinechar); fasta_out.write(seq.getSequence() + - * SysPrefs.newlinechar); fasta_out.close(); } - */ - /** * @return true is the sequence contains only letters a,c, t, g, u */ @@ -268,28 +256,11 @@ public final class SequenceUtil { public static List readFasta(final InputStream inStream) throws IOException { final List seqs = new ArrayList(); - - final BufferedReader infasta = new BufferedReader( - new InputStreamReader(inStream, "UTF8"), 16000); - final Pattern pattern = Pattern.compile("//s+"); - - String line; - String sname = "", seqstr = null; - do { - line = infasta.readLine(); - if ((line == null) || line.startsWith(">")) { - if (seqstr != null) { - seqs.add(new FastaSequence(sname.substring(1), seqstr)); - } - sname = line; // remove > - seqstr = ""; - } else { - final String subseq = pattern.matcher(line).replaceAll(""); - seqstr += subseq; - } - } while (line != null); - - infasta.close(); + FastaReader reader = new FastaReader(inStream); + while (reader.hasNext()) { + seqs.add(reader.next()); + } + inStream.close(); return seqs; } diff --git a/engine/compbio/engine/client/EnvVariableProcessor.java b/engine/compbio/engine/client/EnvVariableProcessor.java index b968857..3423c8f 100644 --- a/engine/compbio/engine/client/EnvVariableProcessor.java +++ b/engine/compbio/engine/client/EnvVariableProcessor.java @@ -49,7 +49,7 @@ public class EnvVariableProcessor { if (containsMultipleVariables(property)) { return property.split(NEXT_ENV_PROPERTY_DELIMITER); } - return new String[] { property }; + return new String[]{property}; } static String getEnvVariableName(String property) { @@ -92,6 +92,7 @@ public class EnvVariableProcessor { */ private final static String mafft_binaries = "MAFFT_BINARIES"; private final static String fasta4mafft = "FASTA_4_MAFFT"; + private final static String iupred_path = "IUPred_PATH"; public static Map getEnvVariables(String property, Class clazz) { @@ -101,12 +102,11 @@ public class EnvVariableProcessor { } for (String evar : getEnvVariableList(property)) { if (!isValidEnvVariableProperty(evar)) { - log - .error(clazz.getName() - + " environment variable is specified by is NOT VALID! Skipping. " - + "Valid format is propertyName" - + PROP_NAME_VALUE_SEPARATOR + "propertyValue. " - + "Given values is: " + evar); + log.error(clazz.getName() + + " environment variable is specified by is NOT VALID! Skipping. " + + "Valid format is propertyName" + + PROP_NAME_VALUE_SEPARATOR + "propertyValue. " + + "Given values is: " + evar); } String varName = getEnvVariableName(evar); String varValue = getEnvVariableValue(evar); @@ -114,7 +114,8 @@ public class EnvVariableProcessor { if (!PathValidator.isAbsolutePath(varValue)) { varName = varName.trim(); if (varName.equalsIgnoreCase(mafft_binaries) - || varName.equalsIgnoreCase(fasta4mafft)) { + || varName.equalsIgnoreCase(fasta4mafft) + || varName.equalsIgnoreCase(iupred_path)) { varValue = compbio.engine.client.Util .convertToAbsolute(varValue); } diff --git a/how_to_add_new_webservice.txt b/how_to_add_new_webservice.txt index 4f62d05..60a5803 100644 --- a/how_to_add_new_webservice.txt +++ b/how_to_add_new_webservice.txt @@ -1,55 +1,80 @@ How To add a new executable -1) Add executable to the binaries folder. If it has source code and can be recompiled for different platforms include it under binaries/src +1) Add executable to the binaries folder. If it has source code and can be +recompiled for different platforms include it under binaries/src Edit binaries/src setexecutableflag.sh and compilebin.sh scripts accordingly. -2) Make sure all the dependencies of the software being installed are satisfied. If there are other binaries they should be included as well. Keep the dependant binaries in subfolder for the main executable. Update compile and setexecflag scripts accordingly. +2) Make sure all the dependencies of the software being installed are satisfied. +If there are other binaries they should be included as well. Keep the dependant +binaries in subfolder for the main executable. Update compile and setexecflag +scripts accordingly. 3) Make sure executable - - Does not have any hard links to its dependencies, e.g. is able to run from any installation folder and does not contain any hardcoded paths. (TODO examples...) + - Does not have any hard links to its dependencies, e.g. is able to run from + any installation folder and does not contain any hard coded paths. + (TODO examples...) -4) Describe executable in conf/Exectuable.properties. The lowcase name of the wrapper should be included in the name of the property for example Clustal properties all include clustal as a part of the name e.g. local.clustalw.bin +4) Describe executable in conf/Exectuable.properties. The lowercase name of the +wrapper should be included in the name of the property for example Clustal +properties all include clustal as a part of the name e.g. local.clustalw.bin The same property for Mafft will be called local.mafft.bin. -5) Add Limit.xml, Parameters.xml and Presets.xml. All are optional (should be at least). If the executable does not support parameters you do not have to refer to the XXXParameter.xml file into the Executable.properties file. The same is true for Presets and Limits. +5) Add Limit.xml, Parameters.xml and +Presets.xml. All are optional (should be at least). If the +executable does not support parameters you do not have to refer to the +XXXParameter.xml file into the Executable.properties file. The same is true for +Presets and Limits. -6) Create a Java wrapper class for your executable. Create it within runner source directory. Examples of other wrappers can be found in compbio.runner.msa or compbio.runner.disorder packages. Wrapper should extend SkeletalExecutable implements PipedExecutable if you need to pass the input or collect the results from the standard in/out. Please see Mafft code as example. Wrapper should expend SkeletalExecutable if input/output can be set as a parameter for an executable. Please see ClustalW code as example. +6) Create a Java wrapper class for your executable. Create it within runner +source directory. Examples of other wrappers can be found in compbio.runner.msa +or compbio.runner.disorder packages. Wrapper should extend SkeletalExecutable +implements PipedExecutable if you need to pass the input or collect the +results from the standard in/out. Please see Mafft code as example. Wrapper +should expend SkeletalExecutable if input/output can be set as a parameter +for an executable. Please see ClustalW code as example. 7) Create a testcase suit for your wrapper and run the test cases. -8) Create parser for the output files of your executable. Suggested location compbio.data.sequence.SequenceUtil +8) Create parser for the output files of your executable. Suggested location +compbio.data.sequence.SequenceUtil 9) Test the parser 10) Decide which web services interface your executable is going to match. - For example if the executable output can be represented as SequenceAnnotation then SequenceAnnotation interface might be appropriate. + For example if the executable output can be represented as + SequenceAnnotation then SequenceAnnotation interface might be appropriate. For multiple sequence alignment an Msa interface should be used. -11) If you find a web interface that matches your returning data type, then implement a web service which confirms to it within a webservices source folder +11) If you find a web interface that matches your returning data type, then +implement a web service which confirms to it within a webservices source folder 12) Register web service in WEB-INF/ web.xml and sun-jaxws.xml 13) Add generated wsdl to wsbuild.xml ant script to generate the stubs -14) Run build-server task in wsbuild file. Watch for errors. If the task fails that means that JAXB cannot serialize some of the data structures. Add appropriate annotations to your data types. +14) Run build-server task in wsbuild file. Watch for errors. If the task fails +that means that JAXB cannot serialize some of the data structures. Add +appropriate annotations to your data types. Also check that - you do not have interfaces to serialize. JAXB cannot serialize them. - you have a default no args constructor (can be private if you do not need it) - JAXB cannot serialize a Map, use custom data structure instead! - - Enum cannot be serialized as its abstract class (do not confuse with enum which is fine) - - Fields serialization leave a little more space for manoeuvre, so use it. If you do then you can accept and return interfaces, e.g. List, Map; abstract classes etc, from your methods. + - Enum cannot be serialized as its abstract class (do not confuse with enum + which is fine) + - Fields serialization leave a little more space for manoeuvre, so use it. If + you do then you can accept and return interfaces, e.g. List, Map; abstract + classes etc, from your methods. -If you have the data on the server side, but nothing is coming through to the client, this is a JAXB serialization problem. They tend to be very silent and thus hard to debug. Check your data structure can be serialized! +If you have the data on the server side, but nothing is coming through to the +client, this is a JAXB serialization problem. They tend to be very silent and +thus hard to debug. Check your data structure can be serialized! -13) Modify the client to work with your web service. +13) Modify the client to work with your new web service. Update Services +enumeration to include new service and ensure that all the methods of this +enumeration take into account the new service. Update the client help text +(client_help.txt) and insert it into the Constraints class. -14) Test. +14) Test the web service with the client 15) Test on the cluster... - - - - - - diff --git a/runner/compbio/runner/Util.java b/runner/compbio/runner/Util.java index 47f169b..41bddd4 100644 --- a/runner/compbio/runner/Util.java +++ b/runner/compbio/runner/Util.java @@ -37,6 +37,7 @@ import compbio.engine.client.ConfExecutable; import compbio.engine.client.ConfiguredExecutable; import compbio.engine.client.Executable; import compbio.engine.conf.PropertyHelperManager; +import compbio.metadata.JobSubmissionException; import compbio.metadata.PresetManager; import compbio.metadata.RunnerConfig; import compbio.util.PropertyHelper; @@ -113,18 +114,20 @@ public final class Util { } public static void writeInput(List sequences, - ConfiguredExecutable exec) { + ConfiguredExecutable exec) throws JobSubmissionException { - File filein = new File(exec.getInput()); try { + File filein = new File(exec.getInput()); FileOutputStream fout = new FileOutputStream(filein); log.debug("File path: " + filein.getAbsolutePath()); SequenceUtil.writeFasta(fout, sequences); fout.close(); - } catch (FileNotFoundException e) { - e.printStackTrace(); } catch (IOException e) { - e.printStackTrace(); + log.error("IOException while writing input file into the disk: " + + e.getLocalizedMessage(), e); + throw new JobSubmissionException( + "We are sorry by JABAWS server seems to have a problem! " + + e.getLocalizedMessage(), e); } } diff --git a/testsrc/compbio/ws/client/TestAAConWS.java b/testsrc/compbio/ws/client/TestAAConWS.java index 0954a2b..488d239 100644 --- a/testsrc/compbio/ws/client/TestAAConWS.java +++ b/testsrc/compbio/ws/client/TestAAConWS.java @@ -80,7 +80,7 @@ public class TestAAConWS { assertEquals(result.asSet().size(), 1); assertEquals(result.asSet().iterator().next().getMethod(), - ConservationMethod.SHENKIN); + ConservationMethod.SHENKIN.toString()); List scores = result.asSet().iterator().next().getScores(); assertNotNull(scores); assertEquals(scores.size(), 568); diff --git a/webservices/compbio/data/msa/jaxws/JobSubmissionExceptionBean.java b/webservices/compbio/data/msa/jaxws/JobSubmissionExceptionBean.java index 30950b4..869aea5 100644 --- a/webservices/compbio/data/msa/jaxws/JobSubmissionExceptionBean.java +++ b/webservices/compbio/data/msa/jaxws/JobSubmissionExceptionBean.java @@ -9,8 +9,8 @@ import javax.xml.bind.annotation.XmlType; /** * This class was generated by the JAX-WS RI. - * JAX-WS RI 2.2.1-hudson-28- - * Generated source version: 2.2.1 + * JAX-WS RI 2.2.3-b01- + * Generated source version: 2.2.3 * */ @XmlRootElement(name = "JobSubmissionException", namespace = "http://msa.data.compbio/01/12/2010/") diff --git a/webservices/compbio/data/msa/jaxws/LimitExceededExceptionBean.java b/webservices/compbio/data/msa/jaxws/LimitExceededExceptionBean.java index c9c3a4e..9e63199 100644 --- a/webservices/compbio/data/msa/jaxws/LimitExceededExceptionBean.java +++ b/webservices/compbio/data/msa/jaxws/LimitExceededExceptionBean.java @@ -9,8 +9,8 @@ import javax.xml.bind.annotation.XmlType; /** * This class was generated by the JAX-WS RI. - * JAX-WS RI 2.2.1-hudson-28- - * Generated source version: 2.2.1 + * JAX-WS RI 2.2.3-b01- + * Generated source version: 2.2.3 * */ @XmlRootElement(name = "LimitExceededException", namespace = "http://msa.data.compbio/01/12/2010/") diff --git a/webservices/compbio/data/msa/jaxws/ResultNotAvailableExceptionBean.java b/webservices/compbio/data/msa/jaxws/ResultNotAvailableExceptionBean.java index be8a26d..79f413a 100644 --- a/webservices/compbio/data/msa/jaxws/ResultNotAvailableExceptionBean.java +++ b/webservices/compbio/data/msa/jaxws/ResultNotAvailableExceptionBean.java @@ -9,8 +9,8 @@ import javax.xml.bind.annotation.XmlType; /** * This class was generated by the JAX-WS RI. - * JAX-WS RI 2.2.1-hudson-28- - * Generated source version: 2.2.1 + * JAX-WS RI 2.2.3-b01- + * Generated source version: 2.2.3 * */ @XmlRootElement(name = "ResultNotAvailableException", namespace = "http://msa.data.compbio/01/12/2010/") diff --git a/webservices/compbio/data/msa/jaxws/UnsupportedRuntimeExceptionBean.java b/webservices/compbio/data/msa/jaxws/UnsupportedRuntimeExceptionBean.java index 5e1268a..b349081 100644 --- a/webservices/compbio/data/msa/jaxws/UnsupportedRuntimeExceptionBean.java +++ b/webservices/compbio/data/msa/jaxws/UnsupportedRuntimeExceptionBean.java @@ -9,8 +9,8 @@ import javax.xml.bind.annotation.XmlType; /** * This class was generated by the JAX-WS RI. - * JAX-WS RI 2.2.1-hudson-28- - * Generated source version: 2.2.1 + * JAX-WS RI 2.2.3-b01- + * Generated source version: 2.2.3 * */ @XmlRootElement(name = "UnsupportedRuntimeException", namespace = "http://msa.data.compbio/01/12/2010/") diff --git a/webservices/compbio/data/msa/jaxws/WrongParameterExceptionBean.java b/webservices/compbio/data/msa/jaxws/WrongParameterExceptionBean.java index 62be910..630d8a5 100644 --- a/webservices/compbio/data/msa/jaxws/WrongParameterExceptionBean.java +++ b/webservices/compbio/data/msa/jaxws/WrongParameterExceptionBean.java @@ -9,8 +9,8 @@ import javax.xml.bind.annotation.XmlType; /** * This class was generated by the JAX-WS RI. - * JAX-WS RI 2.2.1-hudson-28- - * Generated source version: 2.2.1 + * JAX-WS RI 2.2.3-b01- + * Generated source version: 2.2.3 * */ @XmlRootElement(name = "WrongParameterException", namespace = "http://msa.data.compbio/01/12/2010/") diff --git a/webservices/compbio/ws/client/Constraints.java b/webservices/compbio/ws/client/Constraints.java index 6cb6992..e76ee6a 100644 --- a/webservices/compbio/ws/client/Constraints.java +++ b/webservices/compbio/ws/client/Constraints.java @@ -32,7 +32,7 @@ class Constraints { + "-h= - a full URL to the JABAWS web server including context \r\n" + " path e.g. http://10.31.1.159:8080/ws\r\n" + "-s= - one of [MafftWS, MuscleWS, ClustalWS, TcoffeeWS, ProbconsWS, \r\n" - + " AAConWS, JronnWS, DisemblWS, GlobPlotWS]\r\n" + + " AAConWS, JronnWS, DisemblWS, GlobPlotWS, IUPredWS]\r\n" + " is required for all ACTIONS but -list_services\r\n" + "\r\n" + "ACTIONS: \r\n" diff --git a/webservices/compbio/ws/client/IOHelper.java b/webservices/compbio/ws/client/IOHelper.java index 88b695a..137c570 100644 --- a/webservices/compbio/ws/client/IOHelper.java +++ b/webservices/compbio/ws/client/IOHelper.java @@ -112,6 +112,9 @@ public class IOHelper { * the AACon scores to output */ static void writeOut(Writer writer, ScoreManager results) { + if (results == null) { + return; + } try { results.writeOut(writer); } catch (IOException e) { diff --git a/webservices/compbio/ws/client/Services.java b/webservices/compbio/ws/client/Services.java index 1048fb8..a7b9969 100644 --- a/webservices/compbio/ws/client/Services.java +++ b/webservices/compbio/ws/client/Services.java @@ -33,6 +33,7 @@ import compbio.engine.client.Executable; import compbio.runner.conservation.AACon; import compbio.runner.disorder.Disembl; import compbio.runner.disorder.GlobPlot; +import compbio.runner.disorder.IUPred; import compbio.runner.disorder.Jronn; import compbio.runner.msa.ClustalW; import compbio.runner.msa.Mafft; @@ -45,7 +46,7 @@ import compbio.runner.msa.Tcoffee; * */ public enum Services { - MafftWS, MuscleWS, ClustalWS, TcoffeeWS, ProbconsWS, AAConWS, JronnWS, DisemblWS, GlobPlotWS, IUPred; + MafftWS, MuscleWS, ClustalWS, TcoffeeWS, ProbconsWS, AAConWS, JronnWS, DisemblWS, GlobPlotWS, IUPredWS; public static Services getService(String servName) { servName = servName.trim().toLowerCase(); @@ -89,6 +90,8 @@ public enum Services { return GlobPlot.class; case JronnWS : return Jronn.class; + case IUPredWS : + return IUPred.class; default : throw new RuntimeException( "Unknown web service implementation class for service: " @@ -153,7 +156,7 @@ public enum Services { case JronnWS : case DisemblWS : case GlobPlotWS : - + case IUPredWS : return SequenceAnnotation.class; // deliberate leaking diff --git a/webservices/compbio/ws/client/client_help.txt b/webservices/compbio/ws/client/client_help.txt index 7c70d4f..63947b1 100644 --- a/webservices/compbio/ws/client/client_help.txt +++ b/webservices/compbio/ws/client/client_help.txt @@ -6,7 +6,7 @@ Usage: -h=host_and_context <-s=serviceName> ACTION [OPT -h= - a full URL to the JABAWS web server including context path e.g. http://10.31.1.159:8080/ws -s= - one of [MafftWS, MuscleWS, ClustalWS, TcoffeeWS, ProbconsWS, - AAConWS, JronnWS, DisemblWS, GlobPlotWS] + AAConWS, JronnWS, DisemblWS, GlobPlotWS, IUPredWS] is required for all ACTIONS but -list_services ACTIONS: diff --git a/webservices/compbio/ws/server/AAConWS.java b/webservices/compbio/ws/server/AAConWS.java index 1625ded..4cbebf2 100644 --- a/webservices/compbio/ws/server/AAConWS.java +++ b/webservices/compbio/ws/server/AAConWS.java @@ -4,74 +4,31 @@ import java.io.File; import java.util.Arrays; import java.util.List; -import javax.annotation.Resource; import javax.jws.WebService; -import javax.xml.ws.WebServiceContext; import org.apache.log4j.Logger; import compbio.data.msa.SequenceAnnotation; import compbio.data.sequence.FastaSequence; -import compbio.data.sequence.ScoreManager; -import compbio.engine.AsyncExecutor; import compbio.engine.Configurator; import compbio.engine.client.ConfiguredExecutable; -import compbio.engine.client.SkeletalExecutable; import compbio.metadata.ChunkHolder; -import compbio.metadata.JobStatus; import compbio.metadata.JobSubmissionException; -import compbio.metadata.Limit; import compbio.metadata.LimitExceededException; -import compbio.metadata.LimitsManager; -import compbio.metadata.Option; -import compbio.metadata.Preset; -import compbio.metadata.PresetManager; -import compbio.metadata.ResultNotAvailableException; -import compbio.metadata.RunnerConfig; import compbio.metadata.UnsupportedRuntimeException; -import compbio.metadata.WrongParameterException; -import compbio.runner.Util; import compbio.runner.conservation.AACon; @WebService(endpointInterface = "compbio.data.msa.SequenceAnnotation", targetNamespace = "http://msa.data.compbio/01/12/2010/", serviceName = "AAConWS") -public class AAConWS implements SequenceAnnotation { - - // Ask for resource injection - @Resource - WebServiceContext wsContext; - - private static Logger statLog = Logger.getLogger("AAConWS-stats"); +public class AAConWS extends SAService + implements + SequenceAnnotation { private static Logger log = Logger.getLogger(AAConWS.class); - private static final RunnerConfig aaconOptions = Util - .getSupportedOptions(AACon.class); - - private static final PresetManager aaconPresets = Util - .getPresets(AACon.class); - - private static final LimitsManager limitMan = compbio.engine.client.Util - .getLimits(new AACon().getType()); - - ConfiguredExecutable init(List sequences) - throws JobSubmissionException { - AACon aacon = new AACon(); - aacon.setInput(SkeletalExecutable.INPUT).setOutput( - SkeletalExecutable.OUTPUT); - return Configurator.configureExecutable(aacon, sequences); + public AAConWS() { + super(new AACon(), log); } - @Override - public ScoreManager getAnnotation(String jobId) - throws ResultNotAvailableException { - WSUtil.validateJobId(jobId); - AsyncExecutor asyncEngine = Configurator.getAsyncEngine(jobId); - ConfiguredExecutable aacon = (ConfiguredExecutable) asyncEngine - .getResults(jobId); - ScoreManager mas = aacon.getResults(); - log.trace(jobId + " getConservation : " + mas); - return mas; - } /* * @SuppressWarnings("unchecked") public JalviewAnnotation * getJalviewAnnotation(String jobId) throws ResultNotAvailableException { @@ -80,67 +37,9 @@ public class AAConWS implements SequenceAnnotation { */ @Override - public Limit getLimit(String presetName) { - if (limitMan == null) { - // Limit is not defined - return null; - } - return limitMan.getLimitByName(presetName); - } - - @Override - public LimitsManager getLimits() { - return limitMan; - } - - @Override - public ChunkHolder pullExecStatistics(String jobId, long position) { - WSUtil.validateJobId(jobId); - String file = Configurator.getWorkDirectory(jobId) + File.separator - + AACon.getStatFile(); - return WSUtil.pullFile(file, position); - } - - @Override - public boolean cancelJob(String jobId) { - WSUtil.validateJobId(jobId); - return WSUtil.cancelJob(jobId); - } - - @Override - public JobStatus getJobStatus(String jobId) { - WSUtil.validateJobId(jobId); - return WSUtil.getJobStatus(jobId); - } - - @Override - public PresetManager getPresets() { - return aaconPresets; - } - - @Override - public RunnerConfig getRunnerOptions() { - return aaconOptions; - } - - private String analize(List sequences, - ConfiguredExecutable confExec, Logger log, String method, - Limit limit) throws JobSubmissionException { - if (limit != null && limit.isExceeded(sequences)) { - throw LimitExceededException.newLimitExceeded(limit, sequences); - } - - compbio.runner.Util.writeInput(sequences, confExec); - AsyncExecutor engine = Configurator.getAsyncEngine(confExec); - String jobId = engine.submitJob(confExec); - return jobId; - } - - @Override public String analize(List sequences) throws UnsupportedRuntimeException, LimitExceededException, JobSubmissionException { - WSUtil.validateAAConInput(sequences); ConfiguredExecutable confAAcon = init(sequences); @@ -148,39 +47,16 @@ public class AAConWS implements SequenceAnnotation { // TODO: This violates encapsulation, should be moved to the runners // level. confAAcon.addParameters(Arrays.asList("-m=SHENKIN")); - return analize(sequences, confAAcon, null, "analize", getLimit("")); - } - - @Override - public String customAnalize(List sequences, - List> options) throws UnsupportedRuntimeException, - LimitExceededException, JobSubmissionException, - WrongParameterException { - WSUtil.validateAAConInput(sequences); - ConfiguredExecutable confAACon = init(sequences); - // Could not do that! Space separated values - // will all be treated as keys! thus duplicates removed - // String params = cbuilder.getCommand(); - List params = WSUtil.getCommands(options, - AACon.KEY_VALUE_SEPARATOR); - confAACon.addParameters(params); - return analize(sequences, confAACon, null, "customAnalize", + return WSUtil.analize(sequences, confAAcon, log, "AAConWS analize", getLimit("")); } @Override - public String presetAnalize(List sequences, - Preset preset) throws UnsupportedRuntimeException, - LimitExceededException, JobSubmissionException, - WrongParameterException { - WSUtil.validateAAConInput(sequences); - if (preset == null) { - throw new WrongParameterException("Preset must be provided!"); - } - ConfiguredExecutable confAAcon = init(sequences); - confAAcon.addParameters(preset.getOptions()); - Limit limit = getLimit(preset.getName()); - return WSUtil.align(sequences, confAAcon, null, "presetAnalize", limit); + public ChunkHolder pullExecStatistics(String jobId, long position) { + WSUtil.validateJobId(jobId); + String file = Configurator.getWorkDirectory(jobId) + File.separator + + AACon.getStatFile(); + return WSUtil.pullFile(file, position); } } diff --git a/webservices/compbio/ws/server/ClustalWS.java b/webservices/compbio/ws/server/ClustalWS.java index 93d0c7f..22fad0c 100644 --- a/webservices/compbio/ws/server/ClustalWS.java +++ b/webservices/compbio/ws/server/ClustalWS.java @@ -21,9 +21,7 @@ package compbio.ws.server; import java.io.File; import java.util.List; -import javax.annotation.Resource; import javax.jws.WebService; -import javax.xml.ws.WebServiceContext; import org.apache.log4j.Logger; @@ -46,20 +44,12 @@ import compbio.metadata.RunnerConfig; import compbio.metadata.WrongParameterException; import compbio.runner.Util; import compbio.runner.msa.ClustalW; -import compbio.util.Timer; -import compbio.ws.client.Services; @WebService(endpointInterface = "compbio.data.msa.MsaWS", targetNamespace = "http://msa.data.compbio/01/01/2010/", serviceName = "ClustalWS") public class ClustalWS implements MsaWS { - // Ask for resource injection - @Resource - private WebServiceContext wsContext; - private static Logger log = Logger.getLogger(ClustalWS.class); - private static volatile WSLogger logger; - private static final RunnerConfig clustalOptions = Util .getSupportedOptions(ClustalW.class); @@ -69,30 +59,13 @@ public class ClustalWS implements MsaWS { private static final LimitsManager limitMan = compbio.engine.client.Util .getLimits(new ClustalW().getType()); - /* - * Initialise the logger. This cannot be done in the constructor as the - * WebServiceContext is not available at the object construction time - */ - private WSLogger getLogger() { - if (logger == null) { - synchronized (ClustalWS.class) { - if (logger == null) { - logger = WSLogger.getStatLogger(Services.ClustalWS, - wsContext); - } - } - } - return logger; - } - @Override public String align(List sequences) throws JobSubmissionException { WSUtil.validateFastaInput(sequences); ConfiguredExecutable confClust = init(sequences); - return WSUtil.align(sequences, confClust, getLogger(), "align", - getLimit("")); + return WSUtil.align(sequences, confClust, log, "align", getLimit("")); } ConfiguredExecutable init(List dataSet) @@ -114,8 +87,7 @@ public class ClustalWS implements MsaWS { Limit limit = getLimit(preset.getName()); ConfiguredExecutable confClust = init(sequences); confClust.addParameters(preset.getOptions()); - return WSUtil.align(sequences, confClust, getLogger(), "presetAlign", - limit); + return WSUtil.align(sequences, confClust, log, "presetAlign", limit); } @Override @@ -128,39 +100,35 @@ public class ClustalWS implements MsaWS { ClustalW.KEY_VALUE_SEPARATOR); confClust.addParameters(params); log.info("Setting parameters: " + params); - return WSUtil.align(sequences, confClust, getLogger(), "customAlign", + return WSUtil.align(sequences, confClust, log, "customAlign", getLimit("")); } @Override public RunnerConfig getRunnerOptions() { - Timer timer = Timer.getMilliSecondsTimer(); - getLogger().logAll(timer, "getRunnerOptions"); return clustalOptions; } @SuppressWarnings("unchecked") @Override public Alignment getResult(String jobId) throws ResultNotAvailableException { - Timer timer = Timer.getMilliSecondsTimer(); + WSUtil.validateJobId(jobId); AsyncExecutor asyncEngine = Configurator.getAsyncEngine(jobId); ConfiguredExecutable clustal = (ConfiguredExecutable) asyncEngine .getResults(jobId); Alignment al = clustal.getResults(); - getLogger().log(timer, "getResults", jobId); + return al; } @Override public Limit getLimit(String presetName) { - Timer timer = Timer.getMilliSecondsTimer(); if (limitMan == null) { // No limit is configured return null; } Limit limit = limitMan.getLimitByName(presetName); - getLogger().logAll(timer, "getLimit"); return limit; } @@ -171,37 +139,30 @@ public class ClustalWS implements MsaWS { @Override public boolean cancelJob(String jobId) { - Timer timer = Timer.getMilliSecondsTimer(); WSUtil.validateJobId(jobId); boolean result = WSUtil.cancelJob(jobId); - getLogger().logFine(timer, "Cancel"); return result; } @Override public JobStatus getJobStatus(String jobId) { - Timer timer = Timer.getMilliSecondsTimer(); WSUtil.validateJobId(jobId); JobStatus status = WSUtil.getJobStatus(jobId); - getLogger().logFine(timer, "getJobStatus"); return status; } @Override public PresetManager getPresets() { - Timer timer = Timer.getMilliSecondsTimer(); - getLogger().logAll(timer, "pullExecStatistics"); return clustalPresets; } @Override public ChunkHolder pullExecStatistics(String jobId, long position) { - Timer timer = Timer.getMilliSecondsTimer(); + WSUtil.validateJobId(jobId); String file = Configurator.getWorkDirectory(jobId) + File.separator + ClustalW.getStatFile(); ChunkHolder cholder = WSUtil.pullFile(file, position); - getLogger().logFine(timer, "pullExecStatistics"); return cholder; } diff --git a/webservices/compbio/ws/server/DisemblWS.java b/webservices/compbio/ws/server/DisemblWS.java index 50d249b..059695f 100644 --- a/webservices/compbio/ws/server/DisemblWS.java +++ b/webservices/compbio/ws/server/DisemblWS.java @@ -2,137 +2,29 @@ package compbio.ws.server; import java.util.List; -import javax.annotation.Resource; import javax.jws.WebService; -import javax.xml.ws.WebServiceContext; import org.apache.log4j.Logger; import compbio.data.msa.SequenceAnnotation; import compbio.data.sequence.FastaSequence; -import compbio.data.sequence.ScoreManager; -import compbio.engine.AsyncExecutor; -import compbio.engine.Configurator; -import compbio.engine.client.ConfiguredExecutable; -import compbio.engine.client.SkeletalExecutable; -import compbio.metadata.ChunkHolder; -import compbio.metadata.JobStatus; import compbio.metadata.JobSubmissionException; -import compbio.metadata.Limit; import compbio.metadata.LimitExceededException; -import compbio.metadata.LimitsManager; import compbio.metadata.Option; import compbio.metadata.Preset; -import compbio.metadata.PresetManager; -import compbio.metadata.ResultNotAvailableException; -import compbio.metadata.RunnerConfig; import compbio.metadata.UnsupportedRuntimeException; import compbio.metadata.WrongParameterException; -import compbio.runner.Util; import compbio.runner.disorder.Disembl; @WebService(endpointInterface = "compbio.data.msa.SequenceAnnotation", targetNamespace = "http://msa.data.compbio/01/12/2010/", serviceName = "DisemblWS") -public class DisemblWS implements SequenceAnnotation { - - // Ask for resource injection - @Resource - WebServiceContext wsContext; - - private static Logger statLog = Logger.getLogger("DisemblWS-stats"); +public class DisemblWS extends SAService + implements + SequenceAnnotation { private static Logger log = Logger.getLogger(DisemblWS.class); - private static final RunnerConfig disemblOptions = Util - .getSupportedOptions(Disembl.class); - - private static final PresetManager disemblPresets = Util - .getPresets(Disembl.class); - - private static final LimitsManager limitMan = compbio.engine.client.Util - .getLimits(new Disembl().getType()); - - ConfiguredExecutable init(List sequences) - throws JobSubmissionException { - Disembl disembl = new Disembl(); - disembl.setInput(SkeletalExecutable.INPUT); - return Configurator.configureExecutable(disembl, sequences); - } - - @Override - public ScoreManager getAnnotation(String jobId) - throws ResultNotAvailableException { - WSUtil.validateJobId(jobId); - AsyncExecutor asyncEngine = Configurator.getAsyncEngine(jobId); - ConfiguredExecutable disembl = (ConfiguredExecutable) asyncEngine - .getResults(jobId); - ScoreManager mas = disembl.getResults(); - log.trace(jobId + " getDisorder : " + mas); - return mas; - } - - @Override - public Limit getLimit(String presetName) { - if (limitMan == null) { - // Limit is not defined - return null; - } - return limitMan.getLimitByName(presetName); - } - - @Override - public LimitsManager getLimits() { - return limitMan; - } - - @Override - public ChunkHolder pullExecStatistics(String jobId, long position) { - // Execution stat is not supported - return new ChunkHolder("", -1); - } - - @Override - public boolean cancelJob(String jobId) { - WSUtil.validateJobId(jobId); - return WSUtil.cancelJob(jobId); - } - - @Override - public JobStatus getJobStatus(String jobId) { - WSUtil.validateJobId(jobId); - return WSUtil.getJobStatus(jobId); - } - - @Override - public PresetManager getPresets() { - return disemblPresets; - } - - @Override - public RunnerConfig getRunnerOptions() { - return disemblOptions; - } - - String analize(List sequences, - ConfiguredExecutable confExec, Logger log, String method, - Limit limit) throws JobSubmissionException { - if (limit != null && limit.isExceeded(sequences)) { - throw LimitExceededException.newLimitExceeded(limit, sequences); - } - - compbio.runner.Util.writeInput(sequences, confExec); - AsyncExecutor engine = Configurator.getAsyncEngine(confExec); - String jobId = engine.submitJob(confExec); - return jobId; - } - - @Override - public String analize(List sequences) - throws UnsupportedRuntimeException, LimitExceededException, - JobSubmissionException { - WSUtil.validateFastaInput(sequences); - ConfiguredExecutable confDisembl = init(sequences); - - return analize(sequences, confDisembl, null, "analize", getLimit("")); + public DisemblWS() { + super(new Disembl(), log); } /* diff --git a/webservices/compbio/ws/server/GlobPlotWS.java b/webservices/compbio/ws/server/GlobPlotWS.java index 4c15b7c..e7a76ec 100644 --- a/webservices/compbio/ws/server/GlobPlotWS.java +++ b/webservices/compbio/ws/server/GlobPlotWS.java @@ -2,136 +2,29 @@ package compbio.ws.server; import java.util.List; -import javax.annotation.Resource; import javax.jws.WebService; -import javax.xml.ws.WebServiceContext; import org.apache.log4j.Logger; import compbio.data.msa.SequenceAnnotation; import compbio.data.sequence.FastaSequence; -import compbio.data.sequence.ScoreManager; -import compbio.engine.AsyncExecutor; -import compbio.engine.Configurator; -import compbio.engine.client.ConfiguredExecutable; -import compbio.engine.client.SkeletalExecutable; -import compbio.metadata.ChunkHolder; -import compbio.metadata.JobStatus; import compbio.metadata.JobSubmissionException; -import compbio.metadata.Limit; import compbio.metadata.LimitExceededException; -import compbio.metadata.LimitsManager; import compbio.metadata.Option; import compbio.metadata.Preset; -import compbio.metadata.PresetManager; -import compbio.metadata.ResultNotAvailableException; -import compbio.metadata.RunnerConfig; import compbio.metadata.UnsupportedRuntimeException; import compbio.metadata.WrongParameterException; -import compbio.runner.Util; import compbio.runner.disorder.GlobPlot; @WebService(endpointInterface = "compbio.data.msa.SequenceAnnotation", targetNamespace = "http://msa.data.compbio/01/12/2010/", serviceName = "GlobPlotWS") -public class GlobPlotWS implements SequenceAnnotation { - - // Ask for resource injection - @Resource - WebServiceContext wsContext; - - private static Logger statLog = Logger.getLogger("GlobPlotWS-stats"); +public class GlobPlotWS extends SAService + implements + SequenceAnnotation { private static Logger log = Logger.getLogger(GlobPlotWS.class); - private static final RunnerConfig globPlotOptions = Util - .getSupportedOptions(GlobPlot.class); - - private static final PresetManager globPlotPresets = Util - .getPresets(GlobPlot.class); - - private static final LimitsManager limitMan = compbio.engine.client.Util - .getLimits(new GlobPlot().getType()); - - ConfiguredExecutable init(List sequences) - throws JobSubmissionException { - GlobPlot globPlot = new GlobPlot(); - globPlot.setInput(SkeletalExecutable.INPUT); - return Configurator.configureExecutable(globPlot, sequences); - } - @Override - public ScoreManager getAnnotation(String jobId) - throws ResultNotAvailableException { - WSUtil.validateJobId(jobId); - AsyncExecutor asyncEngine = Configurator.getAsyncEngine(jobId); - ConfiguredExecutable globPlot = (ConfiguredExecutable) asyncEngine - .getResults(jobId); - ScoreManager mas = globPlot.getResults(); - log.trace(jobId + " getConservation : " + mas); - return mas; - } - - @Override - public Limit getLimit(String presetName) { - if (limitMan == null) { - // Limit is not defined - return null; - } - return limitMan.getLimitByName(presetName); - } - - @Override - public LimitsManager getLimits() { - return limitMan; - } - - @Override - public ChunkHolder pullExecStatistics(String jobId, long position) { - // Execution stat is not supported - return new ChunkHolder("", -1); - } - - @Override - public boolean cancelJob(String jobId) { - WSUtil.validateJobId(jobId); - return WSUtil.cancelJob(jobId); - } - - @Override - public JobStatus getJobStatus(String jobId) { - WSUtil.validateJobId(jobId); - return WSUtil.getJobStatus(jobId); - } - - @Override - public PresetManager getPresets() { - return globPlotPresets; - } - - @Override - public RunnerConfig getRunnerOptions() { - return globPlotOptions; - } - - String analize(List sequences, - ConfiguredExecutable confExec, Logger log, String method, - Limit limit) throws JobSubmissionException { - if (limit != null && limit.isExceeded(sequences)) { - throw LimitExceededException.newLimitExceeded(limit, sequences); - } - - compbio.runner.Util.writeInput(sequences, confExec); - AsyncExecutor engine = Configurator.getAsyncEngine(confExec); - String jobId = engine.submitJob(confExec); - return jobId; - } - - @Override - public String analize(List sequences) - throws UnsupportedRuntimeException, LimitExceededException, - JobSubmissionException { - WSUtil.validateFastaInput(sequences); - ConfiguredExecutable confGlobPlot = init(sequences); - - return analize(sequences, confGlobPlot, null, "analize", getLimit("")); + public GlobPlotWS() { + super(new GlobPlot(), log); } /* diff --git a/webservices/compbio/ws/server/IUPredWS.java b/webservices/compbio/ws/server/IUPredWS.java new file mode 100644 index 0000000..bd86c81 --- /dev/null +++ b/webservices/compbio/ws/server/IUPredWS.java @@ -0,0 +1,42 @@ +package compbio.ws.server; + +import java.util.List; + +import javax.jws.WebService; + +import org.apache.log4j.Logger; + +import compbio.data.msa.SequenceAnnotation; +import compbio.data.sequence.FastaSequence; +import compbio.metadata.JobSubmissionException; +import compbio.metadata.LimitExceededException; +import compbio.metadata.Preset; +import compbio.metadata.UnsupportedRuntimeException; +import compbio.metadata.WrongParameterException; +import compbio.runner.disorder.IUPred; + +@WebService(endpointInterface = "compbio.data.msa.SequenceAnnotation", targetNamespace = "http://msa.data.compbio/01/12/2010/", serviceName = "IUPredWS") +public class IUPredWS extends SAService + implements + SequenceAnnotation { + + private static Logger log = Logger.getLogger(IUPredWS.class); + + public IUPredWS() { + super(new IUPred(), log); + } + + /* + * No presets are supported, thus the result of this call will be as simple + * call to analize without parameters + */ + @Override + public String presetAnalize(List sequences, + Preset preset) throws UnsupportedRuntimeException, + LimitExceededException, JobSubmissionException, + WrongParameterException { + + return analize(sequences); + } + +} diff --git a/webservices/compbio/ws/server/JronnWS.java b/webservices/compbio/ws/server/JronnWS.java index dc37f3f..ea3c215 100644 --- a/webservices/compbio/ws/server/JronnWS.java +++ b/webservices/compbio/ws/server/JronnWS.java @@ -1,172 +1,34 @@ package compbio.ws.server; import java.io.File; -import java.util.List; -import javax.annotation.Resource; import javax.jws.WebService; -import javax.xml.ws.WebServiceContext; import org.apache.log4j.Logger; import compbio.data.msa.SequenceAnnotation; -import compbio.data.sequence.FastaSequence; -import compbio.data.sequence.ScoreManager; -import compbio.engine.AsyncExecutor; import compbio.engine.Configurator; -import compbio.engine.client.ConfiguredExecutable; -import compbio.engine.client.SkeletalExecutable; import compbio.metadata.ChunkHolder; -import compbio.metadata.JobStatus; -import compbio.metadata.JobSubmissionException; -import compbio.metadata.Limit; -import compbio.metadata.LimitExceededException; -import compbio.metadata.LimitsManager; -import compbio.metadata.Option; -import compbio.metadata.Preset; -import compbio.metadata.PresetManager; -import compbio.metadata.ResultNotAvailableException; -import compbio.metadata.RunnerConfig; -import compbio.metadata.UnsupportedRuntimeException; -import compbio.metadata.WrongParameterException; -import compbio.runner.Util; import compbio.runner.conservation.AACon; import compbio.runner.disorder.Jronn; @WebService(endpointInterface = "compbio.data.msa.SequenceAnnotation", targetNamespace = "http://msa.data.compbio/01/12/2010/", serviceName = "JronnWS") -public class JronnWS implements SequenceAnnotation { - - // Ask for resource injection - @Resource - WebServiceContext wsContext; - - private static Logger statLog = Logger.getLogger("JronnWS-stats"); +public class JronnWS extends SAService + implements + SequenceAnnotation { private static Logger log = Logger.getLogger(JronnWS.class); - private static final RunnerConfig jronnOptions = Util - .getSupportedOptions(Jronn.class); - - private static final PresetManager jronnPresets = Util - .getPresets(Jronn.class); - - private static final LimitsManager limitMan = compbio.engine.client.Util - .getLimits(new Jronn().getType()); - - ConfiguredExecutable init(List sequences) - throws JobSubmissionException { - Jronn jronn = new Jronn(); - jronn.setInput(SkeletalExecutable.INPUT).setOutput( - SkeletalExecutable.OUTPUT); - return Configurator.configureExecutable(jronn, sequences); - } - - @Override - public ScoreManager getAnnotation(String jobId) - throws ResultNotAvailableException { - WSUtil.validateJobId(jobId); - AsyncExecutor asyncEngine = Configurator.getAsyncEngine(jobId); - ConfiguredExecutable jronn = (ConfiguredExecutable) asyncEngine - .getResults(jobId); - ScoreManager mas = jronn.getResults(); - log.trace(jobId + " getConservation : " + mas); - return mas; - } - - @Override - public Limit getLimit(String presetName) { - if (limitMan == null) { - return null; - } - return limitMan.getLimitByName(presetName); - } - - @Override - public LimitsManager getLimits() { - return limitMan; + public JronnWS() { + super(new Jronn(), log); } @Override public ChunkHolder pullExecStatistics(String jobId, long position) { WSUtil.validateJobId(jobId); String file = Configurator.getWorkDirectory(jobId) + File.separator - + Jronn.getStatFile(); + + AACon.getStatFile(); return WSUtil.pullFile(file, position); } - @Override - public boolean cancelJob(String jobId) { - WSUtil.validateJobId(jobId); - return WSUtil.cancelJob(jobId); - } - - @Override - public JobStatus getJobStatus(String jobId) { - WSUtil.validateJobId(jobId); - return WSUtil.getJobStatus(jobId); - } - - @Override - public PresetManager getPresets() { - return jronnPresets; - } - - @Override - public RunnerConfig getRunnerOptions() { - return jronnOptions; - } - - String analize(List sequences, - ConfiguredExecutable confExec, Logger log, String method, - Limit limit) throws JobSubmissionException { - if (limit != null && limit.isExceeded(sequences)) { - throw LimitExceededException.newLimitExceeded(limit, sequences); - } - - compbio.runner.Util.writeInput(sequences, confExec); - AsyncExecutor engine = Configurator.getAsyncEngine(confExec); - String jobId = engine.submitJob(confExec); - return jobId; - } - - @Override - public String analize(List sequences) - throws UnsupportedRuntimeException, LimitExceededException, - JobSubmissionException { - WSUtil.validateFastaInput(sequences); - ConfiguredExecutable confJronn = init(sequences); - - return analize(sequences, confJronn, null, "analize", getLimit("")); - } - - @Override - public String customAnalize(List sequences, - List> options) throws UnsupportedRuntimeException, - LimitExceededException, JobSubmissionException, - WrongParameterException { - WSUtil.validateFastaInput(sequences); - ConfiguredExecutable confJronn = init(sequences); - - List params = WSUtil.getCommands(options, - AACon.KEY_VALUE_SEPARATOR); - confJronn.addParameters(params); - return analize(sequences, confJronn, null, "customAnalize", - getLimit("")); - } - - @Override - public String presetAnalize(List sequences, - Preset preset) throws UnsupportedRuntimeException, - LimitExceededException, JobSubmissionException, - WrongParameterException { - WSUtil.validateFastaInput(sequences); - if (preset == null) { - throw new WrongParameterException("Preset must be provided!"); - } - ConfiguredExecutable confJronn = init(sequences); - confJronn.addParameters(preset.getOptions()); - Limit limit = getLimit(preset.getName()); - return WSUtil.align(sequences, confJronn, null, "presetAnalize", limit); - } - } diff --git a/webservices/compbio/ws/server/MafftWS.java b/webservices/compbio/ws/server/MafftWS.java index 9b74ce6..eda824a 100644 --- a/webservices/compbio/ws/server/MafftWS.java +++ b/webservices/compbio/ws/server/MafftWS.java @@ -21,9 +21,7 @@ package compbio.ws.server; import java.io.File; import java.util.List; -import javax.annotation.Resource; import javax.jws.WebService; -import javax.xml.ws.WebServiceContext; import org.apache.log4j.Logger; @@ -50,12 +48,6 @@ import compbio.runner.msa.Mafft; @WebService(endpointInterface = "compbio.data.msa.MsaWS", targetNamespace = "http://msa.data.compbio/01/01/2010/", serviceName = "MafftWS") public class MafftWS implements MsaWS { - // Ask for resource injection - @Resource - WebServiceContext wsContext; - - private static Logger statLog = Logger.getLogger("MafftWS-stats"); - private static Logger log = Logger.getLogger(MafftWS.class); private static final RunnerConfig mafftOptions = Util diff --git a/webservices/compbio/ws/server/MuscleWS.java b/webservices/compbio/ws/server/MuscleWS.java index aea5bc0..0e5d3ef 100644 --- a/webservices/compbio/ws/server/MuscleWS.java +++ b/webservices/compbio/ws/server/MuscleWS.java @@ -21,9 +21,7 @@ package compbio.ws.server; import java.io.File; import java.util.List; -import javax.annotation.Resource; import javax.jws.WebService; -import javax.xml.ws.WebServiceContext; import org.apache.log4j.Logger; @@ -51,12 +49,6 @@ import compbio.runner.msa.Muscle; @WebService(endpointInterface = "compbio.data.msa.MsaWS", targetNamespace = "http://msa.data.compbio/01/01/2010/", serviceName = "MuscleWS") public class MuscleWS implements MsaWS { - // Ask for resource injection - @Resource - WebServiceContext wsContext; - - private static Logger statLog = Logger.getLogger("MuscleWS-stats"); - private static Logger log = Logger.getLogger(MuscleWS.class); private static final RunnerConfig muscleOptions = Util diff --git a/webservices/compbio/ws/server/ProbconsWS.java b/webservices/compbio/ws/server/ProbconsWS.java index 586352b..1d5430d 100644 --- a/webservices/compbio/ws/server/ProbconsWS.java +++ b/webservices/compbio/ws/server/ProbconsWS.java @@ -21,9 +21,7 @@ package compbio.ws.server; import java.io.File; import java.util.List; -import javax.annotation.Resource; import javax.jws.WebService; -import javax.xml.ws.WebServiceContext; import org.apache.log4j.Logger; @@ -50,12 +48,6 @@ import compbio.runner.msa.Probcons; @WebService(endpointInterface = "compbio.data.msa.MsaWS", targetNamespace = "http://msa.data.compbio/01/01/2010/", serviceName = "ProbconsWS") public class ProbconsWS implements MsaWS { - // Ask for resource injection - @Resource - WebServiceContext wsContext; - - private static Logger statLog = Logger.getLogger("ProbconsWS-stats"); - private static Logger log = Logger.getLogger(ProbconsWS.class); private static final RunnerConfig probconsOptions = Util diff --git a/webservices/compbio/ws/server/SAService.java b/webservices/compbio/ws/server/SAService.java new file mode 100644 index 0000000..244574d --- /dev/null +++ b/webservices/compbio/ws/server/SAService.java @@ -0,0 +1,167 @@ +package compbio.ws.server; + +import java.util.List; + +import org.apache.log4j.Logger; + +import compbio.data.sequence.FastaSequence; +import compbio.data.sequence.ScoreManager; +import compbio.engine.Configurator; +import compbio.engine.client.ConfiguredExecutable; +import compbio.engine.client.Executable; +import compbio.engine.client.SkeletalExecutable; +import compbio.metadata.ChunkHolder; +import compbio.metadata.JobStatus; +import compbio.metadata.JobSubmissionException; +import compbio.metadata.Limit; +import compbio.metadata.LimitExceededException; +import compbio.metadata.LimitsManager; +import compbio.metadata.Option; +import compbio.metadata.Preset; +import compbio.metadata.PresetManager; +import compbio.metadata.ResultNotAvailableException; +import compbio.metadata.RunnerConfig; +import compbio.metadata.UnsupportedRuntimeException; +import compbio.metadata.WrongParameterException; +import compbio.runner.Util; +import compbio.runner.conservation.AACon; + +/** + * Common methods for all SequenceAnnotation web services + * + * @author pvtroshin + * + * @param + * + * @version 1.0 June 2011 + * @since 2.0 + */ +public abstract class SAService { + + private final RunnerConfig aaconOptions; + private final PresetManager aaconPresets; + private final LimitsManager limitMan; + private SkeletalExecutable exec; + private final Logger log; + + /* + * FIXME - instances of the Runner (?) and their types should be defined in + * Executable IF + */ + SAService(SkeletalExecutable exec, Logger log) { + assert log != null; + assert exec != null; + this.log = log; + this.exec = exec; + this.limitMan = compbio.engine.client.Util.getLimits(exec.getType()); + this.aaconOptions = Util + .getSupportedOptions((Class>) exec + .getType()); + this.aaconPresets = Util + .getPresets((Class>) exec.getType()); + } + + ConfiguredExecutable init(List sequences) + throws JobSubmissionException { + // FIXME + try { + exec = (SkeletalExecutable) exec.getType().newInstance(); + } catch (InstantiationException e) { + log.error(e.getLocalizedMessage(), e); + throw new JobSubmissionException(e.getLocalizedMessage(), e); + } catch (IllegalAccessException e) { + log.error(e.getLocalizedMessage(), e); + throw new JobSubmissionException(e.getLocalizedMessage(), e); + } + exec.setInput(SkeletalExecutable.INPUT).setOutput( + SkeletalExecutable.OUTPUT); + return Configurator.configureExecutable(exec, sequences); + } + + public ScoreManager getAnnotation(String jobId) + throws ResultNotAvailableException { + return WSUtil.getAnnotation(jobId, log); + } + + public boolean cancelJob(String jobId) { + WSUtil.validateJobId(jobId); + return WSUtil.cancelJob(jobId); + } + + public JobStatus getJobStatus(String jobId) { + WSUtil.validateJobId(jobId); + return WSUtil.getJobStatus(jobId); + } + + public Limit getLimit(String presetName) { + if (limitMan == null) { + // Limit is not defined + return null; + } + return limitMan.getLimitByName(presetName); + } + + public LimitsManager getLimits() { + return limitMan; + } + + public PresetManager getPresets() { + return aaconPresets; + } + + public RunnerConfig getRunnerOptions() { + return aaconOptions; + } + + public String analize(List sequences) + throws UnsupportedRuntimeException, LimitExceededException, + JobSubmissionException { + WSUtil.validateFastaInput(sequences); + ConfiguredExecutable confIUPred = init(sequences); + return WSUtil.analize(sequences, confIUPred, log, "analize", + getLimit("")); + } + + public String customAnalize(List sequences, + List> options) throws UnsupportedRuntimeException, + LimitExceededException, JobSubmissionException, + WrongParameterException { + WSUtil.validateAAConInput(sequences); + ConfiguredExecutable confAACon = init(sequences); + // Could not do that! Space separated values + // will all be treated as keys! thus duplicates removed + // String params = cbuilder.getCommand(); + List params = WSUtil.getCommands(options, + AACon.KEY_VALUE_SEPARATOR); + confAACon.addParameters(params); + return WSUtil.analize(sequences, confAACon, log, "customAnalize", + getLimit("")); + } + + public String presetAnalize(List sequences, Preset preset) + throws UnsupportedRuntimeException, LimitExceededException, + JobSubmissionException, WrongParameterException { + WSUtil.validateAAConInput(sequences); + if (preset == null) { + throw new WrongParameterException("Preset must be provided!"); + } + ConfiguredExecutable confAAcon = init(sequences); + confAAcon.addParameters(preset.getOptions()); + Limit limit = getLimit(preset.getName()); + return WSUtil + .analize(sequences, confAAcon, log, "presetAnalize", limit); + } + + /** + * Assume statistics is not supported + * + * @param jobId + * @param position + * @return + */ + public ChunkHolder pullExecStatistics(String jobId, long position) { + // Execution stat is not supported + return new ChunkHolder("", -1); + } + +} diff --git a/webservices/compbio/ws/server/TcoffeeWS.java b/webservices/compbio/ws/server/TcoffeeWS.java index feb35f0..889efd8 100644 --- a/webservices/compbio/ws/server/TcoffeeWS.java +++ b/webservices/compbio/ws/server/TcoffeeWS.java @@ -21,9 +21,7 @@ package compbio.ws.server; import java.io.File; import java.util.List; -import javax.annotation.Resource; import javax.jws.WebService; -import javax.xml.ws.WebServiceContext; import org.apache.log4j.Logger; @@ -52,12 +50,6 @@ import compbio.runner.msa.Tcoffee; @WebService(endpointInterface = "compbio.data.msa.MsaWS", targetNamespace = "http://msa.data.compbio/01/01/2010/", serviceName = "TcoffeeWS") public class TcoffeeWS implements MsaWS { - // Ask for resource injection - @Resource - WebServiceContext wsContext; - - private static Logger statLog = Logger.getLogger("TcoffeeWS-stats"); - private static Logger log = Logger.getLogger(TcoffeeWS.class); private static final RunnerConfig tcoffeeOptions = Util diff --git a/webservices/compbio/ws/server/WSLogger.java b/webservices/compbio/ws/server/WSLogger.java deleted file mode 100644 index 28f6d10..0000000 --- a/webservices/compbio/ws/server/WSLogger.java +++ /dev/null @@ -1,117 +0,0 @@ -/* Copyright (c) 2010 Peter Troshin - * - * JAva Bioinformatics Analysis Web Services (JABAWS) @version: 1.0 - * - * This library is free software; you can redistribute it and/or modify it under the terms of the - * Apache License version 2 as published by the Apache Software Foundation - * - * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Apache - * License for more details. - * - * A copy of the license is in apache_license.txt. It is also available here: - * @see: http://www.apache.org/licenses/LICENSE-2.0.txt - * - * Any republication or derived work distributed in source code form - * must include this copyright and license notice. - */ -package compbio.ws.server; - -import javax.servlet.http.HttpServletRequest; -import javax.xml.ws.WebServiceContext; -import javax.xml.ws.handler.MessageContext; - -import org.apache.log4j.Level; -import org.apache.log4j.Logger; - -import compbio.util.Timer; -import compbio.util.Util; -import compbio.ws.client.Services; - -public class WSLogger { - - private static final String SPACER = " "; - - private final String wsname; - private final WebServiceContext wsContext; - private final Logger wsAccessLog; - - private WSLogger(Services wsname, WebServiceContext context) { - this.wsname = wsname.toString(); - this.wsContext = context; - this.wsAccessLog = Logger.getLogger(wsname.toString() + "-stats"); - assert context != null : "WSContext was not injected"; - assert wsAccessLog != null : "wsAccessLog is not obtained"; - } - - public static final WSLogger getStatLogger(Services service, - WebServiceContext wsContext) { - assert service != null; - return new WSLogger(service, wsContext); - } - - /** - * [Request_thread timeofRequest] configured via log4j configuration - * RequestSource web_service timeToProcessRequest methodname {taskid} - * - * @param statLog - * @param wsContext - * @param jobId - * @param activity - */ - private void log(Timer timer, String activity, Level level, String jobId) { - assert !Util.isEmpty(jobId) || !Util.isEmpty(activity); // At least one - // of the two must be defined - if (Util.isEmpty(jobId)) { - jobId = ""; // prevent is to be printed as null - } else { - assert !Util.isEmpty(activity) : "if jobId is defined, then activity must be defined too"; - } - - wsAccessLog.log(level, getRemoteAddress() + SPACER + wsname + SPACER - + timer.getTotalTime() + SPACER + activity + SPACER + jobId); - } - - public void logAll(Timer timer, String activity) { - assert !Util.isEmpty(activity); - log(timer, activity, Level.TRACE, ""); - } - - public void logFine(Timer timer, String activity) { - assert !Util.isEmpty(activity); - log(timer, activity, Level.DEBUG, ""); - } - - public void log(Timer timer, String activity) { - assert !Util.isEmpty(activity); - log(timer, activity, Level.INFO, ""); - } - - public void log(Timer timer, String activity, String jobId) { - assert !Util.isEmpty(activity); - log(timer, activity, Level.INFO, jobId); - } - - /* - * - * private static String getDataTimeForLog() { return - * DateFormat.getDateTimeInstance(DateFormat.MEDIUM, - * DateFormat.SHORT).format(System.currentTimeMillis()); } - * - * - * public static String getRemoteAddress(WebServiceContext wsContext) { - * assert wsContext != null : "WS context injection failed!"; MessageContext - * msContext = wsContext.getMessageContext(); HttpServletRequest request = - * (HttpServletRequest) msContext .get(MessageContext.SERVLET_REQUEST); - * return request == null ? "127.0.0.1" : request.getRemoteAddr(); } - */ - - public String getRemoteAddress() { - assert wsContext != null : "WS context injection failed!"; - MessageContext msContext = wsContext.getMessageContext(); - HttpServletRequest request = (HttpServletRequest) msContext - .get(MessageContext.SERVLET_REQUEST); - return request == null ? "127.0.0.1" : request.getRemoteAddr(); - } - -} diff --git a/webservices/compbio/ws/server/WSUtil.java b/webservices/compbio/ws/server/WSUtil.java index 6f33f24..1890d65 100644 --- a/webservices/compbio/ws/server/WSUtil.java +++ b/webservices/compbio/ws/server/WSUtil.java @@ -19,11 +19,14 @@ package compbio.ws.server; import java.security.InvalidParameterException; import java.util.ArrayList; +import java.util.HashSet; import java.util.List; +import java.util.Set; import org.apache.log4j.Logger; import compbio.data.sequence.FastaSequence; +import compbio.data.sequence.ScoreManager; import compbio.engine.AsyncExecutor; import compbio.engine.Configurator; import compbio.engine.ProgressGetter; @@ -34,14 +37,10 @@ import compbio.metadata.JobSubmissionException; import compbio.metadata.Limit; import compbio.metadata.LimitExceededException; import compbio.metadata.Option; -import compbio.util.Timer; +import compbio.metadata.ResultNotAvailableException; public final class WSUtil { - private static final String CACHE_KEY = "LIMITS_CACHE"; - - private static Logger log = Logger.getLogger(WSUtil.class); - public static final void validateJobId(String jobId) throws InvalidParameterException { if (!compbio.engine.client.Util.isValidJobId(jobId)) { @@ -57,7 +56,14 @@ public final class WSUtil { throw new JobSubmissionException( "List of fasta sequences required but not provided! "); } + Set names = new HashSet(); for (FastaSequence fs : sequences) { + boolean unique = names.add(fs.getId()); + if (!unique) { + throw new JobSubmissionException( + "Input sequences must have unique names! \n" + + "Sequence " + fs.getId() + " is a duplicate!"); + } if (fs.getLength() == 0) { throw new JobSubmissionException( "Sequence must not be empty! Sequence: " + fs.getId() @@ -90,19 +96,31 @@ public final class WSUtil { } public static String align(List sequences, - ConfiguredExecutable confExec, WSLogger logger, + ConfiguredExecutable confExec, Logger logger, String callingMethod, Limit limit) throws LimitExceededException, JobSubmissionException { - Timer timer = Timer.getMilliSecondsTimer(); + if (limit != null && limit.isExceeded(sequences)) { throw LimitExceededException.newLimitExceeded(limit, sequences); } compbio.runner.Util.writeInput(sequences, confExec); AsyncExecutor engine = Configurator.getAsyncEngine(confExec); String jobId = engine.submitJob(confExec); - if (logger != null) { - logger.log(timer, callingMethod, jobId); + return jobId; + } + + public static String analize(List sequences, + ConfiguredExecutable confExec, Logger log, String method, + Limit limit) throws JobSubmissionException { + if (limit != null && limit.isExceeded(sequences)) { + throw LimitExceededException.newLimitExceeded(limit, sequences); } + log.debug("Method: " + method + " with task: " + confExec.getTaskId()); + + compbio.runner.Util.writeInput(sequences, confExec); + AsyncExecutor engine = Configurator.getAsyncEngine(confExec); + String jobId = engine.submitJob(confExec); + return jobId; } @@ -137,6 +155,17 @@ public final class WSUtil { } } + public static ScoreManager getAnnotation(String jobId, Logger log) + throws ResultNotAvailableException { + WSUtil.validateJobId(jobId); + AsyncExecutor asyncEngine = Configurator.getAsyncEngine(jobId); + ConfiguredExecutable aacon = (ConfiguredExecutable) asyncEngine + .getResults(jobId); + ScoreManager mas = aacon.getResults(); + log.trace(jobId + " getConservation : " + mas); + return mas; + } + /* * UNUSED * diff --git a/webservices/compbio/ws/server/_WSLogger.java b/webservices/compbio/ws/server/_WSLogger.java new file mode 100644 index 0000000..5b8ebd1 --- /dev/null +++ b/webservices/compbio/ws/server/_WSLogger.java @@ -0,0 +1,118 @@ +/* Copyright (c) 2010 Peter Troshin + * + * JAva Bioinformatics Analysis Web Services (JABAWS) @version: 1.0 + * + * This library is free software; you can redistribute it and/or modify it under the terms of the + * Apache License version 2 as published by the Apache Software Foundation + * + * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Apache + * License for more details. + * + * A copy of the license is in apache_license.txt. It is also available here: + * @see: http://www.apache.org/licenses/LICENSE-2.0.txt + * + * Any republication or derived work distributed in source code form + * must include this copyright and license notice. + */ +package compbio.ws.server; + +import javax.servlet.http.HttpServletRequest; +import javax.xml.ws.WebServiceContext; +import javax.xml.ws.handler.MessageContext; + +import org.apache.log4j.Level; +import org.apache.log4j.Logger; + +import compbio.util.Timer; +import compbio.util.Util; +import compbio.ws.client.Services; + +@Deprecated +public class _WSLogger { + + private static final String SPACER = " "; + + private final String wsname; + private final WebServiceContext wsContext; + private final Logger wsAccessLog; + + private _WSLogger(Services wsname, WebServiceContext context) { + this.wsname = wsname.toString(); + this.wsContext = context; + this.wsAccessLog = Logger.getLogger(wsname.toString() + "-stats"); + assert context != null : "WSContext was not injected"; + assert wsAccessLog != null : "wsAccessLog is not obtained"; + } + + public static final _WSLogger getStatLogger(Services service, + WebServiceContext wsContext) { + assert service != null; + return new _WSLogger(service, wsContext); + } + + /** + * [Request_thread timeofRequest] configured via log4j configuration + * RequestSource web_service timeToProcessRequest methodname {taskid} + * + * @param statLog + * @param wsContext + * @param jobId + * @param activity + */ + private void log(Timer timer, String activity, Level level, String jobId) { + assert !Util.isEmpty(jobId) || !Util.isEmpty(activity); // At least one + // of the two must be defined + if (Util.isEmpty(jobId)) { + jobId = ""; // prevent is to be printed as null + } else { + assert !Util.isEmpty(activity) : "if jobId is defined, then activity must be defined too"; + } + + wsAccessLog.log(level, getRemoteAddress() + SPACER + wsname + SPACER + + timer.getTotalTime() + SPACER + activity + SPACER + jobId); + } + + public void logAll(Timer timer, String activity) { + assert !Util.isEmpty(activity); + log(timer, activity, Level.TRACE, ""); + } + + public void logFine(Timer timer, String activity) { + assert !Util.isEmpty(activity); + log(timer, activity, Level.DEBUG, ""); + } + + public void log(Timer timer, String activity) { + assert !Util.isEmpty(activity); + log(timer, activity, Level.INFO, ""); + } + + public void log(Timer timer, String activity, String jobId) { + assert !Util.isEmpty(activity); + log(timer, activity, Level.INFO, jobId); + } + + /* + * + * private static String getDataTimeForLog() { return + * DateFormat.getDateTimeInstance(DateFormat.MEDIUM, + * DateFormat.SHORT).format(System.currentTimeMillis()); } + * + * + * public static String getRemoteAddress(WebServiceContext wsContext) { + * assert wsContext != null : "WS context injection failed!"; MessageContext + * msContext = wsContext.getMessageContext(); HttpServletRequest request = + * (HttpServletRequest) msContext .get(MessageContext.SERVLET_REQUEST); + * return request == null ? "127.0.0.1" : request.getRemoteAddr(); } + */ + + public String getRemoteAddress() { + assert wsContext != null : "WS context injection failed!"; + MessageContext msContext = wsContext.getMessageContext(); + HttpServletRequest request = (HttpServletRequest) msContext + .get(MessageContext.SERVLET_REQUEST); + return request == null ? "127.0.0.1" : request.getRemoteAddr(); + } + +} diff --git a/webservices/compbio/ws/server/resource/AAConWS.wsdl b/webservices/compbio/ws/server/resource/AAConWS.wsdl index 3f3a00a..9329c44 100644 --- a/webservices/compbio/ws/server/resource/AAConWS.wsdl +++ b/webservices/compbio/ws/server/resource/AAConWS.wsdl @@ -1,5 +1,5 @@ - + @@ -45,18 +45,18 @@ - - - - - - + + + + + + @@ -116,14 +116,14 @@ - - - - + + + + @@ -219,7 +219,7 @@ - + @@ -228,7 +228,7 @@ - + diff --git a/webservices/compbio/ws/server/resource/ClustalWS.wsdl b/webservices/compbio/ws/server/resource/ClustalWS.wsdl index 9e12c14..b52327b 100644 --- a/webservices/compbio/ws/server/resource/ClustalWS.wsdl +++ b/webservices/compbio/ws/server/resource/ClustalWS.wsdl @@ -1,5 +1,5 @@ - + @@ -45,18 +45,18 @@ - - - - - - + + + + + + @@ -116,14 +116,14 @@ - - - - + + + + @@ -219,7 +219,7 @@ - + @@ -228,7 +228,7 @@ - + diff --git a/webservices/compbio/ws/server/resource/DisemblWS.wsdl b/webservices/compbio/ws/server/resource/DisemblWS.wsdl index af14b4f..3635014 100644 --- a/webservices/compbio/ws/server/resource/DisemblWS.wsdl +++ b/webservices/compbio/ws/server/resource/DisemblWS.wsdl @@ -1,16 +1,16 @@ - + - - + + - - + + @@ -21,15 +21,15 @@ - - - - - - + + + + + + @@ -45,18 +45,18 @@ - - - - - - + + + + + + @@ -88,13 +88,6 @@ - - - - - - - @@ -103,6 +96,13 @@ + + + + + + + @@ -116,14 +116,14 @@ - - - - + + + + @@ -147,7 +147,7 @@ - + @@ -164,8 +164,11 @@ + + + - + @@ -182,9 +185,6 @@ - - - @@ -219,7 +219,7 @@ - + @@ -228,7 +228,7 @@ - + diff --git a/webservices/compbio/ws/server/resource/DisemblWS_schema1.xsd b/webservices/compbio/ws/server/resource/DisemblWS_schema1.xsd index c4f25f1..ab7d3ee 100644 --- a/webservices/compbio/ws/server/resource/DisemblWS_schema1.xsd +++ b/webservices/compbio/ws/server/resource/DisemblWS_schema1.xsd @@ -61,6 +61,18 @@ + + + + + + + + + + + + @@ -102,18 +114,6 @@ - - - - - - - - - - - - @@ -163,6 +163,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -263,49 +309,16 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - + + - + - + @@ -329,19 +342,6 @@ - - - - - - - - - - - - - diff --git a/webservices/compbio/ws/server/resource/GlobPlotWS.wsdl b/webservices/compbio/ws/server/resource/GlobPlotWS.wsdl index 766b329..b87e366 100644 --- a/webservices/compbio/ws/server/resource/GlobPlotWS.wsdl +++ b/webservices/compbio/ws/server/resource/GlobPlotWS.wsdl @@ -1,16 +1,16 @@ - + - - + + - - + + @@ -21,15 +21,15 @@ - - - - - - + + + + + + @@ -45,18 +45,18 @@ - - - - - - + + + + + + @@ -88,13 +88,6 @@ - - - - - - - @@ -103,6 +96,13 @@ + + + + + + + @@ -116,14 +116,14 @@ - - - - + + + + @@ -147,7 +147,7 @@ - + @@ -164,8 +164,11 @@ + + + - + @@ -182,9 +185,6 @@ - - - @@ -219,7 +219,7 @@ - + @@ -228,7 +228,7 @@ - + diff --git a/webservices/compbio/ws/server/resource/GlobPlotWS_schema1.xsd b/webservices/compbio/ws/server/resource/GlobPlotWS_schema1.xsd index 52acbb9..49ed492 100644 --- a/webservices/compbio/ws/server/resource/GlobPlotWS_schema1.xsd +++ b/webservices/compbio/ws/server/resource/GlobPlotWS_schema1.xsd @@ -61,49 +61,15 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + @@ -169,176 +135,210 @@ - - + + + + - + - + - + - - + + - + + + + + + + + + + + + + + + + + + - + - + - + - - + + + + - + + + + + + + + + + + + - - - + + + - - + - + - + - + - + - + - + - + + - + - - + + + - + - - - - - + + - - + - + - + + + + + - - + - + - + + - + + + + + - - + - + - + + - + - + + + + - + - + - + - + - - + + + + - + - + - + - - - - + + - - - - - - - - - + + + + - + - - - + + diff --git a/webservices/compbio/ws/server/resource/IUPredWS.wsdl b/webservices/compbio/ws/server/resource/IUPredWS.wsdl new file mode 100644 index 0000000..e589bb1 --- /dev/null +++ b/webservices/compbio/ws/server/resource/IUPredWS.wsdl @@ -0,0 +1,292 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/webservices/compbio/ws/server/resource/IUPredWS_schema1.xsd b/webservices/compbio/ws/server/resource/IUPredWS_schema1.xsd new file mode 100644 index 0000000..54d1b3d --- /dev/null +++ b/webservices/compbio/ws/server/resource/IUPredWS_schema1.xsd @@ -0,0 +1,366 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/webservices/compbio/ws/server/resource/JronnWS.wsdl b/webservices/compbio/ws/server/resource/JronnWS.wsdl index 68edea7..244be15 100644 --- a/webservices/compbio/ws/server/resource/JronnWS.wsdl +++ b/webservices/compbio/ws/server/resource/JronnWS.wsdl @@ -1,16 +1,16 @@ - + - - + + - - + + @@ -21,15 +21,15 @@ - - - - - - + + + + + + @@ -45,18 +45,18 @@ - - - - - - + + + + + + @@ -88,13 +88,6 @@ - - - - - - - @@ -103,6 +96,13 @@ + + + + + + + @@ -116,14 +116,14 @@ - - - - + + + + @@ -147,7 +147,7 @@ - + @@ -164,8 +164,11 @@ + + + - + @@ -182,9 +185,6 @@ - - - @@ -219,7 +219,7 @@ - + @@ -228,7 +228,7 @@ - + diff --git a/webservices/compbio/ws/server/resource/MafftWS.wsdl b/webservices/compbio/ws/server/resource/MafftWS.wsdl index dba8c70..86bf801 100644 --- a/webservices/compbio/ws/server/resource/MafftWS.wsdl +++ b/webservices/compbio/ws/server/resource/MafftWS.wsdl @@ -1,5 +1,5 @@ - + @@ -45,18 +45,18 @@ - - - - - - + + + + + + @@ -116,14 +116,14 @@ - - - - + + + + @@ -219,7 +219,7 @@ - + @@ -228,7 +228,7 @@ - + diff --git a/webservices/compbio/ws/server/resource/MuscleWS.wsdl b/webservices/compbio/ws/server/resource/MuscleWS.wsdl index ce1332f..8993c91 100644 --- a/webservices/compbio/ws/server/resource/MuscleWS.wsdl +++ b/webservices/compbio/ws/server/resource/MuscleWS.wsdl @@ -1,5 +1,5 @@ - + @@ -45,18 +45,18 @@ - - - - - - + + + + + + @@ -116,14 +116,14 @@ - - - - + + + + @@ -219,7 +219,7 @@ - + @@ -228,7 +228,7 @@ - + diff --git a/webservices/compbio/ws/server/resource/RegistryWS.wsdl b/webservices/compbio/ws/server/resource/RegistryWS.wsdl index 6ffd8d1..6760f66 100644 --- a/webservices/compbio/ws/server/resource/RegistryWS.wsdl +++ b/webservices/compbio/ws/server/resource/RegistryWS.wsdl @@ -1,5 +1,5 @@ - + diff --git a/webservices/compbio/ws/server/resource/RegistryWS_schema1.xsd b/webservices/compbio/ws/server/resource/RegistryWS_schema1.xsd index 10a476b..a7cb4c7 100644 --- a/webservices/compbio/ws/server/resource/RegistryWS_schema1.xsd +++ b/webservices/compbio/ws/server/resource/RegistryWS_schema1.xsd @@ -104,6 +104,7 @@ + diff --git a/webservices/compbio/ws/server/resource/TcoffeeWS.wsdl b/webservices/compbio/ws/server/resource/TcoffeeWS.wsdl index 1ee9039..1ea1fcd 100644 --- a/webservices/compbio/ws/server/resource/TcoffeeWS.wsdl +++ b/webservices/compbio/ws/server/resource/TcoffeeWS.wsdl @@ -1,5 +1,5 @@ - + @@ -15,11 +15,11 @@ - - + + - - + + @@ -33,11 +33,11 @@ - - + + - - + + @@ -45,18 +45,18 @@ - - - - - - + + + + + + @@ -93,14 +93,6 @@ - - - - - - - - @@ -109,6 +101,14 @@ + + + + + + + + @@ -116,14 +116,14 @@ - - - - + + + + @@ -159,7 +159,7 @@ - + @@ -180,7 +180,7 @@ - + @@ -219,7 +219,7 @@ - + @@ -228,7 +228,7 @@ - +