KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > capeclear > www > GlobalWeather_xsd > WeatherReport


1 /**
2  * WeatherReport.java
3  *
4  * This file was auto-generated from WSDL
5  * by the Apache Axis WSDL2Java emitter.
6  */

7
8 package com.capeclear.www.GlobalWeather_xsd;
9
10 import java.io.Serializable JavaDoc;
11 import javax.xml.namespace.QName JavaDoc;
12 import java.util.Calendar JavaDoc;
13
14 public class WeatherReport implements Serializable JavaDoc {
15     private Calendar JavaDoc timestamp;
16     private Station station;
17     private Phenomenon[] phenomena;
18     private Precipitation[] precipitation;
19     private Extreme[] extremes;
20     private Pressure pressure;
21     private Sky sky;
22     private Temperature temperature;
23     private Visibility visibility;
24     private Wind wind;
25
26     public WeatherReport() {
27     }
28
29     public Calendar JavaDoc getTimestamp() {
30         return timestamp;
31     }
32
33     public void setTimestamp(Calendar JavaDoc timestamp) {
34         this.timestamp = timestamp;
35     }
36
37     public Station getStation() {
38         return station;
39     }
40
41     public void setStation(Station station) {
42         this.station = station;
43     }
44
45     public Phenomenon[] getPhenomena() {
46         return phenomena;
47     }
48
49     public void setPhenomena(Phenomenon[] phenomena) {
50         this.phenomena = phenomena;
51     }
52
53     public Precipitation[] getPrecipitation() {
54         return precipitation;
55     }
56
57     public void setPrecipitation(Precipitation[] precipitation) {
58         this.precipitation = precipitation;
59     }
60
61     public Extreme[] getExtremes() {
62         return extremes;
63     }
64
65     public void setExtremes(Extreme[] extremes) {
66         this.extremes = extremes;
67     }
68
69     public Pressure getPressure() {
70         return pressure;
71     }
72
73     public void setPressure(Pressure pressure) {
74         this.pressure = pressure;
75     }
76
77     public Sky getSky() {
78         return sky;
79     }
80
81     public void setSky(Sky sky) {
82         this.sky = sky;
83     }
84
85     public Temperature getTemperature() {
86         return temperature;
87     }
88
89     public void setTemperature(Temperature temperature) {
90         this.temperature = temperature;
91     }
92
93     public Visibility getVisibility() {
94         return visibility;
95     }
96
97     public void setVisibility(Visibility visibility) {
98         this.visibility = visibility;
99     }
100
101     public Wind getWind() {
102         return wind;
103     }
104
105     public void setWind(Wind wind) {
106         this.wind = wind;
107     }
108
109     private java.lang.Object JavaDoc __equalsCalc = null;
110     public synchronized boolean equals(Object JavaDoc obj) {
111         if (!(obj instanceof WeatherReport)) return false;
112         WeatherReport other = (WeatherReport) obj;
113         if (obj == null) return false;
114         if (this == obj) return true;
115         if (__equalsCalc != null) {
116             return (__equalsCalc == obj);
117         }
118         __equalsCalc = obj;
119         boolean _equals;
120         _equals = true &&
121             ((this.timestamp==null && other.getTimestamp()==null) ||
122              (this.timestamp!=null &&
123               this.timestamp.equals(other.getTimestamp()))) &&
124             ((this.station==null && other.getStation()==null) ||
125              (this.station!=null &&
126               this.station.equals(other.getStation()))) &&
127             ((this.phenomena==null && other.getPhenomena()==null) ||
128              (this.phenomena!=null &&
129               java.util.Arrays.equals(this.phenomena, other.getPhenomena()))) &&
130             ((this.precipitation==null && other.getPrecipitation()==null) ||
131              (this.precipitation!=null &&
132               java.util.Arrays.equals(this.precipitation, other.getPrecipitation()))) &&
133             ((this.extremes==null && other.getExtremes()==null) ||
134              (this.extremes!=null &&
135               java.util.Arrays.equals(this.extremes, other.getExtremes()))) &&
136             ((this.pressure==null && other.getPressure()==null) ||
137              (this.pressure!=null &&
138               this.pressure.equals(other.getPressure()))) &&
139             ((this.sky==null && other.getSky()==null) ||
140              (this.sky!=null &&
141               this.sky.equals(other.getSky()))) &&
142             ((this.temperature==null && other.getTemperature()==null) ||
143              (this.temperature!=null &&
144               this.temperature.equals(other.getTemperature()))) &&
145             ((this.visibility==null && other.getVisibility()==null) ||
146              (this.visibility!=null &&
147               this.visibility.equals(other.getVisibility()))) &&
148             ((this.wind==null && other.getWind()==null) ||
149              (this.wind!=null &&
150               this.wind.equals(other.getWind())));
151         __equalsCalc = null;
152         return _equals;
153     }
154
155     private boolean __hashCodeCalc = false;
156     public synchronized int hashCode() {
157         if (__hashCodeCalc) {
158             return 0;
159         }
160         __hashCodeCalc = true;
161         int _hashCode = 1;
162         if (getTimestamp() != null) {
163             _hashCode += getTimestamp().hashCode();
164         }
165         if (getStation() != null) {
166             _hashCode += getStation().hashCode();
167         }
168         if (getPhenomena() != null) {
169             for (int i=0;
170                  i<java.lang.reflect.Array.getLength(getPhenomena());
171                  i++) {
172                 Object JavaDoc obj = java.lang.reflect.Array.get(getPhenomena(), i);
173                 if (obj != null &&
174                     !obj.getClass().isArray()) {
175                     _hashCode += obj.hashCode();
176                 }
177             }
178         }
179         if (getPrecipitation() != null) {
180             for (int i=0;
181                  i<java.lang.reflect.Array.getLength(getPrecipitation());
182                  i++) {
183                 Object JavaDoc obj = java.lang.reflect.Array.get(getPrecipitation(), i);
184                 if (obj != null &&
185                     !obj.getClass().isArray()) {
186                     _hashCode += obj.hashCode();
187                 }
188             }
189         }
190         if (getExtremes() != null) {
191             for (int i=0;
192                  i<java.lang.reflect.Array.getLength(getExtremes());
193                  i++) {
194                 Object JavaDoc obj = java.lang.reflect.Array.get(getExtremes(), i);
195                 if (obj != null &&
196                     !obj.getClass().isArray()) {
197                     _hashCode += obj.hashCode();
198                 }
199             }
200         }
201         if (getPressure() != null) {
202             _hashCode += getPressure().hashCode();
203         }
204         if (getSky() != null) {
205             _hashCode += getSky().hashCode();
206         }
207         if (getTemperature() != null) {
208             _hashCode += getTemperature().hashCode();
209         }
210         if (getVisibility() != null) {
211             _hashCode += getVisibility().hashCode();
212         }
213         if (getWind() != null) {
214             _hashCode += getWind().hashCode();
215         }
216         __hashCodeCalc = false;
217         return _hashCode;
218     }
219
220     // Type metadata
221
private static org.apache.axis.description.TypeDesc typeDesc =
222         new org.apache.axis.description.TypeDesc(WeatherReport.class);
223
224     static {
225         typeDesc.setXmlType(new QName JavaDoc("http://www.capeclear.com/GlobalWeather.xsd", "WeatherReport"));
226         org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
227         elemField.setFieldName("timestamp");
228         elemField.setXmlName(new QName JavaDoc("", "timestamp"));
229         elemField.setXmlType(new QName JavaDoc("http://www.w3.org/2001/XMLSchema", "dateTime"));
230         typeDesc.addFieldDesc(elemField);
231         elemField = new org.apache.axis.description.ElementDesc();
232         elemField.setFieldName("station");
233         elemField.setXmlName(new QName JavaDoc("", "station"));
234         elemField.setXmlType(new QName JavaDoc("http://www.capeclear.com/GlobalWeather.xsd", "Station"));
235         typeDesc.addFieldDesc(elemField);
236         elemField = new org.apache.axis.description.ElementDesc();
237         elemField.setFieldName("phenomena");
238         elemField.setXmlName(new QName JavaDoc("", "phenomena"));
239         elemField.setXmlType(new QName JavaDoc("http://www.capeclear.com/GlobalWeather.xsd", "Phenomenon"));
240         typeDesc.addFieldDesc(elemField);
241         elemField = new org.apache.axis.description.ElementDesc();
242         elemField.setFieldName("precipitation");
243         elemField.setXmlName(new QName JavaDoc("", "precipitation"));
244         elemField.setXmlType(new QName JavaDoc("http://www.capeclear.com/GlobalWeather.xsd", "Precipitation"));
245         typeDesc.addFieldDesc(elemField);
246         elemField = new org.apache.axis.description.ElementDesc();
247         elemField.setFieldName("extremes");
248         elemField.setXmlName(new QName JavaDoc("", "extremes"));
249         elemField.setXmlType(new QName JavaDoc("http://www.capeclear.com/GlobalWeather.xsd", "Extreme"));
250         typeDesc.addFieldDesc(elemField);
251         elemField = new org.apache.axis.description.ElementDesc();
252         elemField.setFieldName("pressure");
253         elemField.setXmlName(new QName JavaDoc("", "pressure"));
254         elemField.setXmlType(new QName JavaDoc("http://www.capeclear.com/GlobalWeather.xsd", "Pressure"));
255         typeDesc.addFieldDesc(elemField);
256         elemField = new org.apache.axis.description.ElementDesc();
257         elemField.setFieldName("sky");
258         elemField.setXmlName(new QName JavaDoc("", "sky"));
259         elemField.setXmlType(new QName JavaDoc("http://www.capeclear.com/GlobalWeather.xsd", "Sky"));
260         typeDesc.addFieldDesc(elemField);
261         elemField = new org.apache.axis.description.ElementDesc();
262         elemField.setFieldName("temperature");
263         elemField.setXmlName(new QName JavaDoc("", "temperature"));
264         elemField.setXmlType(new QName JavaDoc("http://www.capeclear.com/GlobalWeather.xsd", "Temperature"));
265         typeDesc.addFieldDesc(elemField);
266         elemField = new org.apache.axis.description.ElementDesc();
267         elemField.setFieldName("visibility");
268         elemField.setXmlName(new QName JavaDoc("", "visibility"));
269         elemField.setXmlType(new QName JavaDoc("http://www.capeclear.com/GlobalWeather.xsd", "Visibility"));
270         typeDesc.addFieldDesc(elemField);
271         elemField = new org.apache.axis.description.ElementDesc();
272         elemField.setFieldName("wind");
273         elemField.setXmlName(new QName JavaDoc("", "wind"));
274         elemField.setXmlType(new QName JavaDoc("http://www.capeclear.com/GlobalWeather.xsd", "Wind"));
275         typeDesc.addFieldDesc(elemField);
276     }
277
278     /**
279      * Return type metadata object
280      */

281     public static org.apache.axis.description.TypeDesc getTypeDesc() {
282         return typeDesc;
283     }
284
285     /**
286      * Get Custom Serializer
287      */

288     public static org.apache.axis.encoding.Serializer getSerializer(
289            String JavaDoc mechType,
290            Class JavaDoc _javaType,
291            QName JavaDoc _xmlType) {
292         return
293           new org.apache.axis.encoding.ser.BeanSerializer(
294             _javaType, _xmlType, typeDesc);
295     }
296
297     /**
298      * Get Custom Deserializer
299      */

300     public static org.apache.axis.encoding.Deserializer getDeserializer(
301            String JavaDoc mechType,
302            Class JavaDoc _javaType,
303            QName JavaDoc _xmlType) {
304         return
305           new org.apache.axis.encoding.ser.BeanDeserializer(
306             _javaType, _xmlType, typeDesc);
307     }
308
309 }
310
Popular Tags