JAL-1432 updated copyright notices
[jalview.git] / src / uk / ac / ebi / www / picr / AccessionMappingService / AccessionMapperServiceLocator.java
1 /*
2  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
3  * Copyright (C) 2014 The Jalview Authors
4  * 
5  * This file is part of Jalview.
6  * 
7  * Jalview is free software: you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License 
9  * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
10  *  
11  * Jalview is distributed in the hope that it will be useful, but 
12  * WITHOUT ANY WARRANTY; without even the implied warranty 
13  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
14  * PURPOSE.  See the GNU General Public License for more details.
15  * 
16  * You should have received a copy of the GNU General Public License along with Jalview.  If not, see <http://www.gnu.org/licenses/>.
17  * The Jalview Authors are detailed in the 'AUTHORS' file.
18  */
19 package uk.ac.ebi.www.picr.AccessionMappingService;
20
21 public class AccessionMapperServiceLocator extends
22         org.apache.axis.client.Service implements
23         uk.ac.ebi.www.picr.AccessionMappingService.AccessionMapperService
24 {
25
26   public AccessionMapperServiceLocator()
27   {
28   }
29
30   public AccessionMapperServiceLocator(
31           org.apache.axis.EngineConfiguration config)
32   {
33     super(config);
34   }
35
36   // Use to get a proxy class for AccessionMapperPort
37   private java.lang.String AccessionMapperPort_address = "http://www.ebi.ac.uk:80/Tools/picr/service";
38
39   public java.lang.String getAccessionMapperPortAddress()
40   {
41     return AccessionMapperPort_address;
42   }
43
44   // The WSDD service name defaults to the port name.
45   private java.lang.String AccessionMapperPortWSDDServiceName = "AccessionMapperPort";
46
47   public java.lang.String getAccessionMapperPortWSDDServiceName()
48   {
49     return AccessionMapperPortWSDDServiceName;
50   }
51
52   public void setAccessionMapperPortWSDDServiceName(java.lang.String name)
53   {
54     AccessionMapperPortWSDDServiceName = name;
55   }
56
57   public uk.ac.ebi.www.picr.AccessionMappingService.AccessionMapperInterface getAccessionMapperPort()
58           throws javax.xml.rpc.ServiceException
59   {
60     java.net.URL endpoint;
61     try
62     {
63       endpoint = new java.net.URL(AccessionMapperPort_address);
64     } catch (java.net.MalformedURLException e)
65     {
66       throw new javax.xml.rpc.ServiceException(e);
67     }
68     return getAccessionMapperPort(endpoint);
69   }
70
71   public uk.ac.ebi.www.picr.AccessionMappingService.AccessionMapperInterface getAccessionMapperPort(
72           java.net.URL portAddress) throws javax.xml.rpc.ServiceException
73   {
74     try
75     {
76       uk.ac.ebi.www.picr.AccessionMappingService.AccessionMapperBindingStub _stub = new uk.ac.ebi.www.picr.AccessionMappingService.AccessionMapperBindingStub(
77               portAddress, this);
78       _stub.setPortName(getAccessionMapperPortWSDDServiceName());
79       return _stub;
80     } catch (org.apache.axis.AxisFault e)
81     {
82       return null;
83     }
84   }
85
86   public void setAccessionMapperPortEndpointAddress(java.lang.String address)
87   {
88     AccessionMapperPort_address = address;
89   }
90
91   /**
92    * For the given interface, get the stub implementation. If this service has
93    * no port for the given interface, then ServiceException is thrown.
94    */
95   public java.rmi.Remote getPort(Class serviceEndpointInterface)
96           throws javax.xml.rpc.ServiceException
97   {
98     try
99     {
100       if (uk.ac.ebi.www.picr.AccessionMappingService.AccessionMapperInterface.class
101               .isAssignableFrom(serviceEndpointInterface))
102       {
103         uk.ac.ebi.www.picr.AccessionMappingService.AccessionMapperBindingStub _stub = new uk.ac.ebi.www.picr.AccessionMappingService.AccessionMapperBindingStub(
104                 new java.net.URL(AccessionMapperPort_address), this);
105         _stub.setPortName(getAccessionMapperPortWSDDServiceName());
106         return _stub;
107       }
108     } catch (java.lang.Throwable t)
109     {
110       throw new javax.xml.rpc.ServiceException(t);
111     }
112     throw new javax.xml.rpc.ServiceException(
113             "There is no stub implementation for the interface:  "
114                     + (serviceEndpointInterface == null ? "null"
115                             : serviceEndpointInterface.getName()));
116   }
117
118   /**
119    * For the given interface, get the stub implementation. If this service has
120    * no port for the given interface, then ServiceException is thrown.
121    */
122   public java.rmi.Remote getPort(javax.xml.namespace.QName portName,
123           Class serviceEndpointInterface)
124           throws javax.xml.rpc.ServiceException
125   {
126     if (portName == null)
127     {
128       return getPort(serviceEndpointInterface);
129     }
130     java.lang.String inputPortName = portName.getLocalPart();
131     if ("AccessionMapperPort".equals(inputPortName))
132     {
133       return getAccessionMapperPort();
134     }
135     else
136     {
137       java.rmi.Remote _stub = getPort(serviceEndpointInterface);
138       ((org.apache.axis.client.Stub) _stub).setPortName(portName);
139       return _stub;
140     }
141   }
142
143   public javax.xml.namespace.QName getServiceName()
144   {
145     return new javax.xml.namespace.QName(
146             "http://www.ebi.ac.uk/picr/AccessionMappingService",
147             "AccessionMapperService");
148   }
149
150   private java.util.HashSet ports = null;
151
152   public java.util.Iterator getPorts()
153   {
154     if (ports == null)
155     {
156       ports = new java.util.HashSet();
157       ports.add(new javax.xml.namespace.QName(
158               "http://www.ebi.ac.uk/picr/AccessionMappingService",
159               "AccessionMapperPort"));
160     }
161     return ports.iterator();
162   }
163
164   /**
165    * Set the endpoint address for the specified port name.
166    */
167   public void setEndpointAddress(java.lang.String portName,
168           java.lang.String address) throws javax.xml.rpc.ServiceException
169   {
170     if ("AccessionMapperPort".equals(portName))
171     {
172       setAccessionMapperPortEndpointAddress(address);
173     }
174     else
175     { // Unknown Port Name
176       throw new javax.xml.rpc.ServiceException(
177               " Cannot set Endpoint Address for Unknown Port" + portName);
178     }
179   }
180
181   /**
182    * Set the endpoint address for the specified port name.
183    */
184   public void setEndpointAddress(javax.xml.namespace.QName portName,
185           java.lang.String address) throws javax.xml.rpc.ServiceException
186   {
187     setEndpointAddress(portName.getLocalPart(), address);
188   }
189
190 }