Next version of JABA
[jabaws.git] / webservices / compbio / ws / client / Services.java
1 /* Copyright (c) 2009 Peter Troshin\r
2  *  \r
3  *  JAva Bioinformatics Analysis Web Services (JABAWS) @version: 1.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 \r
19 package compbio.ws.client;\r
20 \r
21 /**\r
22  * List of web services currently supported by JABAWS version 1\r
23  * \r
24  */\r
25 public enum Services {\r
26     MafftWS, MuscleWS, ClustalWS, TcoffeeWS, ProbconsWS;\r
27 \r
28     public static Services getService(String servName) {\r
29         servName = servName.trim().toLowerCase();\r
30         if (servName.equalsIgnoreCase(MafftWS.toString())) {\r
31             return MafftWS;\r
32         }\r
33         if (servName.equalsIgnoreCase(ClustalWS.toString())) {\r
34             return ClustalWS;\r
35         }\r
36         if (servName.equalsIgnoreCase(TcoffeeWS.toString())) {\r
37             return TcoffeeWS;\r
38         }\r
39         if (servName.equalsIgnoreCase(MuscleWS.toString())) {\r
40             return MuscleWS;\r
41         }\r
42         if (servName.equalsIgnoreCase(ProbconsWS.toString())) {\r
43             return ProbconsWS;\r
44         }\r
45         return null;\r
46     }\r
47 \r
48     public static Services getService(Class wsImplClass) {\r
49         return getService(wsImplClass.getSimpleName());\r
50     }\r
51 \r
52 }