1
7
8 package oasis.names.tc.wsrp.v1.types;
9
10 public class Resource implements java.io.Serializable {
11 private oasis.names.tc.wsrp.v1.types.ResourceValue[] values;
12 private oasis.names.tc.wsrp.v1.types.Extension[] extensions;
13 private java.lang.String resourceName;
15 public Resource() {
16 }
17
18 public Resource(
19 oasis.names.tc.wsrp.v1.types.Extension[] extensions,
20 java.lang.String resourceName,
21 oasis.names.tc.wsrp.v1.types.ResourceValue[] values) {
22 this.values = values;
23 this.extensions = extensions;
24 this.resourceName = resourceName;
25 }
26
27
28
33 public oasis.names.tc.wsrp.v1.types.ResourceValue[] getValues() {
34 return values;
35 }
36
37
38
43 public void setValues(oasis.names.tc.wsrp.v1.types.ResourceValue[] values) {
44 this.values = values;
45 }
46
47 public oasis.names.tc.wsrp.v1.types.ResourceValue getValues(int i) {
48 return this.values[i];
49 }
50
51 public void setValues(int i, oasis.names.tc.wsrp.v1.types.ResourceValue _value) {
52 this.values[i] = _value;
53 }
54
55
56
61 public oasis.names.tc.wsrp.v1.types.Extension[] getExtensions() {
62 return extensions;
63 }
64
65
66
71 public void setExtensions(oasis.names.tc.wsrp.v1.types.Extension[] extensions) {
72 this.extensions = extensions;
73 }
74
75 public oasis.names.tc.wsrp.v1.types.Extension getExtensions(int i) {
76 return this.extensions[i];
77 }
78
79 public void setExtensions(int i, oasis.names.tc.wsrp.v1.types.Extension _value) {
80 this.extensions[i] = _value;
81 }
82
83
84
89 public java.lang.String getResourceName() {
90 return resourceName;
91 }
92
93
94
99 public void setResourceName(java.lang.String resourceName) {
100 this.resourceName = resourceName;
101 }
102
103 private java.lang.Object __equalsCalc = null;
104 public synchronized boolean equals(java.lang.Object obj) {
105 if (!(obj instanceof Resource)) return false;
106 Resource other = (Resource) 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.values==null && other.getValues()==null) ||
116 (this.values!=null &&
117 java.util.Arrays.equals(this.values, other.getValues()))) &&
118 ((this.extensions==null && other.getExtensions()==null) ||
119 (this.extensions!=null &&
120 java.util.Arrays.equals(this.extensions, other.getExtensions()))) &&
121 ((this.resourceName==null && other.getResourceName()==null) ||
122 (this.resourceName!=null &&
123 this.resourceName.equals(other.getResourceName())));
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 (getValues() != null) {
136 for (int i=0;
137 i<java.lang.reflect.Array.getLength(getValues());
138 i++) {
139 java.lang.Object obj = java.lang.reflect.Array.get(getValues(), i);
140 if (obj != null &&
141 !obj.getClass().isArray()) {
142 _hashCode += obj.hashCode();
143 }
144 }
145 }
146 if (getExtensions() != null) {
147 for (int i=0;
148 i<java.lang.reflect.Array.getLength(getExtensions());
149 i++) {
150 java.lang.Object obj = java.lang.reflect.Array.get(getExtensions(), i);
151 if (obj != null &&
152 !obj.getClass().isArray()) {
153 _hashCode += obj.hashCode();
154 }
155 }
156 }
157 if (getResourceName() != null) {
158 _hashCode += getResourceName().hashCode();
159 }
160 __hashCodeCalc = false;
161 return _hashCode;
162 }
163
164 private static org.apache.axis.description.TypeDesc typeDesc =
166 new org.apache.axis.description.TypeDesc(Resource.class, true);
167
168 static {
169 typeDesc.setXmlType(new javax.xml.namespace.QName("urn:oasis:names:tc:wsrp:v1:types", "Resource"));
170 org.apache.axis.description.AttributeDesc attrField = new org.apache.axis.description.AttributeDesc();
171 attrField.setFieldName("resourceName");
172 attrField.setXmlName(new javax.xml.namespace.QName("", "resourceName"));
173 attrField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
174 typeDesc.addFieldDesc(attrField);
175 org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
176 elemField.setFieldName("values");
177 elemField.setXmlName(new javax.xml.namespace.QName("urn:oasis:names:tc:wsrp:v1:types", "values"));
178 elemField.setXmlType(new javax.xml.namespace.QName("urn:oasis:names:tc:wsrp:v1:types", "ResourceValue"));
179 typeDesc.addFieldDesc(elemField);
180 elemField = new org.apache.axis.description.ElementDesc();
181 elemField.setFieldName("extensions");
182 elemField.setXmlName(new javax.xml.namespace.QName("urn:oasis:names:tc:wsrp:v1:types", "extensions"));
183 elemField.setXmlType(new javax.xml.namespace.QName("urn:oasis:names:tc:wsrp:v1:types", "Extension"));
184 elemField.setMinOccurs(0);
185 typeDesc.addFieldDesc(elemField);
186 }
187
188
191 public static org.apache.axis.description.TypeDesc getTypeDesc() {
192 return typeDesc;
193 }
194
195
198 public static org.apache.axis.encoding.Serializer getSerializer(
199 java.lang.String mechType,
200 java.lang.Class _javaType,
201 javax.xml.namespace.QName _xmlType) {
202 return
203 new org.apache.axis.encoding.ser.BeanSerializer(
204 _javaType, _xmlType, typeDesc);
205 }
206
207
210 public static org.apache.axis.encoding.Deserializer getDeserializer(
211 java.lang.String mechType,
212 java.lang.Class _javaType,
213 javax.xml.namespace.QName _xmlType) {
214 return
215 new org.apache.axis.encoding.ser.BeanDeserializer(
216 _javaType, _xmlType, typeDesc);
217 }
218
219 }
220