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