Change header template for a new version
[jabaws.git] / webservices / compbio / ws / server / DisemblWS.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.util.List;\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.data.sequence.FastaSequence;\r
29 import compbio.metadata.JobSubmissionException;\r
30 import compbio.metadata.LimitExceededException;\r
31 import compbio.metadata.Option;\r
32 import compbio.metadata.Preset;\r
33 import compbio.metadata.UnsupportedRuntimeException;\r
34 import compbio.metadata.WrongParameterException;\r
35 import compbio.runner.disorder.Disembl;\r
36 \r
37 @WebService(endpointInterface = "compbio.data.msa.SequenceAnnotation", targetNamespace = JABAService.V2_SERVICE_NAMESPACE, serviceName = "DisemblWS")\r
38 public class DisemblWS extends SequenceAnnotationService<Disembl>\r
39                 implements\r
40                         SequenceAnnotation<Disembl> {\r
41 \r
42         private static Logger log = Logger.getLogger(DisemblWS.class);\r
43 \r
44         public DisemblWS() {\r
45                 super(new Disembl(), log);\r
46         }\r
47 \r
48         /*\r
49          * No options are supported, thus the result of this call will be as simple\r
50          * call to analize without parameters\r
51          */\r
52         @Override\r
53         public String customAnalize(List<FastaSequence> sequences,\r
54                         List<Option<Disembl>> options) throws UnsupportedRuntimeException,\r
55                         LimitExceededException, JobSubmissionException,\r
56                         WrongParameterException {\r
57                 return analize(sequences);\r
58         }\r
59 \r
60         /*\r
61          * No presets are supported, thus the result of this call will be as simple\r
62          * call to analize without parameters\r
63          */\r
64         @Override\r
65         public String presetAnalize(List<FastaSequence> sequences,\r
66                         Preset<Disembl> preset) throws UnsupportedRuntimeException,\r
67                         LimitExceededException, JobSubmissionException,\r
68                         WrongParameterException {\r
69 \r
70                 return analize(sequences);\r
71         }\r
72 \r
73 }\r