import compbio.data.msa.JABAService;
import compbio.data.msa.JManagement;
import compbio.data.msa.Metadata;
+import compbio.data.msa.SequenceAnnotation;
import compbio.data.sequence.Alignment;
import compbio.data.sequence.RNAStruct;
import compbio.data.sequence.FastaSequence;
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;
import compbio.runner.structure.RNAalifold;
-@WebService(endpointInterface = "compbio.data.msa.FoldWS", targetNamespace = JABAService.SERVICE_NAMESPACE, serviceName = "RNAalifoldWS")
-public class RNAalifoldWS implements FoldWS<RNAalifold> {
+@WebService(endpointInterface = "compbio.data.msa.SequenceAnnotation", targetNamespace = JABAService.V2_SERVICE_NAMESPACE, serviceName = "RNAalifoldWS")
+public class RNAalifoldWS extends SequenceAnnotationService<RNAalifold>
+ implements
+ SequenceAnnotation<RNAalifold> {
private static Logger log = Logger.getLogger(ClustalWS.class);
- private static final RunnerConfig<RNAalifold> rnaalifoldOptions = Util.
- getSupportedOptions(RNAalifold.class);
-
- private static final PresetManager<RNAalifold> rnaalifoldPresets = Util
- .getPresets(RNAalifold.class);
-
- private static final LimitsManager<RNAalifold> limitMan = compbio.engine.client.Util
- .getLimits(new RNAalifold().getType());
-
-
- @Override
- public String fold(Alignment alignment)
- throws JobSubmissionException {
-
- // Validate clustal input here?
- ConfiguredExecutable<RNAalifold> confRNAalifold = init(alignment);
- return WSUtil.fold(alignment, confRNAalifold, log, "fold", getLimit(""));
- }
-
-
- ConfiguredExecutable<RNAalifold> init(Alignment dataset) throws JobSubmissionException {
- RNAalifold rnaalifold = new RNAalifold();
- rnaalifold.setInput(SkeletalExecutable.INPUT)
- .setOutput(SkeletalExecutable.OUTPUT)
- .setError(SkeletalExecutable.ERROR);
- ConfiguredExecutable<RNAalifold> confRNAalifold = Configurator
- .configureExecutable(rnaalifold, dataset.getSequences());
- return confRNAalifold;
+ public RNAalifoldWS() {
+ super (new RNAalifold(), log);
}
-
+
+ /*
+ * No options are supported, thus the result of this call will be as simple
+ * call to analize without parameters
+ */
@Override
- public String presetFold(Alignment alignment,
- Preset<RNAalifold> preset) throws JobSubmissionException,
- WrongParameterException {
- // validate
- if (preset == null) {
- throw new WrongParameterException("Preset must be Provided!");
- }
- Limit<RNAalifold> limit = getLimit(preset.getName());
- ConfiguredExecutable<RNAalifold> confRNAalifold = init(alignment);
- confRNAalifold.addParameters(preset.getOptions());
- return WSUtil.fold(alignment, confRNAalifold, log, "presetFold", limit);
- }
-
- @Override
- public String customFold(Alignment alignment,
- List<Option<RNAalifold>> options) throws JobSubmissionException,
+ public String customAnalize(List<FastaSequence> sequences,
+ List<Option<RNAalifold>> options) throws UnsupportedRuntimeException,
+ LimitExceededException, JobSubmissionException,
WrongParameterException {
- // validate
- ConfiguredExecutable<RNAalifold> confRNAalifold = init(alignment);
- List<String> params = WSUtil.getCommands(options,
- RNAalifold.KEY_VALUE_SEPARATOR);
- confRNAalifold.addParameters(params);
- log.info("Setting parameters: " + params);
- return WSUtil.fold(alignment, confRNAalifold, log, "customFold",
- getLimit(""));
- }
-
- @Override
- public RunnerConfig<RNAalifold> getRunnerOptions() {
- return rnaalifoldOptions;
- }
-
- @SuppressWarnings("unchecked")
- public String getResult(String jobId) throws ResultNotAvailableException {
- WSUtil.validateJobId(jobId);
- AsyncExecutor asyncEngine = Configurator.getAsyncEngine(jobId);
- ConfiguredExecutable<RNAalifold> rnaalifold = (ConfiguredExecutable<RNAalifold>) asyncEngine
- .getResults(jobId);
- return rnaalifold.getResults();
- }
-
- @Override
- public boolean cancelJob(String jobId) {
- WSUtil.validateJobId(jobId);
- boolean result = WSUtil.cancelJob(jobId);
- return result;
- }
-
- @Override
- public JobStatus getJobStatus(String jobId) {
- WSUtil.validateJobId(jobId);
- JobStatus status = WSUtil.getJobStatus(jobId);
- return status;
- }
-
- @Override
- public Limit<RNAalifold> getLimit(String presetName) {
- if (limitMan == null) {
- // No limit is configured
- return null;
- }
- Limit<RNAalifold> limit = limitMan.getLimitByName(presetName);
- return limit;
- }
-
- @Override
- public LimitsManager<RNAalifold> getLimits() {
- return limitMan;
- }
-
- @Override
- // PlaceHolder
- public PresetManager<RNAalifold> getPresets() {
- if (rnaalifoldPresets == null) {
- // No presets are configured
- return null;
- }
- return rnaalifoldPresets;
+ return analize(sequences);
}
+ /*
+ * No presets are supported, thus the result of this call will be as simple
+ * call to analize without parameters
+ */
@Override
- // PlaceHolder
- public ChunkHolder pullExecStatistics(String jobId, long position) {
+ public String presetAnalize(List<FastaSequence> sequences,
+ Preset<RNAalifold> preset) throws UnsupportedRuntimeException,
+ LimitExceededException, JobSubmissionException,
+ WrongParameterException {
-// WSUtil.validateJobId(jobId);
-// String file = Configurator.getWorkDirectory(jobId) + File.separator
-// + RNAalifold.getStatFile();
-// ChunkHolder cholder = WSUtil.pullFile(file, position);
-// return cholder;
- return new ChunkHolder("", -1);
+ return analize(sequences);
}
}
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<!-- Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is Metro/2.1 (branches/2.1-6728; 2011-02-03T14:14:58+0000) JAXWS-RI/2.2.3 JAXWS/2.2. -->
-<definitions targetNamespace="http://msa.data.compbio/01/01/2010/" name="RNAalifoldWS" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:tns="http://msa.data.compbio/01/01/2010/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsp1_2="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
- <types>
- <xsd:schema>
- <xsd:import namespace="http://msa.data.compbio/01/01/2010/" schemaLocation="RNAalifoldWS_schema1.xsd"/>
- </xsd:schema>
- </types>
- <message name="getResult">
- <part name="parameters" element="tns:getResult"/>
- </message>
- <message name="getResultResponse">
- <part name="parameters" element="tns:getResultResponse"/>
- </message>
- <message name="ResultNotAvailableException">
- <part name="fault" element="tns:ResultNotAvailableException"/>
- </message>
- <message name="fold">
- <part name="parameters" element="tns:fold"/>
- </message>
- <message name="foldResponse">
- <part name="parameters" element="tns:foldResponse"/>
- </message>
- <message name="UnsupportedRuntimeException">
- <part name="fault" element="tns:UnsupportedRuntimeException"/>
- </message>
- <message name="LimitExceededException">
- <part name="fault" element="tns:LimitExceededException"/>
- </message>
- <message name="JobSubmissionException">
- <part name="fault" element="tns:JobSubmissionException"/>
- </message>
- <message name="presetFold">
- <part name="parameters" element="tns:presetFold"/>
- </message>
- <message name="presetFoldResponse">
- <part name="parameters" element="tns:presetFoldResponse"/>
- </message>
- <message name="WrongParameterException">
- <part name="fault" element="tns:WrongParameterException"/>
- </message>
- <message name="customFold">
- <part name="parameters" element="tns:customFold"/>
- </message>
- <message name="customFoldResponse">
- <part name="parameters" element="tns:customFoldResponse"/>
- </message>
- <message name="pullExecStatistics">
- <part name="parameters" element="tns:pullExecStatistics"/>
- </message>
- <message name="pullExecStatisticsResponse">
- <part name="parameters" element="tns:pullExecStatisticsResponse"/>
- </message>
- <message name="cancelJob">
- <part name="parameters" element="tns:cancelJob"/>
- </message>
- <message name="cancelJobResponse">
- <part name="parameters" element="tns:cancelJobResponse"/>
- </message>
- <message name="getJobStatus">
- <part name="parameters" element="tns:getJobStatus"/>
- </message>
- <message name="getJobStatusResponse">
- <part name="parameters" element="tns:getJobStatusResponse"/>
- </message>
- <message name="getRunnerOptions">
- <part name="parameters" element="tns:getRunnerOptions"/>
- </message>
- <message name="getRunnerOptionsResponse">
- <part name="parameters" element="tns:getRunnerOptionsResponse"/>
- </message>
- <message name="getLimit">
- <part name="parameters" element="tns:getLimit"/>
- </message>
- <message name="getLimitResponse">
- <part name="parameters" element="tns:getLimitResponse"/>
- </message>
- <message name="getLimits">
- <part name="parameters" element="tns:getLimits"/>
- </message>
- <message name="getLimitsResponse">
- <part name="parameters" element="tns:getLimitsResponse"/>
- </message>
- <message name="getPresets">
- <part name="parameters" element="tns:getPresets"/>
- </message>
- <message name="getPresetsResponse">
- <part name="parameters" element="tns:getPresetsResponse"/>
- </message>
- <portType name="FoldWS">
- <operation name="getResult">
- <input wsam:Action="http://msa.data.compbio/01/01/2010/FoldWS/getResultRequest" message="tns:getResult"/>
- <output wsam:Action="http://msa.data.compbio/01/01/2010/FoldWS/getResultResponse" message="tns:getResultResponse"/>
- <fault message="tns:ResultNotAvailableException" name="ResultNotAvailableException" wsam:Action="http://msa.data.compbio/01/01/2010/FoldWS/getResult/Fault/ResultNotAvailableException"/>
- </operation>
- <operation name="fold">
- <input wsam:Action="http://msa.data.compbio/01/01/2010/FoldWS/foldRequest" message="tns:fold"/>
- <output wsam:Action="http://msa.data.compbio/01/01/2010/FoldWS/foldResponse" message="tns:foldResponse"/>
- <fault message="tns:UnsupportedRuntimeException" name="UnsupportedRuntimeException" wsam:Action="http://msa.data.compbio/01/01/2010/FoldWS/fold/Fault/UnsupportedRuntimeException"/>
- <fault message="tns:LimitExceededException" name="LimitExceededException" wsam:Action="http://msa.data.compbio/01/01/2010/FoldWS/fold/Fault/LimitExceededException"/>
- <fault message="tns:JobSubmissionException" name="JobSubmissionException" wsam:Action="http://msa.data.compbio/01/01/2010/FoldWS/fold/Fault/JobSubmissionException"/>
- </operation>
- <operation name="presetFold">
- <input wsam:Action="http://msa.data.compbio/01/01/2010/FoldWS/presetFoldRequest" message="tns:presetFold"/>
- <output wsam:Action="http://msa.data.compbio/01/01/2010/FoldWS/presetFoldResponse" message="tns:presetFoldResponse"/>
- <fault message="tns:UnsupportedRuntimeException" name="UnsupportedRuntimeException" wsam:Action="http://msa.data.compbio/01/01/2010/FoldWS/presetFold/Fault/UnsupportedRuntimeException"/>
- <fault message="tns:LimitExceededException" name="LimitExceededException" wsam:Action="http://msa.data.compbio/01/01/2010/FoldWS/presetFold/Fault/LimitExceededException"/>
- <fault message="tns:JobSubmissionException" name="JobSubmissionException" wsam:Action="http://msa.data.compbio/01/01/2010/FoldWS/presetFold/Fault/JobSubmissionException"/>
- <fault message="tns:WrongParameterException" name="WrongParameterException" wsam:Action="http://msa.data.compbio/01/01/2010/FoldWS/presetFold/Fault/WrongParameterException"/>
- </operation>
- <operation name="customFold">
- <input wsam:Action="http://msa.data.compbio/01/01/2010/FoldWS/customFoldRequest" message="tns:customFold"/>
- <output wsam:Action="http://msa.data.compbio/01/01/2010/FoldWS/customFoldResponse" message="tns:customFoldResponse"/>
- <fault message="tns:UnsupportedRuntimeException" name="UnsupportedRuntimeException" wsam:Action="http://msa.data.compbio/01/01/2010/FoldWS/customFold/Fault/UnsupportedRuntimeException"/>
- <fault message="tns:LimitExceededException" name="LimitExceededException" wsam:Action="http://msa.data.compbio/01/01/2010/FoldWS/customFold/Fault/LimitExceededException"/>
- <fault message="tns:JobSubmissionException" name="JobSubmissionException" wsam:Action="http://msa.data.compbio/01/01/2010/FoldWS/customFold/Fault/JobSubmissionException"/>
- <fault message="tns:WrongParameterException" name="WrongParameterException" wsam:Action="http://msa.data.compbio/01/01/2010/FoldWS/customFold/Fault/WrongParameterException"/>
- </operation>
- <operation name="pullExecStatistics">
- <input wsam:Action="http://msa.data.compbio/01/01/2010/FoldWS/pullExecStatisticsRequest" message="tns:pullExecStatistics"/>
- <output wsam:Action="http://msa.data.compbio/01/01/2010/FoldWS/pullExecStatisticsResponse" message="tns:pullExecStatisticsResponse"/>
- </operation>
- <operation name="cancelJob">
- <input wsam:Action="http://msa.data.compbio/01/01/2010/FoldWS/cancelJobRequest" message="tns:cancelJob"/>
- <output wsam:Action="http://msa.data.compbio/01/01/2010/FoldWS/cancelJobResponse" message="tns:cancelJobResponse"/>
- </operation>
- <operation name="getJobStatus">
- <input wsam:Action="http://msa.data.compbio/01/01/2010/FoldWS/getJobStatusRequest" message="tns:getJobStatus"/>
- <output wsam:Action="http://msa.data.compbio/01/01/2010/FoldWS/getJobStatusResponse" message="tns:getJobStatusResponse"/>
- </operation>
- <operation name="getRunnerOptions">
- <input wsam:Action="http://msa.data.compbio/01/01/2010/FoldWS/getRunnerOptionsRequest" message="tns:getRunnerOptions"/>
- <output wsam:Action="http://msa.data.compbio/01/01/2010/FoldWS/getRunnerOptionsResponse" message="tns:getRunnerOptionsResponse"/>
- </operation>
- <operation name="getLimit">
- <input wsam:Action="http://msa.data.compbio/01/01/2010/FoldWS/getLimitRequest" message="tns:getLimit"/>
- <output wsam:Action="http://msa.data.compbio/01/01/2010/FoldWS/getLimitResponse" message="tns:getLimitResponse"/>
- </operation>
- <operation name="getLimits">
- <input wsam:Action="http://msa.data.compbio/01/01/2010/FoldWS/getLimitsRequest" message="tns:getLimits"/>
- <output wsam:Action="http://msa.data.compbio/01/01/2010/FoldWS/getLimitsResponse" message="tns:getLimitsResponse"/>
- </operation>
- <operation name="getPresets">
- <input wsam:Action="http://msa.data.compbio/01/01/2010/FoldWS/getPresetsRequest" message="tns:getPresets"/>
- <output wsam:Action="http://msa.data.compbio/01/01/2010/FoldWS/getPresetsResponse" message="tns:getPresetsResponse"/>
- </operation>
- </portType>
- <binding name="RNAalifoldWSPortBinding" type="tns:FoldWS">
- <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
- <operation name="getResult">
- <soap:operation soapAction=""/>
- <input>
- <soap:body use="literal"/>
- </input>
- <output>
- <soap:body use="literal"/>
- </output>
- <fault name="ResultNotAvailableException">
- <soap:fault name="ResultNotAvailableException" use="literal"/>
- </fault>
- </operation>
- <operation name="fold">
- <soap:operation soapAction=""/>
- <input>
- <soap:body use="literal"/>
- </input>
- <output>
- <soap:body use="literal"/>
- </output>
- <fault name="UnsupportedRuntimeException">
- <soap:fault name="UnsupportedRuntimeException" use="literal"/>
- </fault>
- <fault name="LimitExceededException">
- <soap:fault name="LimitExceededException" use="literal"/>
- </fault>
- <fault name="JobSubmissionException">
- <soap:fault name="JobSubmissionException" use="literal"/>
- </fault>
- </operation>
- <operation name="presetFold">
- <soap:operation soapAction=""/>
- <input>
- <soap:body use="literal"/>
- </input>
- <output>
- <soap:body use="literal"/>
- </output>
- <fault name="UnsupportedRuntimeException">
- <soap:fault name="UnsupportedRuntimeException" use="literal"/>
- </fault>
- <fault name="LimitExceededException">
- <soap:fault name="LimitExceededException" use="literal"/>
- </fault>
- <fault name="JobSubmissionException">
- <soap:fault name="JobSubmissionException" use="literal"/>
- </fault>
- <fault name="WrongParameterException">
- <soap:fault name="WrongParameterException" use="literal"/>
- </fault>
- </operation>
- <operation name="customFold">
- <soap:operation soapAction=""/>
- <input>
- <soap:body use="literal"/>
- </input>
- <output>
- <soap:body use="literal"/>
- </output>
- <fault name="UnsupportedRuntimeException">
- <soap:fault name="UnsupportedRuntimeException" use="literal"/>
- </fault>
- <fault name="LimitExceededException">
- <soap:fault name="LimitExceededException" use="literal"/>
- </fault>
- <fault name="JobSubmissionException">
- <soap:fault name="JobSubmissionException" use="literal"/>
- </fault>
- <fault name="WrongParameterException">
- <soap:fault name="WrongParameterException" use="literal"/>
- </fault>
- </operation>
- <operation name="pullExecStatistics">
- <soap:operation soapAction=""/>
- <input>
- <soap:body use="literal"/>
- </input>
- <output>
- <soap:body use="literal"/>
- </output>
- </operation>
- <operation name="cancelJob">
- <soap:operation soapAction=""/>
- <input>
- <soap:body use="literal"/>
- </input>
- <output>
- <soap:body use="literal"/>
- </output>
- </operation>
- <operation name="getJobStatus">
- <soap:operation soapAction=""/>
- <input>
- <soap:body use="literal"/>
- </input>
- <output>
- <soap:body use="literal"/>
- </output>
- </operation>
- <operation name="getRunnerOptions">
- <soap:operation soapAction=""/>
- <input>
- <soap:body use="literal"/>
- </input>
- <output>
- <soap:body use="literal"/>
- </output>
- </operation>
- <operation name="getLimit">
- <soap:operation soapAction=""/>
- <input>
- <soap:body use="literal"/>
- </input>
- <output>
- <soap:body use="literal"/>
- </output>
- </operation>
- <operation name="getLimits">
- <soap:operation soapAction=""/>
- <input>
- <soap:body use="literal"/>
- </input>
- <output>
- <soap:body use="literal"/>
- </output>
- </operation>
- <operation name="getPresets">
- <soap:operation soapAction=""/>
- <input>
- <soap:body use="literal"/>
- </input>
- <output>
- <soap:body use="literal"/>
- </output>
- </operation>
- </binding>
- <service name="RNAalifoldWS">
- <port name="RNAalifoldWSPort" binding="tns:RNAalifoldWSPortBinding">
- <soap:address location="REPLACE_WITH_ACTUAL_URL"/>
- </port>
- </service>
-</definitions>
-