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