KickJava   Java API By Example, From Geeks To Geeks.

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


1 /**
2  * Direction.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
13 public class Direction implements Serializable JavaDoc {
14     private DirectionCompass compass;
15     private int degrees;
16     private String JavaDoc string;
17
18     public Direction() {
19     }
20
21     public DirectionCompass getCompass() {
22         return compass;
23     }
24
25     public void setCompass(DirectionCompass compass) {
26         this.compass = compass;
27     }
28
29     public int getDegrees() {
30         return degrees;
31     }
32
33     public void setDegrees(int degrees) {
34         this.degrees = degrees;
35     }
36
37     public String JavaDoc getString() {
38         return string;
39     }
40
41     public void setString(String JavaDoc string) {
42         this.string = string;
43     }
44
45     private Object JavaDoc __equalsCalc = null;
46     public synchronized boolean equals(Object JavaDoc obj) {
47         if (!(obj instanceof Direction)) return false;
48         Direction other = (Direction) obj;
49         if (obj == null) return false;
50         if (this == obj) return true;
51         if (__equalsCalc != null) {
52             return (__equalsCalc == obj);
53         }
54         __equalsCalc = obj;
55         boolean _equals;
56         _equals = true &&
57             ((this.compass==null && other.getCompass()==null) ||
58              (this.compass!=null &&
59               this.compass.equals(other.getCompass()))) &&
60             this.degrees == other.getDegrees() &&
61             ((this.string==null && other.getString()==null) ||
62              (this.string!=null &&
63               this.string.equals(other.getString())));
64         __equalsCalc = null;
65         return _equals;
66     }
67
68     private boolean __hashCodeCalc = false;
69     public synchronized int hashCode() {
70         if (__hashCodeCalc) {
71             return 0;
72         }
73         __hashCodeCalc = true;
74         int _hashCode = 1;
75         if (getCompass() != null) {
76             _hashCode += getCompass().hashCode();
77         }
78         _hashCode += getDegrees();
79         if (getString() != null) {
80             _hashCode += getString().hashCode();
81         }
82         __hashCodeCalc = false;
83         return _hashCode;
84     }
85
86     // Type metadata
87
private static org.apache.axis.description.TypeDesc typeDesc =
88         new org.apache.axis.description.TypeDesc(Direction.class);
89
90     static {
91         typeDesc.setXmlType(new QName JavaDoc("http://www.capeclear.com/GlobalWeather.xsd", "Direction"));
92         org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
93         elemField.setFieldName("compass");
94         elemField.setXmlName(new QName JavaDoc("", "compass"));
95         elemField.setXmlType(new QName JavaDoc("http://www.capeclear.com/GlobalWeather.xsd", "DirectionCompass"));
96         typeDesc.addFieldDesc(elemField);
97         elemField = new org.apache.axis.description.ElementDesc();
98         elemField.setFieldName("degrees");
99         elemField.setXmlName(new QName JavaDoc("", "degrees"));
100         elemField.setXmlType(new QName JavaDoc("http://www.w3.org/2001/XMLSchema", "int"));
101         typeDesc.addFieldDesc(elemField);
102         elemField = new org.apache.axis.description.ElementDesc();
103         elemField.setFieldName("string");
104         elemField.setXmlName(new QName JavaDoc("", "string"));
105         elemField.setXmlType(new QName JavaDoc("http://www.w3.org/2001/XMLSchema", "string"));
106         typeDesc.addFieldDesc(elemField);
107     }
108
109     /**
110      * Return type metadata object
111      */

112     public static org.apache.axis.description.TypeDesc getTypeDesc() {
113         return typeDesc;
114     }
115
116     /**
117      * Get Custom Serializer
118      */

119     public static org.apache.axis.encoding.Serializer getSerializer(
120            String JavaDoc mechType,
121            Class JavaDoc _javaType,
122            QName JavaDoc _xmlType) {
123         return
124           new org.apache.axis.encoding.ser.BeanSerializer(
125             _javaType, _xmlType, typeDesc);
126     }
127
128     /**
129      * Get Custom Deserializer
130      */

131     public static org.apache.axis.encoding.Deserializer getDeserializer(
132            String JavaDoc mechType,
133            Class JavaDoc _javaType,
134            QName JavaDoc _xmlType) {
135         return
136           new org.apache.axis.encoding.ser.BeanDeserializer(
137             _javaType, _xmlType, typeDesc);
138     }
139
140 }
141
Popular Tags