X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=webservices%2Fcompbio%2Fws%2Fserver%2FAAConWS.java;h=fab12b8e42b5ae3e8e04b26ffe9dfb52d2af0be1;hb=a2619dbd95b874abd03ae551c02524fe09e9f631;hp=a32533ff91033f12f8bdbd66405e32a7e68ee537;hpb=6582e82919b0d3697fe5e96f1be6a369f90a2d93;p=jabaws.git diff --git a/webservices/compbio/ws/server/AAConWS.java b/webservices/compbio/ws/server/AAConWS.java index a32533f..fab12b8 100644 --- a/webservices/compbio/ws/server/AAConWS.java +++ b/webservices/compbio/ws/server/AAConWS.java @@ -2,7 +2,6 @@ package compbio.ws.server; import java.io.File; import java.util.Arrays; -import java.util.HashSet; import java.util.List; import javax.annotation.Resource; @@ -11,12 +10,13 @@ import javax.xml.ws.WebServiceContext; import org.apache.log4j.Logger; -import compbio.data.msa.Annotation; +import compbio.data.msa.SequenceAnnotation; import compbio.data.sequence.FastaSequence; -import compbio.data.sequence.Score; +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; @@ -33,8 +33,8 @@ import compbio.metadata.WrongParameterException; import compbio.runner.Util; import compbio.runner.conservation.AACon; -@WebService(endpointInterface = "compbio.data.msa.Annotation", targetNamespace = "http://msa.data.compbio/01/12/2010/", serviceName = "AAConWS") -public class AAConWS implements Annotation { +@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 @@ -50,21 +50,25 @@ public class AAConWS implements Annotation { 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("fasta.in").setOutput("aacon.out"); + aacon.setInput(SkeletalExecutable.INPUT).setOutput( + SkeletalExecutable.OUTPUT); return Configurator.configureExecutable(aacon, sequences); } @Override - public HashSet getAnnotation(String jobId) + public ScoreManager getAnnotation(String jobId) throws ResultNotAvailableException { WSUtil.validateJobId(jobId); AsyncExecutor asyncEngine = Configurator.getAsyncEngine(jobId); ConfiguredExecutable aacon = (ConfiguredExecutable) asyncEngine .getResults(jobId); - HashSet mas = aacon.getResults(); + ScoreManager mas = aacon.getResults(); log.trace(jobId + " getConservation : " + mas); return mas; } @@ -77,12 +81,16 @@ public class AAConWS implements Annotation { @Override public Limit getLimit(String presetName) { - return new AACon().getLimit(presetName); + if (limitMan == null) { + // Limit is not defined + return null; + } + return limitMan.getLimitByName(presetName); } @Override public LimitsManager getLimits() { - return new AACon().getLimits(); + return limitMan; } @Override