001: /**
002: * ItemDescription.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 ItemDescription implements java.io.Serializable {
009: private oasis.names.tc.wsrp.v1.types.LocalizedString description;
010: private oasis.names.tc.wsrp.v1.types.Extension[] extensions;
011: private java.lang.String itemName; // attribute
012:
013: public ItemDescription() {
014: }
015:
016: public ItemDescription(
017: oasis.names.tc.wsrp.v1.types.LocalizedString description,
018: oasis.names.tc.wsrp.v1.types.Extension[] extensions,
019: java.lang.String itemName) {
020: this .description = description;
021: this .extensions = extensions;
022: this .itemName = itemName;
023: }
024:
025: /**
026: * Gets the description value for this ItemDescription.
027: *
028: * @return description
029: */
030: public oasis.names.tc.wsrp.v1.types.LocalizedString getDescription() {
031: return description;
032: }
033:
034: /**
035: * Sets the description value for this ItemDescription.
036: *
037: * @param description
038: */
039: public void setDescription(
040: oasis.names.tc.wsrp.v1.types.LocalizedString description) {
041: this .description = description;
042: }
043:
044: /**
045: * Gets the extensions value for this ItemDescription.
046: *
047: * @return extensions
048: */
049: public oasis.names.tc.wsrp.v1.types.Extension[] getExtensions() {
050: return extensions;
051: }
052:
053: /**
054: * Sets the extensions value for this ItemDescription.
055: *
056: * @param extensions
057: */
058: public void setExtensions(
059: oasis.names.tc.wsrp.v1.types.Extension[] extensions) {
060: this .extensions = extensions;
061: }
062:
063: public oasis.names.tc.wsrp.v1.types.Extension getExtensions(int i) {
064: return this .extensions[i];
065: }
066:
067: public void setExtensions(int i,
068: oasis.names.tc.wsrp.v1.types.Extension _value) {
069: this .extensions[i] = _value;
070: }
071:
072: /**
073: * Gets the itemName value for this ItemDescription.
074: *
075: * @return itemName
076: */
077: public java.lang.String getItemName() {
078: return itemName;
079: }
080:
081: /**
082: * Sets the itemName value for this ItemDescription.
083: *
084: * @param itemName
085: */
086: public void setItemName(java.lang.String itemName) {
087: this .itemName = itemName;
088: }
089:
090: private java.lang.Object __equalsCalc = null;
091:
092: public synchronized boolean equals(java.lang.Object obj) {
093: if (!(obj instanceof ItemDescription))
094: return false;
095: ItemDescription other = (ItemDescription) obj;
096: if (obj == null)
097: return false;
098: if (this == obj)
099: return true;
100: if (__equalsCalc != null) {
101: return (__equalsCalc == obj);
102: }
103: __equalsCalc = obj;
104: boolean _equals;
105: _equals = true
106: && ((this .description == null && other.getDescription() == null) || (this .description != null && this .description
107: .equals(other.getDescription())))
108: && ((this .extensions == null && other.getExtensions() == null) || (this .extensions != null && java.util.Arrays
109: .equals(this .extensions, other.getExtensions())))
110: && ((this .itemName == null && other.getItemName() == null) || (this .itemName != null && this .itemName
111: .equals(other.getItemName())));
112: __equalsCalc = null;
113: return _equals;
114: }
115:
116: private boolean __hashCodeCalc = false;
117:
118: public synchronized int hashCode() {
119: if (__hashCodeCalc) {
120: return 0;
121: }
122: __hashCodeCalc = true;
123: int _hashCode = 1;
124: if (getDescription() != null) {
125: _hashCode += getDescription().hashCode();
126: }
127: if (getExtensions() != null) {
128: for (int i = 0; i < java.lang.reflect.Array
129: .getLength(getExtensions()); i++) {
130: java.lang.Object obj = java.lang.reflect.Array.get(
131: getExtensions(), i);
132: if (obj != null && !obj.getClass().isArray()) {
133: _hashCode += obj.hashCode();
134: }
135: }
136: }
137: if (getItemName() != null) {
138: _hashCode += getItemName().hashCode();
139: }
140: __hashCodeCalc = false;
141: return _hashCode;
142: }
143:
144: // Type metadata
145: private static org.apache.axis.description.TypeDesc typeDesc = new org.apache.axis.description.TypeDesc(
146: ItemDescription.class, true);
147:
148: static {
149: typeDesc.setXmlType(new javax.xml.namespace.QName(
150: "urn:oasis:names:tc:wsrp:v1:types", "ItemDescription"));
151: org.apache.axis.description.AttributeDesc attrField = new org.apache.axis.description.AttributeDesc();
152: attrField.setFieldName("itemName");
153: attrField.setXmlName(new javax.xml.namespace.QName("",
154: "itemName"));
155: attrField.setXmlType(new javax.xml.namespace.QName(
156: "http://www.w3.org/2001/XMLSchema", "string"));
157: typeDesc.addFieldDesc(attrField);
158: org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
159: elemField.setFieldName("description");
160: elemField.setXmlName(new javax.xml.namespace.QName(
161: "urn:oasis:names:tc:wsrp:v1:types", "description"));
162: elemField.setXmlType(new javax.xml.namespace.QName(
163: "urn:oasis:names:tc:wsrp:v1:types", "LocalizedString"));
164: typeDesc.addFieldDesc(elemField);
165: elemField = new org.apache.axis.description.ElementDesc();
166: elemField.setFieldName("extensions");
167: elemField.setXmlName(new javax.xml.namespace.QName(
168: "urn:oasis:names:tc:wsrp:v1:types", "extensions"));
169: elemField.setXmlType(new javax.xml.namespace.QName(
170: "urn:oasis:names:tc:wsrp:v1:types", "Extension"));
171: elemField.setMinOccurs(0);
172: typeDesc.addFieldDesc(elemField);
173: }
174:
175: /**
176: * Return type metadata object
177: */
178: public static org.apache.axis.description.TypeDesc getTypeDesc() {
179: return typeDesc;
180: }
181:
182: /**
183: * Get Custom Serializer
184: */
185: public static org.apache.axis.encoding.Serializer getSerializer(
186: java.lang.String mechType, java.lang.Class _javaType,
187: javax.xml.namespace.QName _xmlType) {
188: return new org.apache.axis.encoding.ser.BeanSerializer(
189: _javaType, _xmlType, typeDesc);
190: }
191:
192: /**
193: * Get Custom Deserializer
194: */
195: public static org.apache.axis.encoding.Deserializer getDeserializer(
196: java.lang.String mechType, java.lang.Class _javaType,
197: javax.xml.namespace.QName _xmlType) {
198: return new org.apache.axis.encoding.ser.BeanDeserializer(
199: _javaType, _xmlType, typeDesc);
200: }
201:
202: }
|