applied copyright 2008
[jalview.git] / src / ext / vamsas / ServiceHandles.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 ServiceHandles
22     implements java.io.Serializable
23 {
24   private ext.vamsas.ServiceHandle[] services;
25
26   public ServiceHandles()
27   {
28   }
29
30   public ServiceHandles(
31       ext.vamsas.ServiceHandle[] services)
32   {
33     this.services = services;
34   }
35
36   /**
37    * Gets the services value for this ServiceHandles.
38    *
39    * @return services
40    */
41   public ext.vamsas.ServiceHandle[] getServices()
42   {
43     return services;
44   }
45
46   /**
47    * Sets the services value for this ServiceHandles.
48    *
49    * @param services
50    */
51   public void setServices(ext.vamsas.ServiceHandle[] services)
52   {
53     this.services = services;
54   }
55
56   private java.lang.Object __equalsCalc = null;
57   public synchronized boolean equals(java.lang.Object obj)
58   {
59     if (! (obj instanceof ServiceHandles))
60     {
61       return false;
62     }
63     ServiceHandles other = (ServiceHandles) obj;
64     if (obj == null)
65     {
66       return false;
67     }
68     if (this == obj)
69     {
70       return true;
71     }
72     if (__equalsCalc != null)
73     {
74       return (__equalsCalc == obj);
75     }
76     __equalsCalc = obj;
77     boolean _equals;
78     _equals = true &&
79         ( (this.services == null && other.getServices() == null) ||
80          (this.services != null &&
81           java.util.Arrays.equals(this.services, other.getServices())));
82     __equalsCalc = null;
83     return _equals;
84   }
85
86   private boolean __hashCodeCalc = false;
87   public synchronized int hashCode()
88   {
89     if (__hashCodeCalc)
90     {
91       return 0;
92     }
93     __hashCodeCalc = true;
94     int _hashCode = 1;
95     if (getServices() != null)
96     {
97       for (int i = 0;
98            i < java.lang.reflect.Array.getLength(getServices());
99            i++)
100       {
101         java.lang.Object obj = java.lang.reflect.Array.get(getServices(), i);
102         if (obj != null &&
103             !obj.getClass().isArray())
104         {
105           _hashCode += obj.hashCode();
106         }
107       }
108     }
109     __hashCodeCalc = false;
110     return _hashCode;
111   }
112
113   // Type metadata
114   private static org.apache.axis.description.TypeDesc typeDesc =
115       new org.apache.axis.description.TypeDesc(ServiceHandles.class, true);
116
117   static
118   {
119     typeDesc.setXmlType(new javax.xml.namespace.QName("registry.objects.vamsas",
120         "ServiceHandles"));
121     org.apache.axis.description.ElementDesc elemField = new org.apache.axis.
122         description.ElementDesc();
123     elemField.setFieldName("services");
124     elemField.setXmlName(new javax.xml.namespace.QName("", "services"));
125     elemField.setXmlType(new javax.xml.namespace.QName(
126         "registry.objects.vamsas", "ServiceHandle"));
127     typeDesc.addFieldDesc(elemField);
128   }
129
130   /**
131    * Return type metadata object
132    */
133   public static org.apache.axis.description.TypeDesc getTypeDesc()
134   {
135     return typeDesc;
136   }
137
138   /**
139    * Get Custom Serializer
140    */
141   public static org.apache.axis.encoding.Serializer getSerializer(
142       java.lang.String mechType,
143       java.lang.Class _javaType,
144       javax.xml.namespace.QName _xmlType)
145   {
146     return
147         new org.apache.axis.encoding.ser.BeanSerializer(
148             _javaType, _xmlType, typeDesc);
149   }
150
151   /**
152    * Get Custom Deserializer
153    */
154   public static org.apache.axis.encoding.Deserializer getDeserializer(
155       java.lang.String mechType,
156       java.lang.Class _javaType,
157       javax.xml.namespace.QName _xmlType)
158   {
159     return
160         new org.apache.axis.encoding.ser.BeanDeserializer(
161             _javaType, _xmlType, typeDesc);
162   }
163
164 }