001: /**
002: * UploadContext.java
003: *
004: * This file was auto-generated from WSDL
005: * by the Apache Axis 1.2RC3 Feb 28, 2005 (10:15:14 EST) WSDL2Java emitter.
006: */package oasis.names.tc.wsrp.v1.types;
007:
008: public class UploadContext implements java.io.Serializable {
009: private java.lang.String mimeType;
010: private byte[] uploadData;
011: private oasis.names.tc.wsrp.v1.types.NamedString[] mimeAttributes;
012: private oasis.names.tc.wsrp.v1.types.Extension[] extensions;
013:
014: public UploadContext() {
015: }
016:
017: public UploadContext(
018: oasis.names.tc.wsrp.v1.types.Extension[] extensions,
019: oasis.names.tc.wsrp.v1.types.NamedString[] mimeAttributes,
020: java.lang.String mimeType, byte[] uploadData) {
021: this .mimeType = mimeType;
022: this .uploadData = uploadData;
023: this .mimeAttributes = mimeAttributes;
024: this .extensions = extensions;
025: }
026:
027: /**
028: * Gets the mimeType value for this UploadContext.
029: *
030: * @return mimeType
031: */
032: public java.lang.String getMimeType() {
033: return mimeType;
034: }
035:
036: /**
037: * Sets the mimeType value for this UploadContext.
038: *
039: * @param mimeType
040: */
041: public void setMimeType(java.lang.String mimeType) {
042: this .mimeType = mimeType;
043: }
044:
045: /**
046: * Gets the uploadData value for this UploadContext.
047: *
048: * @return uploadData
049: */
050: public byte[] getUploadData() {
051: return uploadData;
052: }
053:
054: /**
055: * Sets the uploadData value for this UploadContext.
056: *
057: * @param uploadData
058: */
059: public void setUploadData(byte[] uploadData) {
060: this .uploadData = uploadData;
061: }
062:
063: /**
064: * Gets the mimeAttributes value for this UploadContext.
065: *
066: * @return mimeAttributes
067: */
068: public oasis.names.tc.wsrp.v1.types.NamedString[] getMimeAttributes() {
069: return mimeAttributes;
070: }
071:
072: /**
073: * Sets the mimeAttributes value for this UploadContext.
074: *
075: * @param mimeAttributes
076: */
077: public void setMimeAttributes(
078: oasis.names.tc.wsrp.v1.types.NamedString[] mimeAttributes) {
079: this .mimeAttributes = mimeAttributes;
080: }
081:
082: public oasis.names.tc.wsrp.v1.types.NamedString getMimeAttributes(
083: int i) {
084: return this .mimeAttributes[i];
085: }
086:
087: public void setMimeAttributes(int i,
088: oasis.names.tc.wsrp.v1.types.NamedString _value) {
089: this .mimeAttributes[i] = _value;
090: }
091:
092: /**
093: * Gets the extensions value for this UploadContext.
094: *
095: * @return extensions
096: */
097: public oasis.names.tc.wsrp.v1.types.Extension[] getExtensions() {
098: return extensions;
099: }
100:
101: /**
102: * Sets the extensions value for this UploadContext.
103: *
104: * @param extensions
105: */
106: public void setExtensions(
107: oasis.names.tc.wsrp.v1.types.Extension[] extensions) {
108: this .extensions = extensions;
109: }
110:
111: public oasis.names.tc.wsrp.v1.types.Extension getExtensions(int i) {
112: return this .extensions[i];
113: }
114:
115: public void setExtensions(int i,
116: oasis.names.tc.wsrp.v1.types.Extension _value) {
117: this .extensions[i] = _value;
118: }
119:
120: private java.lang.Object __equalsCalc = null;
121:
122: public synchronized boolean equals(java.lang.Object obj) {
123: if (!(obj instanceof UploadContext))
124: return false;
125: UploadContext other = (UploadContext) obj;
126: if (obj == null)
127: return false;
128: if (this == obj)
129: return true;
130: if (__equalsCalc != null) {
131: return (__equalsCalc == obj);
132: }
133: __equalsCalc = obj;
134: boolean _equals;
135: _equals = true
136: && ((this .mimeType == null && other.getMimeType() == null) || (this .mimeType != null && this .mimeType
137: .equals(other.getMimeType())))
138: && ((this .uploadData == null && other.getUploadData() == null) || (this .uploadData != null && java.util.Arrays
139: .equals(this .uploadData, other.getUploadData())))
140: && ((this .mimeAttributes == null && other
141: .getMimeAttributes() == null) || (this .mimeAttributes != null && java.util.Arrays
142: .equals(this .mimeAttributes, other
143: .getMimeAttributes())))
144: && ((this .extensions == null && other.getExtensions() == null) || (this .extensions != null && java.util.Arrays
145: .equals(this .extensions, other.getExtensions())));
146: __equalsCalc = null;
147: return _equals;
148: }
149:
150: private boolean __hashCodeCalc = false;
151:
152: public synchronized int hashCode() {
153: if (__hashCodeCalc) {
154: return 0;
155: }
156: __hashCodeCalc = true;
157: int _hashCode = 1;
158: if (getMimeType() != null) {
159: _hashCode += getMimeType().hashCode();
160: }
161: if (getUploadData() != null) {
162: for (int i = 0; i < java.lang.reflect.Array
163: .getLength(getUploadData()); i++) {
164: java.lang.Object obj = java.lang.reflect.Array.get(
165: getUploadData(), i);
166: if (obj != null && !obj.getClass().isArray()) {
167: _hashCode += obj.hashCode();
168: }
169: }
170: }
171: if (getMimeAttributes() != null) {
172: for (int i = 0; i < java.lang.reflect.Array
173: .getLength(getMimeAttributes()); i++) {
174: java.lang.Object obj = java.lang.reflect.Array.get(
175: getMimeAttributes(), i);
176: if (obj != null && !obj.getClass().isArray()) {
177: _hashCode += obj.hashCode();
178: }
179: }
180: }
181: if (getExtensions() != null) {
182: for (int i = 0; i < java.lang.reflect.Array
183: .getLength(getExtensions()); i++) {
184: java.lang.Object obj = java.lang.reflect.Array.get(
185: getExtensions(), i);
186: if (obj != null && !obj.getClass().isArray()) {
187: _hashCode += obj.hashCode();
188: }
189: }
190: }
191: __hashCodeCalc = false;
192: return _hashCode;
193: }
194:
195: // Type metadata
196: private static org.apache.axis.description.TypeDesc typeDesc = new org.apache.axis.description.TypeDesc(
197: UploadContext.class, true);
198:
199: static {
200: typeDesc.setXmlType(new javax.xml.namespace.QName(
201: "urn:oasis:names:tc:wsrp:v1:types", "UploadContext"));
202: org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
203: elemField.setFieldName("mimeType");
204: elemField.setXmlName(new javax.xml.namespace.QName(
205: "urn:oasis:names:tc:wsrp:v1:types", "mimeType"));
206: elemField.setXmlType(new javax.xml.namespace.QName(
207: "http://www.w3.org/2001/XMLSchema", "string"));
208: typeDesc.addFieldDesc(elemField);
209: elemField = new org.apache.axis.description.ElementDesc();
210: elemField.setFieldName("uploadData");
211: elemField.setXmlName(new javax.xml.namespace.QName(
212: "urn:oasis:names:tc:wsrp:v1:types", "uploadData"));
213: elemField.setXmlType(new javax.xml.namespace.QName(
214: "http://www.w3.org/2001/XMLSchema", "base64Binary"));
215: typeDesc.addFieldDesc(elemField);
216: elemField = new org.apache.axis.description.ElementDesc();
217: elemField.setFieldName("mimeAttributes");
218: elemField.setXmlName(new javax.xml.namespace.QName(
219: "urn:oasis:names:tc:wsrp:v1:types", "mimeAttributes"));
220: elemField.setXmlType(new javax.xml.namespace.QName(
221: "urn:oasis:names:tc:wsrp:v1:types", "NamedString"));
222: elemField.setMinOccurs(0);
223: typeDesc.addFieldDesc(elemField);
224: elemField = new org.apache.axis.description.ElementDesc();
225: elemField.setFieldName("extensions");
226: elemField.setXmlName(new javax.xml.namespace.QName(
227: "urn:oasis:names:tc:wsrp:v1:types", "extensions"));
228: elemField.setXmlType(new javax.xml.namespace.QName(
229: "urn:oasis:names:tc:wsrp:v1:types", "Extension"));
230: elemField.setMinOccurs(0);
231: typeDesc.addFieldDesc(elemField);
232: }
233:
234: /**
235: * Return type metadata object
236: */
237: public static org.apache.axis.description.TypeDesc getTypeDesc() {
238: return typeDesc;
239: }
240:
241: /**
242: * Get Custom Serializer
243: */
244: public static org.apache.axis.encoding.Serializer getSerializer(
245: java.lang.String mechType, java.lang.Class _javaType,
246: javax.xml.namespace.QName _xmlType) {
247: return new org.apache.axis.encoding.ser.BeanSerializer(
248: _javaType, _xmlType, typeDesc);
249: }
250:
251: /**
252: * Get Custom Deserializer
253: */
254: public static org.apache.axis.encoding.Deserializer getDeserializer(
255: java.lang.String mechType, java.lang.Class _javaType,
256: javax.xml.namespace.QName _xmlType) {
257: return new org.apache.axis.encoding.ser.BeanDeserializer(
258: _javaType, _xmlType, typeDesc);
259: }
260:
261: }
|