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