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