1   /**
2    * PersonName.java
3    *
4    * This file was auto-generated from WSDL
5    * by the Apache Axis 1.2RC3 Feb 28, 2005 (10:15:14 EST) WSDL2Java emitter.
6    */
7   
8   package oasis.names.tc.wsrp.v1.types;
9   
10  public class PersonName  implements java.io.Serializable {
11      private java.lang.String prefix;
12      private java.lang.String given;
13      private java.lang.String family;
14      private java.lang.String middle;
15      private java.lang.String suffix;
16      private java.lang.String nickname;
17      private oasis.names.tc.wsrp.v1.types.Extension[] extensions;
18  
19      public PersonName() {
20      }
21  
22      public PersonName(
23             oasis.names.tc.wsrp.v1.types.Extension[] extensions,
24             java.lang.String family,
25             java.lang.String given,
26             java.lang.String middle,
27             java.lang.String nickname,
28             java.lang.String prefix,
29             java.lang.String suffix) {
30             this.prefix = prefix;
31             this.given = given;
32             this.family = family;
33             this.middle = middle;
34             this.suffix = suffix;
35             this.nickname = nickname;
36             this.extensions = extensions;
37      }
38  
39  
40      /**
41       * Gets the prefix value for this PersonName.
42       * 
43       * @return prefix
44       */
45      public java.lang.String getPrefix() {
46          return prefix;
47      }
48  
49  
50      /**
51       * Sets the prefix value for this PersonName.
52       * 
53       * @param prefix
54       */
55      public void setPrefix(java.lang.String prefix) {
56          this.prefix = prefix;
57      }
58  
59  
60      /**
61       * Gets the given value for this PersonName.
62       * 
63       * @return given
64       */
65      public java.lang.String getGiven() {
66          return given;
67      }
68  
69  
70      /**
71       * Sets the given value for this PersonName.
72       * 
73       * @param given
74       */
75      public void setGiven(java.lang.String given) {
76          this.given = given;
77      }
78  
79  
80      /**
81       * Gets the family value for this PersonName.
82       * 
83       * @return family
84       */
85      public java.lang.String getFamily() {
86          return family;
87      }
88  
89  
90      /**
91       * Sets the family value for this PersonName.
92       * 
93       * @param family
94       */
95      public void setFamily(java.lang.String family) {
96          this.family = family;
97      }
98  
99  
100     /**
101      * Gets the middle value for this PersonName.
102      * 
103      * @return middle
104      */
105     public java.lang.String getMiddle() {
106         return middle;
107     }
108 
109 
110     /**
111      * Sets the middle value for this PersonName.
112      * 
113      * @param middle
114      */
115     public void setMiddle(java.lang.String middle) {
116         this.middle = middle;
117     }
118 
119 
120     /**
121      * Gets the suffix value for this PersonName.
122      * 
123      * @return suffix
124      */
125     public java.lang.String getSuffix() {
126         return suffix;
127     }
128 
129 
130     /**
131      * Sets the suffix value for this PersonName.
132      * 
133      * @param suffix
134      */
135     public void setSuffix(java.lang.String suffix) {
136         this.suffix = suffix;
137     }
138 
139 
140     /**
141      * Gets the nickname value for this PersonName.
142      * 
143      * @return nickname
144      */
145     public java.lang.String getNickname() {
146         return nickname;
147     }
148 
149 
150     /**
151      * Sets the nickname value for this PersonName.
152      * 
153      * @param nickname
154      */
155     public void setNickname(java.lang.String nickname) {
156         this.nickname = nickname;
157     }
158 
159 
160     /**
161      * Gets the extensions value for this PersonName.
162      * 
163      * @return extensions
164      */
165     public oasis.names.tc.wsrp.v1.types.Extension[] getExtensions() {
166         return extensions;
167     }
168 
169 
170     /**
171      * Sets the extensions value for this PersonName.
172      * 
173      * @param extensions
174      */
175     public void setExtensions(oasis.names.tc.wsrp.v1.types.Extension[] extensions) {
176         this.extensions = extensions;
177     }
178 
179     public oasis.names.tc.wsrp.v1.types.Extension getExtensions(int i) {
180         return this.extensions[i];
181     }
182 
183     public void setExtensions(int i, oasis.names.tc.wsrp.v1.types.Extension _value) {
184         this.extensions[i] = _value;
185     }
186 
187     private java.lang.Object __equalsCalc = null;
188     public synchronized boolean equals(java.lang.Object obj) {
189         if (!(obj instanceof PersonName)) return false;
190         PersonName other = (PersonName) obj;
191         if (obj == null) return false;
192         if (this == obj) return true;
193         if (__equalsCalc != null) {
194             return (__equalsCalc == obj);
195         }
196         __equalsCalc = obj;
197         boolean _equals;
198         _equals = true && 
199             ((this.prefix==null && other.getPrefix()==null) || 
200              (this.prefix!=null &&
201               this.prefix.equals(other.getPrefix()))) &&
202             ((this.given==null && other.getGiven()==null) || 
203              (this.given!=null &&
204               this.given.equals(other.getGiven()))) &&
205             ((this.family==null && other.getFamily()==null) || 
206              (this.family!=null &&
207               this.family.equals(other.getFamily()))) &&
208             ((this.middle==null && other.getMiddle()==null) || 
209              (this.middle!=null &&
210               this.middle.equals(other.getMiddle()))) &&
211             ((this.suffix==null && other.getSuffix()==null) || 
212              (this.suffix!=null &&
213               this.suffix.equals(other.getSuffix()))) &&
214             ((this.nickname==null && other.getNickname()==null) || 
215              (this.nickname!=null &&
216               this.nickname.equals(other.getNickname()))) &&
217             ((this.extensions==null && other.getExtensions()==null) || 
218              (this.extensions!=null &&
219               java.util.Arrays.equals(this.extensions, other.getExtensions())));
220         __equalsCalc = null;
221         return _equals;
222     }
223 
224     private boolean __hashCodeCalc = false;
225     public synchronized int hashCode() {
226         if (__hashCodeCalc) {
227             return 0;
228         }
229         __hashCodeCalc = true;
230         int _hashCode = 1;
231         if (getPrefix() != null) {
232             _hashCode += getPrefix().hashCode();
233         }
234         if (getGiven() != null) {
235             _hashCode += getGiven().hashCode();
236         }
237         if (getFamily() != null) {
238             _hashCode += getFamily().hashCode();
239         }
240         if (getMiddle() != null) {
241             _hashCode += getMiddle().hashCode();
242         }
243         if (getSuffix() != null) {
244             _hashCode += getSuffix().hashCode();
245         }
246         if (getNickname() != null) {
247             _hashCode += getNickname().hashCode();
248         }
249         if (getExtensions() != null) {
250             for (int i=0;
251                  i<java.lang.reflect.Array.getLength(getExtensions());
252                  i++) {
253                 java.lang.Object obj = java.lang.reflect.Array.get(getExtensions(), i);
254                 if (obj != null &&
255                     !obj.getClass().isArray()) {
256                     _hashCode += obj.hashCode();
257                 }
258             }
259         }
260         __hashCodeCalc = false;
261         return _hashCode;
262     }
263 
264     // Type metadata
265     private static org.apache.axis.description.TypeDesc typeDesc =
266         new org.apache.axis.description.TypeDesc(PersonName.class, true);
267 
268     static {
269         typeDesc.setXmlType(new javax.xml.namespace.QName("urn:oasis:names:tc:wsrp:v1:types", "PersonName"));
270         org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
271         elemField.setFieldName("prefix");
272         elemField.setXmlName(new javax.xml.namespace.QName("urn:oasis:names:tc:wsrp:v1:types", "prefix"));
273         elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
274         elemField.setMinOccurs(0);
275         typeDesc.addFieldDesc(elemField);
276         elemField = new org.apache.axis.description.ElementDesc();
277         elemField.setFieldName("given");
278         elemField.setXmlName(new javax.xml.namespace.QName("urn:oasis:names:tc:wsrp:v1:types", "given"));
279         elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
280         elemField.setMinOccurs(0);
281         typeDesc.addFieldDesc(elemField);
282         elemField = new org.apache.axis.description.ElementDesc();
283         elemField.setFieldName("family");
284         elemField.setXmlName(new javax.xml.namespace.QName("urn:oasis:names:tc:wsrp:v1:types", "family"));
285         elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
286         elemField.setMinOccurs(0);
287         typeDesc.addFieldDesc(elemField);
288         elemField = new org.apache.axis.description.ElementDesc();
289         elemField.setFieldName("middle");
290         elemField.setXmlName(new javax.xml.namespace.QName("urn:oasis:names:tc:wsrp:v1:types", "middle"));
291         elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
292         elemField.setMinOccurs(0);
293         typeDesc.addFieldDesc(elemField);
294         elemField = new org.apache.axis.description.ElementDesc();
295         elemField.setFieldName("suffix");
296         elemField.setXmlName(new javax.xml.namespace.QName("urn:oasis:names:tc:wsrp:v1:types", "suffix"));
297         elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
298         elemField.setMinOccurs(0);
299         typeDesc.addFieldDesc(elemField);
300         elemField = new org.apache.axis.description.ElementDesc();
301         elemField.setFieldName("nickname");
302         elemField.setXmlName(new javax.xml.namespace.QName("urn:oasis:names:tc:wsrp:v1:types", "nickname"));
303         elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
304         elemField.setMinOccurs(0);
305         typeDesc.addFieldDesc(elemField);
306         elemField = new org.apache.axis.description.ElementDesc();
307         elemField.setFieldName("extensions");
308         elemField.setXmlName(new javax.xml.namespace.QName("urn:oasis:names:tc:wsrp:v1:types", "extensions"));
309         elemField.setXmlType(new javax.xml.namespace.QName("urn:oasis:names:tc:wsrp:v1:types", "Extension"));
310         elemField.setMinOccurs(0);
311         typeDesc.addFieldDesc(elemField);
312     }
313 
314     /**
315      * Return type metadata object
316      */
317     public static org.apache.axis.description.TypeDesc getTypeDesc() {
318         return typeDesc;
319     }
320 
321     /**
322      * Get Custom Serializer
323      */
324     public static org.apache.axis.encoding.Serializer getSerializer(
325            java.lang.String mechType, 
326            java.lang.Class _javaType,  
327            javax.xml.namespace.QName _xmlType) {
328         return 
329           new  org.apache.axis.encoding.ser.BeanSerializer(
330             _javaType, _xmlType, typeDesc);
331     }
332 
333     /**
334      * Get Custom Deserializer
335      */
336     public static org.apache.axis.encoding.Deserializer getDeserializer(
337            java.lang.String mechType, 
338            java.lang.Class _javaType,  
339            javax.xml.namespace.QName _xmlType) {
340         return 
341           new  org.apache.axis.encoding.ser.BeanDeserializer(
342             _javaType, _xmlType, typeDesc);
343     }
344 
345 }
346