1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84
|
/* Copyright (c) 2011 Peter Troshin
*
* 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
*
* This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
* even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Apache
* License for more details.
*
* A copy of the license is in apache_license.txt. It is also available here:
* @see: http://www.apache.org/licenses/LICENSE-2.0.txt
*
* Any republication or derived work distributed in source code form
* must include this copyright and license notice.
*/
package compbio.ws.server;
import java.util.List;
import java.io.File;
import javax.jws.WebService;
import org.apache.log4j.Logger;
import compbio.data.msa.JABAService;
import compbio.data.msa.SequenceAnnotation;
import compbio.data.sequence.FastaSequence;
import compbio.metadata.JobSubmissionException;
import compbio.metadata.LimitExceededException;
import compbio.metadata.Option;
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<GlobPlot>
implements
SequenceAnnotation<GlobPlot> {
private static Logger log = Logger.getLogger(GlobPlotWS.class);
public GlobPlotWS() {
super(new GlobPlot(), log);
}
/*
* No options are supported, thus the result of this call will be as simple
* call to analize without parameters
*/
@Override
public String customAnalize(List<FastaSequence> sequences,
List<Option<GlobPlot>> options) throws UnsupportedRuntimeException,
LimitExceededException, JobSubmissionException,
WrongParameterException {
return analize(sequences);
}
/*
* No presets are supported, thus the result of this call will be as simple
* call to analize without parameters
*/
@Override
public String presetAnalize(List<FastaSequence> sequences,
Preset<GlobPlot> preset) throws UnsupportedRuntimeException,
LimitExceededException, JobSubmissionException,
WrongParameterException {
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);
}
}
|