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