Java binding for new document schema (from 1st hinxton vamsas Meeting)
[vamsas.git] / src / org / vamsas / objects / core / Pos.java
1 /*\r
2  * This class was automatically generated with \r
3  * <a href="http://www.castor.org">Castor 0.9.9M2</a>, using an XML\r
4  * Schema.\r
5  * $Id$\r
6  */\r
7 \r
8 package org.vamsas.objects.core;\r
9 \r
10   //---------------------------------/\r
11  //- Imported classes and packages -/\r
12 //---------------------------------/\r
13 \r
14 import java.io.IOException;\r
15 import java.io.Reader;\r
16 import java.io.Serializable;\r
17 import java.io.Writer;\r
18 import org.exolab.castor.xml.MarshalException;\r
19 import org.exolab.castor.xml.Marshaller;\r
20 import org.exolab.castor.xml.Unmarshaller;\r
21 import org.exolab.castor.xml.ValidationException;\r
22 import org.xml.sax.ContentHandler;\r
23 \r
24 /**\r
25  * a position within the associated object's\r
26  *  coordinate system\r
27  *  \r
28  * \r
29  * @version $Revision$ $Date$\r
30  */\r
31 public class Pos extends org.vamsas.client.Vobject \r
32 implements java.io.Serializable\r
33 {\r
34 \r
35 \r
36       //--------------------------/\r
37      //- Class/Member Variables -/\r
38     //--------------------------/\r
39 \r
40     /**\r
41      * Field _i\r
42      */\r
43     private int _i;\r
44 \r
45     /**\r
46      * keeps track of state for field: _i\r
47      */\r
48     private boolean _has_i;\r
49 \r
50 \r
51       //----------------/\r
52      //- Constructors -/\r
53     //----------------/\r
54 \r
55     public Pos() \r
56      {\r
57         super();\r
58     } //-- org.vamsas.objects.core.Pos()\r
59 \r
60 \r
61       //-----------/\r
62      //- Methods -/\r
63     //-----------/\r
64 \r
65     /**\r
66      * Method deleteI\r
67      * \r
68      */\r
69     public void deleteI()\r
70     {\r
71         this._has_i= false;\r
72     } //-- void deleteI() \r
73 \r
74     /**\r
75      * Note: hashCode() has not been overriden\r
76      * \r
77      * @param obj\r
78      * @return boolean\r
79      */\r
80     public boolean equals(java.lang.Object obj)\r
81     {\r
82         if ( this == obj )\r
83             return true;\r
84         \r
85         if (super.equals(obj)==false)\r
86             return false;\r
87         \r
88         if (obj instanceof Pos) {\r
89         \r
90             Pos temp = (Pos)obj;\r
91             if (this._i != temp._i)\r
92                 return false;\r
93             if (this._has_i != temp._has_i)\r
94                 return false;\r
95             return true;\r
96         }\r
97         return false;\r
98     } //-- boolean equals(java.lang.Object) \r
99 \r
100     /**\r
101      * Returns the value of field 'i'.\r
102      * \r
103      * @return int\r
104      * @return the value of field 'i'.\r
105      */\r
106     public int getI()\r
107     {\r
108         return this._i;\r
109     } //-- int getI() \r
110 \r
111     /**\r
112      * Method hasI\r
113      * \r
114      * \r
115      * \r
116      * @return boolean\r
117      */\r
118     public boolean hasI()\r
119     {\r
120         return this._has_i;\r
121     } //-- boolean hasI() \r
122 \r
123     /**\r
124      * Method isValid\r
125      * \r
126      * \r
127      * \r
128      * @return boolean\r
129      */\r
130     public boolean isValid()\r
131     {\r
132         try {\r
133             validate();\r
134         }\r
135         catch (org.exolab.castor.xml.ValidationException vex) {\r
136             return false;\r
137         }\r
138         return true;\r
139     } //-- boolean isValid() \r
140 \r
141     /**\r
142      * Method marshal\r
143      * \r
144      * \r
145      * \r
146      * @param out\r
147      */\r
148     public void marshal(java.io.Writer out)\r
149         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
150     {\r
151         \r
152         Marshaller.marshal(this, out);\r
153     } //-- void marshal(java.io.Writer) \r
154 \r
155     /**\r
156      * Method marshal\r
157      * \r
158      * \r
159      * \r
160      * @param handler\r
161      */\r
162     public void marshal(org.xml.sax.ContentHandler handler)\r
163         throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
164     {\r
165         \r
166         Marshaller.marshal(this, handler);\r
167     } //-- void marshal(org.xml.sax.ContentHandler) \r
168 \r
169     /**\r
170      * Sets the value of field 'i'.\r
171      * \r
172      * @param i the value of field 'i'.\r
173      */\r
174     public void setI(int i)\r
175     {\r
176         this._i = i;\r
177         this._has_i = true;\r
178     } //-- void setI(int) \r
179 \r
180     /**\r
181      * Method unmarshal\r
182      * \r
183      * \r
184      * \r
185      * @param reader\r
186      * @return Pos\r
187      */\r
188     public static org.vamsas.objects.core.Pos unmarshal(java.io.Reader reader)\r
189         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
190     {\r
191         return (org.vamsas.objects.core.Pos) Unmarshaller.unmarshal(org.vamsas.objects.core.Pos.class, reader);\r
192     } //-- org.vamsas.objects.core.Pos unmarshal(java.io.Reader) \r
193 \r
194     /**\r
195      * Method validate\r
196      * \r
197      */\r
198     public void validate()\r
199         throws org.exolab.castor.xml.ValidationException\r
200     {\r
201         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();\r
202         validator.validate(this);\r
203     } //-- void validate() \r
204 \r
205 }\r