2 * Jalview - A Sequence Alignment Editor and Viewer
3 * Copyright (C) 2007 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version 2
8 * of the License, or (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
27 * WSClient holds the basic attributes that are displayed to the user
28 * for all jalview web service clients
31 * displayed name for this web service
33 protected String WebServiceName;
35 * specific job title (e.g. 'ClustalW Alignment of Selection from Aligment from Cut and Paste input')
37 protected String WebServiceJobTitle;
39 * String giving additional information such as method citations for this service
41 protected String WebServiceReference;
45 protected String WsURL;
47 * Web service information used to initialise the WSClient attributes
49 protected WebserviceInfo wsInfo;
51 * total number of jobs managed by this web service client instance.
55 * TODO: this is really service metadata, and should be moved elsewhere.
56 * mappings between abstract interface names and menu entries
58 protected java.util.Hashtable ServiceActions;
60 ServiceActions = new java.util.Hashtable();
61 ServiceActions.put("MsaWS", "Multiple Sequence Alignment");
62 ServiceActions.put("SecStrPred", "Secondary Structure Prediction");
68 * initialise WSClient service information attributes from the service handle
70 * @return the service instance information for this client and job.
72 protected WebserviceInfo setWebService(ServiceHandle sh)
74 WebServiceName = sh.getName();
75 if (ServiceActions.containsKey(sh.getAbstractName()))
77 WebServiceJobTitle = sh.getName(); // TODO: control sh.Name specification properly
78 // add this for short names. +(String) ServiceActions.get(sh.getAbstractName());
82 WebServiceJobTitle = sh.getAbstractName() + " using " + sh.getName();
85 WebServiceReference = sh.getDescription();
86 WsURL = sh.getEndpointURL();
87 WebserviceInfo wsInfo = new WebserviceInfo(WebServiceJobTitle,