2 // forester -- software libraries and applications
3 // for evolutionary biology research and applications.
5 // Copyright (C) 2008-2010 Christian M. Zmasek
6 // Copyright (C) 2008-2010 Burnham Institute for Medical Research
8 // This library is free software; you can redistribute it and/or
9 // modify it under the terms of the GNU Lesser General Public
10 // License as published by the Free Software Foundation; either
11 // version 2.1 of the License, or (at your option) any later version.
13 // This library is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 // Lesser General Public License for more details.
18 // You should have received a copy of the GNU Lesser General Public
19 // License along with this library; if not, write to the Free Software
20 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
22 // Contact: phylosoft @ gmail . com
23 // WWW: www.phylosoft.org
25 package org.forester.archaeopteryx.webservices;
27 import java.util.ArrayList;
28 import java.util.List;
30 public final class WebservicesManager {
32 private static WebservicesManager _instance;
33 private final List<PhylogeniesWebserviceClient> _clients;
35 private WebservicesManager() {
36 _clients = new ArrayList<PhylogeniesWebserviceClient>();
37 _clients.addAll( WebserviceUtil.createDefaultClients() );
41 public Object clone() throws CloneNotSupportedException {
42 throw new CloneNotSupportedException();
45 public PhylogeniesWebserviceClient getAvailablePhylogeniesWebserviceClient( final int i ) {
46 return getAvailablePhylogeniesWebserviceClients().get( i );
49 public List<PhylogeniesWebserviceClient> getAvailablePhylogeniesWebserviceClients() {
53 public static WebservicesManager getInstance() {
54 if ( _instance == null ) {
55 _instance = new WebservicesManager();
60 public enum WsPhylogenyFormat {
61 NH, NHX, NEXUS, TOL_XML_RESPONSE, PHYLOXML, NH_EXTRACT_TAXONOMY, PFAM