2 * This class was automatically generated with
\r
3 * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
\r
8 package uk.ac.vamsas.objects.core;
\r
10 //---------------------------------/
\r
11 //- Imported classes and packages -/
\r
12 //---------------------------------/
\r
14 import org.exolab.castor.xml.Marshaller;
\r
15 import org.exolab.castor.xml.Unmarshaller;
\r
18 * a position within the associated object's coordinate system
\r
21 * @version $Revision$ $Date$
\r
23 public class Pos extends uk.ac.vamsas.client.Vobject
\r
24 implements java.io.Serializable
\r
28 //--------------------------/
\r
29 //- Class/Member Variables -/
\r
30 //--------------------------/
\r
38 * keeps track of state for field: _i
\r
40 private boolean _has_i;
\r
58 public void deleteI(
\r
64 * Overrides the java.lang.Object.equals method.
\r
67 * @return true if the objects are equal.
\r
69 public boolean equals(
\r
70 final java.lang.Object obj) {
\r
74 if (super.equals(obj)==false)
\r
77 if (obj instanceof Pos) {
\r
79 Pos temp = (Pos)obj;
\r
82 if (this._i != temp._i)
\r
84 if (this._has_i != temp._has_i)
\r
92 * Returns the value of field 'i'.
\r
94 * @return the value of field 'I'.
\r
104 * @return true if at least one I has been added
\r
106 public boolean hasI(
\r
108 return this._has_i;
\r
112 * Overrides the java.lang.Object.hashCode method.
\r
114 * The following steps came from <b>Effective Java Programming
\r
115 * Language Guide</b> by Joshua Bloch, Chapter 3
\r
117 * @return a hash code value for the object.
\r
119 public int hashCode(
\r
121 int result = super.hashCode();
\r
124 result = 37 * result + _i;
\r
132 * @return true if this object is valid according to the schema
\r
134 public boolean isValid(
\r
138 } catch (org.exolab.castor.xml.ValidationException vex) {
\r
148 * @throws org.exolab.castor.xml.MarshalException if object is
\r
149 * null or if any SAXException is thrown during marshaling
\r
150 * @throws org.exolab.castor.xml.ValidationException if this
\r
151 * object is an invalid instance according to the schema
\r
153 public void marshal(
\r
154 final java.io.Writer out)
\r
155 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
\r
156 Marshaller.marshal(this, out);
\r
163 * @throws java.io.IOException if an IOException occurs during
\r
165 * @throws org.exolab.castor.xml.ValidationException if this
\r
166 * object is an invalid instance according to the schema
\r
167 * @throws org.exolab.castor.xml.MarshalException if object is
\r
168 * null or if any SAXException is thrown during marshaling
\r
170 public void marshal(
\r
171 final org.xml.sax.ContentHandler handler)
\r
172 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
\r
173 Marshaller.marshal(this, handler);
\r
177 * Sets the value of field 'i'.
\r
179 * @param i the value of field 'i'.
\r
184 this._has_i = true;
\r
188 * Method unmarshal.
\r
191 * @throws org.exolab.castor.xml.MarshalException if object is
\r
192 * null or if any SAXException is thrown during marshaling
\r
193 * @throws org.exolab.castor.xml.ValidationException if this
\r
194 * object is an invalid instance according to the schema
\r
195 * @return the unmarshaled uk.ac.vamsas.objects.core.Pos
\r
197 public static uk.ac.vamsas.objects.core.Pos unmarshal(
\r
198 final java.io.Reader reader)
\r
199 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
\r
200 return (uk.ac.vamsas.objects.core.Pos) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.Pos.class, reader);
\r
206 * @throws org.exolab.castor.xml.ValidationException if this
\r
207 * object is an invalid instance according to the schema
\r
209 public void validate(
\r
211 throws org.exolab.castor.xml.ValidationException {
\r
212 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
\r
213 validator.validate(this);
\r