7d95b1a14fd87451eee8ee705a2d244c5216f224
[jalview.git] / src / ext / vamsas / ServiceHandle.java
1 /*
2  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4)
3  * Copyright (C) 2008 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle
4  * 
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.
9  * 
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.
14  * 
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
18  */
19 package ext.vamsas;
20
21 public class ServiceHandle
22     implements java.io.Serializable
23 {
24   private java.lang.String abstractName;
25   private java.lang.String description;
26   private java.lang.String endpointURL;
27   private java.lang.String name;
28
29   public ServiceHandle()
30   {
31   }
32
33   public ServiceHandle(
34       java.lang.String abstractName,
35       java.lang.String description,
36       java.lang.String endpointURL,
37       java.lang.String name)
38   {
39     this.abstractName = abstractName;
40     this.description = description;
41     this.endpointURL = endpointURL;
42     this.name = name;
43   }
44
45   /**
46    * Gets the abstractName value for this ServiceHandle.
47    *
48    * @return abstractName
49    */
50   public java.lang.String getAbstractName()
51   {
52     return abstractName;
53   }
54
55   /**
56    * Sets the abstractName value for this ServiceHandle.
57    *
58    * @param abstractName
59    */
60   public void setAbstractName(java.lang.String abstractName)
61   {
62     this.abstractName = abstractName;
63   }
64
65   /**
66    * Gets the description value for this ServiceHandle.
67    *
68    * @return description
69    */
70   public java.lang.String getDescription()
71   {
72     return description;
73   }
74
75   /**
76    * Sets the description value for this ServiceHandle.
77    *
78    * @param description
79    */
80   public void setDescription(java.lang.String description)
81   {
82     this.description = description;
83   }
84
85   /**
86    * Gets the endpointURL value for this ServiceHandle.
87    *
88    * @return endpointURL
89    */
90   public java.lang.String getEndpointURL()
91   {
92     return endpointURL;
93   }
94
95   /**
96    * Sets the endpointURL value for this ServiceHandle.
97    *
98    * @param endpointURL
99    */
100   public void setEndpointURL(java.lang.String endpointURL)
101   {
102     this.endpointURL = endpointURL;
103   }
104
105   /**
106    * Gets the name value for this ServiceHandle.
107    *
108    * @return name
109    */
110   public java.lang.String getName()
111   {
112     return name;
113   }
114
115   /**
116    * Sets the name value for this ServiceHandle.
117    *
118    * @param name
119    */
120   public void setName(java.lang.String name)
121   {
122     this.name = name;
123   }
124
125   private java.lang.Object __equalsCalc = null;
126   public synchronized boolean equals(java.lang.Object obj)
127   {
128     if (! (obj instanceof ServiceHandle))
129     {
130       return false;
131     }
132     ServiceHandle other = (ServiceHandle) obj;
133     if (obj == null)
134     {
135       return false;
136     }
137     if (this == obj)
138     {
139       return true;
140     }
141     if (__equalsCalc != null)
142     {
143       return (__equalsCalc == obj);
144     }
145     __equalsCalc = obj;
146     boolean _equals;
147     _equals = true &&
148         ( (this.abstractName == null && other.getAbstractName() == null) ||
149          (this.abstractName != null &&
150           this.abstractName.equals(other.getAbstractName()))) &&
151         ( (this.description == null && other.getDescription() == null) ||
152          (this.description != null &&
153           this.description.equals(other.getDescription()))) &&
154         ( (this.endpointURL == null && other.getEndpointURL() == null) ||
155          (this.endpointURL != null &&
156           this.endpointURL.equals(other.getEndpointURL()))) &&
157         ( (this.name == null && other.getName() == null) ||
158          (this.name != null &&
159           this.name.equals(other.getName())));
160     __equalsCalc = null;
161     return _equals;
162   }
163
164   private boolean __hashCodeCalc = false;
165   public synchronized int hashCode()
166   {
167     if (__hashCodeCalc)
168     {
169       return 0;
170     }
171     __hashCodeCalc = true;
172     int _hashCode = 1;
173     if (getAbstractName() != null)
174     {
175       _hashCode += getAbstractName().hashCode();
176     }
177     if (getDescription() != null)
178     {
179       _hashCode += getDescription().hashCode();
180     }
181     if (getEndpointURL() != null)
182     {
183       _hashCode += getEndpointURL().hashCode();
184     }
185     if (getName() != null)
186     {
187       _hashCode += getName().hashCode();
188     }
189     __hashCodeCalc = false;
190     return _hashCode;
191   }
192
193   // Type metadata
194   private static org.apache.axis.description.TypeDesc typeDesc =
195       new org.apache.axis.description.TypeDesc(ServiceHandle.class, true);
196
197   static
198   {
199     typeDesc.setXmlType(new javax.xml.namespace.QName("registry.objects.vamsas",
200         "ServiceHandle"));
201     org.apache.axis.description.ElementDesc elemField = new org.apache.axis.
202         description.ElementDesc();
203     elemField.setFieldName("abstractName");
204     elemField.setXmlName(new javax.xml.namespace.QName("", "abstractName"));
205     elemField.setXmlType(new javax.xml.namespace.QName(
206         "http://schemas.xmlsoap.org/soap/encoding/", "string"));
207     typeDesc.addFieldDesc(elemField);
208     elemField = new org.apache.axis.description.ElementDesc();
209     elemField.setFieldName("description");
210     elemField.setXmlName(new javax.xml.namespace.QName("", "description"));
211     elemField.setXmlType(new javax.xml.namespace.QName(
212         "http://schemas.xmlsoap.org/soap/encoding/", "string"));
213     typeDesc.addFieldDesc(elemField);
214     elemField = new org.apache.axis.description.ElementDesc();
215     elemField.setFieldName("endpointURL");
216     elemField.setXmlName(new javax.xml.namespace.QName("", "endpointURL"));
217     elemField.setXmlType(new javax.xml.namespace.QName(
218         "http://schemas.xmlsoap.org/soap/encoding/", "string"));
219     typeDesc.addFieldDesc(elemField);
220     elemField = new org.apache.axis.description.ElementDesc();
221     elemField.setFieldName("name");
222     elemField.setXmlName(new javax.xml.namespace.QName("", "name"));
223     elemField.setXmlType(new javax.xml.namespace.QName(
224         "http://schemas.xmlsoap.org/soap/encoding/", "string"));
225     typeDesc.addFieldDesc(elemField);
226   }
227
228   /**
229    * Return type metadata object
230    */
231   public static org.apache.axis.description.TypeDesc getTypeDesc()
232   {
233     return typeDesc;
234   }
235
236   /**
237    * Get Custom Serializer
238    */
239   public static org.apache.axis.encoding.Serializer getSerializer(
240       java.lang.String mechType,
241       java.lang.Class _javaType,
242       javax.xml.namespace.QName _xmlType)
243   {
244     return
245         new org.apache.axis.encoding.ser.BeanSerializer(
246             _javaType, _xmlType, typeDesc);
247   }
248
249   /**
250    * Get Custom Deserializer
251    */
252   public static org.apache.axis.encoding.Deserializer getDeserializer(
253       java.lang.String mechType,
254       java.lang.Class _javaType,
255       javax.xml.namespace.QName _xmlType)
256   {
257     return
258         new org.apache.axis.encoding.ser.BeanDeserializer(
259             _javaType, _xmlType, typeDesc);
260   }
261
262 }