Change header template for a new version
[jabaws.git] / webservices / compbio / ws / server / JronnWS.java
1 /* Copyright (c) 2011 Peter Troshin\r
2  *  \r
3  *  JAva Bioinformatics Analysis Web Services (JABAWS) @version: 2.0     \r
4  * \r
5  *  This library is free software; you can redistribute it and/or modify it under the terms of the\r
6  *  Apache License version 2 as published by the Apache Software Foundation\r
7  * \r
8  *  This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without\r
9  *  even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Apache \r
10  *  License for more details.\r
11  * \r
12  *  A copy of the license is in apache_license.txt. It is also available here:\r
13  * @see: http://www.apache.org/licenses/LICENSE-2.0.txt\r
14  * \r
15  * Any republication or derived work distributed in source code form\r
16  * must include this copyright and license notice.\r
17  */\r
18 package compbio.ws.server;\r
19 \r
20 import java.io.File;\r
21 \r
22 import javax.jws.WebService;\r
23 \r
24 import org.apache.log4j.Logger;\r
25 \r
26 import compbio.data.msa.JABAService;\r
27 import compbio.data.msa.SequenceAnnotation;\r
28 import compbio.engine.Configurator;\r
29 import compbio.metadata.ChunkHolder;\r
30 import compbio.runner.conservation.AACon;\r
31 import compbio.runner.disorder.Jronn;\r
32 \r
33 @WebService(endpointInterface = "compbio.data.msa.SequenceAnnotation", targetNamespace = JABAService.V2_SERVICE_NAMESPACE, serviceName = "JronnWS")\r
34 public class JronnWS extends SequenceAnnotationService<Jronn>\r
35                 implements\r
36                         SequenceAnnotation<Jronn> {\r
37 \r
38         private static Logger log = Logger.getLogger(JronnWS.class);\r
39 \r
40         public JronnWS() {\r
41                 super(new Jronn(), log);\r
42         }\r
43 \r
44         @Override\r
45         public ChunkHolder pullExecStatistics(String jobId, long position) {\r
46                 WSUtil.validateJobId(jobId);\r
47                 String file = Configurator.getWorkDirectory(jobId) + File.separator\r
48                                 + AACon.getStatFile();\r
49                 return WSUtil.pullFile(file, position);\r
50         }\r
51 \r
52 }\r