From: Fábio Madeira Date: Fri, 26 May 2017 16:19:11 +0000 (+0100) Subject: JWS-120 Fixes the exception raised by the ChunkHolder method in GenericMetadataServic... X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=53b5a0098fa2402183ad0525889a578de5a8f43c;p=jabaws.git JWS-120 Fixes the exception raised by the ChunkHolder method in GenericMetadataService. This behavior was expected for services which do not support execution statistics. This solution was found in the compbio.ws.server.JronnWS.java. --- diff --git a/webservices/compbio/ws/server/DisemblWS.java b/webservices/compbio/ws/server/DisemblWS.java index bf75828..bb664c2 100644 --- a/webservices/compbio/ws/server/DisemblWS.java +++ b/webservices/compbio/ws/server/DisemblWS.java @@ -18,6 +18,7 @@ package compbio.ws.server; import java.util.List; +import java.io.File; import javax.jws.WebService; @@ -33,6 +34,9 @@ import compbio.metadata.Preset; import compbio.metadata.UnsupportedRuntimeException; import compbio.metadata.WrongParameterException; import compbio.runner.disorder.Disembl; +import compbio.engine.Configurator; +import compbio.runner.conservation.AACon; +import compbio.metadata.ChunkHolder; @WebService(endpointInterface = "compbio.data.msa.SequenceAnnotation", targetNamespace = JABAService.V2_SERVICE_NAMESPACE, serviceName = "DisemblWS") public class DisemblWS extends SequenceAnnotationService @@ -69,5 +73,12 @@ public class DisemblWS extends SequenceAnnotationService return analize(sequences); } + @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); + } } diff --git a/webservices/compbio/ws/server/GlobPlotWS.java b/webservices/compbio/ws/server/GlobPlotWS.java index d54bcd9..084cb89 100644 --- a/webservices/compbio/ws/server/GlobPlotWS.java +++ b/webservices/compbio/ws/server/GlobPlotWS.java @@ -18,6 +18,7 @@ package compbio.ws.server; import java.util.List; +import java.io.File; import javax.jws.WebService; @@ -33,6 +34,9 @@ import compbio.metadata.Preset; import compbio.metadata.UnsupportedRuntimeException; import compbio.metadata.WrongParameterException; import compbio.runner.disorder.GlobPlot; +import compbio.engine.Configurator; +import compbio.runner.conservation.AACon; +import compbio.metadata.ChunkHolder; @WebService(endpointInterface = "compbio.data.msa.SequenceAnnotation", targetNamespace = JABAService.V2_SERVICE_NAMESPACE, serviceName = "GlobPlotWS") public class GlobPlotWS extends SequenceAnnotationService @@ -69,5 +73,12 @@ public class GlobPlotWS extends SequenceAnnotationService return analize(sequences); } + @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); + } } diff --git a/webservices/compbio/ws/server/IUPredWS.java b/webservices/compbio/ws/server/IUPredWS.java index b01137e..dab9245 100644 --- a/webservices/compbio/ws/server/IUPredWS.java +++ b/webservices/compbio/ws/server/IUPredWS.java @@ -18,6 +18,7 @@ package compbio.ws.server; import java.util.List; +import java.io.File; import javax.jws.WebService; @@ -32,6 +33,9 @@ import compbio.metadata.Preset; import compbio.metadata.UnsupportedRuntimeException; import compbio.metadata.WrongParameterException; import compbio.runner.disorder.IUPred; +import compbio.engine.Configurator; +import compbio.runner.conservation.AACon; +import compbio.metadata.ChunkHolder; @WebService(endpointInterface = "compbio.data.msa.SequenceAnnotation", targetNamespace = JABAService.V2_SERVICE_NAMESPACE, serviceName = "IUPredWS") public class IUPredWS extends SequenceAnnotationService @@ -56,5 +60,12 @@ public class IUPredWS extends SequenceAnnotationService return analize(sequences); } + @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); + } }