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
80 if (this._i != temp._i)
\r
82 if (this._has_i != temp._has_i)
\r
90 * Returns the value of field 'i'.
\r
92 * @return the value of field 'I'.
\r
102 * @return true if at least one I has been added
\r
104 public boolean hasI(
\r
106 return this._has_i;
\r
110 * Overrides the java.lang.Object.hashCode method.
\r
112 * The following steps came from <b>Effective Java Programming
\r
113 * Language Guide</b> by Joshua Bloch, Chapter 3
\r
115 * @return a hash code value for the object.
\r
117 public int hashCode(
\r
119 int result = super.hashCode();
\r
122 result = 37 * result + _i;
\r
130 * @return true if this object is valid according to the schema
\r
132 public boolean isValid(
\r
136 } catch (org.exolab.castor.xml.ValidationException vex) {
\r
146 * @throws org.exolab.castor.xml.MarshalException if object is
\r
147 * null or if any SAXException is thrown during marshaling
\r
148 * @throws org.exolab.castor.xml.ValidationException if this
\r
149 * object is an invalid instance according to the schema
\r
151 public void marshal(
\r
152 final java.io.Writer out)
\r
153 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
\r
154 Marshaller.marshal(this, out);
\r
161 * @throws java.io.IOException if an IOException occurs during
\r
163 * @throws org.exolab.castor.xml.ValidationException if this
\r
164 * object is an invalid instance according to the schema
\r
165 * @throws org.exolab.castor.xml.MarshalException if object is
\r
166 * null or if any SAXException is thrown during marshaling
\r
168 public void marshal(
\r
169 final org.xml.sax.ContentHandler handler)
\r
170 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
\r
171 Marshaller.marshal(this, handler);
\r
175 * Sets the value of field 'i'.
\r
177 * @param i the value of field 'i'.
\r
182 this._has_i = true;
\r
186 * Method unmarshal.
\r
189 * @throws org.exolab.castor.xml.MarshalException if object is
\r
190 * null or if any SAXException is thrown during marshaling
\r
191 * @throws org.exolab.castor.xml.ValidationException if this
\r
192 * object is an invalid instance according to the schema
\r
193 * @return the unmarshaled uk.ac.vamsas.objects.core.Pos
\r
195 public static uk.ac.vamsas.objects.core.Pos unmarshal(
\r
196 final java.io.Reader reader)
\r
197 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
\r
198 return (uk.ac.vamsas.objects.core.Pos) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.Pos.class, reader);
\r
204 * @throws org.exolab.castor.xml.ValidationException if this
\r
205 * object is an invalid instance according to the schema
\r
207 public void validate(
\r
209 throws org.exolab.castor.xml.ValidationException {
\r
210 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
\r
211 validator.validate(this);
\r