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