From 53b5a0098fa2402183ad0525889a578de5a8f43c Mon Sep 17 00:00:00 2001 From: =?utf8?q?F=C3=A1bio=20Madeira?= Date: Fri, 26 May 2017 17:19:11 +0100 Subject: [PATCH] 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. --- webservices/compbio/ws/server/DisemblWS.java | 11 +++++++++++ webservices/compbio/ws/server/GlobPlotWS.java | 11 +++++++++++ webservices/compbio/ws/server/IUPredWS.java | 11 +++++++++++ 3 files changed, 33 insertions(+) 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); + } } -- 1.7.10.2