X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=webservices%2Fcompbio%2Fws%2Fserver%2FProbconsWS.java;h=71f47302ea3fbf9a58d0f5a806b598885f665be2;hb=c84ec6492607920b938cfa3645e1a92e15727dd1;hp=586352bae4fb39b14ef76c32fb35f3d7c12e4db4;hpb=021b24f125d8b1e8390e99b4a835469dabdd7be1;p=jabaws.git diff --git a/webservices/compbio/ws/server/ProbconsWS.java b/webservices/compbio/ws/server/ProbconsWS.java index 586352b..71f4730 100644 --- a/webservices/compbio/ws/server/ProbconsWS.java +++ b/webservices/compbio/ws/server/ProbconsWS.java @@ -1,6 +1,6 @@ -/* Copyright (c) 2009 Peter Troshin +/* Copyright (c) 2011 Peter Troshin * - * JAva Bioinformatics Analysis Web Services (JABAWS) @version: 1.0 + * JAva Bioinformatics Analysis Web Services (JABAWS) @version: 2.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 @@ -21,18 +21,18 @@ 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.JABAService; import compbio.data.msa.MsaWS; import compbio.data.sequence.Alignment; import compbio.data.sequence.FastaSequence; 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; @@ -47,15 +47,9 @@ import compbio.metadata.WrongParameterException; import compbio.runner.Util; import compbio.runner.msa.Probcons; -@WebService(endpointInterface = "compbio.data.msa.MsaWS", targetNamespace = "http://msa.data.compbio/01/01/2010/", serviceName = "ProbconsWS") +@WebService(endpointInterface = "compbio.data.msa.MsaWS", targetNamespace = JABAService.SERVICE_NAMESPACE, 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 @@ -69,13 +63,16 @@ public class ProbconsWS implements MsaWS { throws JobSubmissionException { WSUtil.validateFastaInput(sequences); ConfiguredExecutable confProbcons = init(sequences); - return WSUtil.align(sequences, confProbcons, null, "align", - getLimit("")); + return WSUtil + .align(sequences, confProbcons, log, "align", getLimit("")); } ConfiguredExecutable init(List dataSet) throws JobSubmissionException { Probcons probcons = new Probcons(); + probcons.setInput(SkeletalExecutable.INPUT) + .setOutput(SkeletalExecutable.OUTPUT) + .setError(SkeletalExecutable.ERROR); return Configurator.configureExecutable(probcons, dataSet); } @@ -89,7 +86,7 @@ public class ProbconsWS implements MsaWS { Probcons.KEY_VALUE_SEPARATOR); log.info("Setting parameters:" + params); confProbcons.addParameters(params); - return WSUtil.align(sequences, confProbcons, null, "customAlign", + return WSUtil.align(sequences, confProbcons, log, "customAlign", getLimit("")); } @@ -104,8 +101,7 @@ public class ProbconsWS implements MsaWS { ConfiguredExecutable confProbcons = init(sequences); confProbcons.addParameters(preset.getOptions()); Limit limit = getLimit(preset.getName()); - return WSUtil - .align(sequences, confProbcons, null, "presetAlign", limit); + return WSUtil.align(sequences, confProbcons, log, "presetAlign", limit); } @SuppressWarnings("unchecked")