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
20 * @version $Revision$ $Date$
\r
22 public class Range extends uk.ac.vamsas.client.Vobject
\r
23 implements java.io.Serializable
\r
27 //--------------------------/
\r
28 //- Class/Member Variables -/
\r
29 //--------------------------/
\r
34 private int _seqAStart;
\r
37 * keeps track of state for field: _seqAStart
\r
39 private boolean _has_seqAStart;
\r
44 private int _seqAEnd;
\r
47 * keeps track of state for field: _seqAEnd
\r
49 private boolean _has_seqAEnd;
\r
54 private int _seqBStart;
\r
57 * keeps track of state for field: _seqBStart
\r
59 private boolean _has_seqBStart;
\r
64 private int _seqBEnd;
\r
67 * keeps track of state for field: _seqBEnd
\r
69 private boolean _has_seqBEnd;
\r
87 public void deleteSeqAEnd(
\r
89 this._has_seqAEnd= false;
\r
94 public void deleteSeqAStart(
\r
96 this._has_seqAStart= false;
\r
101 public void deleteSeqBEnd(
\r
103 this._has_seqBEnd= false;
\r
108 public void deleteSeqBStart(
\r
110 this._has_seqBStart= false;
\r
114 * Overrides the java.lang.Object.equals method.
\r
117 * @return true if the objects are equal.
\r
119 public boolean equals(
\r
120 final java.lang.Object obj) {
\r
124 if (super.equals(obj)==false)
\r
127 if (obj instanceof Range) {
\r
129 Range temp = (Range)obj;
\r
130 if (this._seqAStart != temp._seqAStart)
\r
132 if (this._has_seqAStart != temp._has_seqAStart)
\r
134 if (this._seqAEnd != temp._seqAEnd)
\r
136 if (this._has_seqAEnd != temp._has_seqAEnd)
\r
138 if (this._seqBStart != temp._seqBStart)
\r
140 if (this._has_seqBStart != temp._has_seqBStart)
\r
142 if (this._seqBEnd != temp._seqBEnd)
\r
144 if (this._has_seqBEnd != temp._has_seqBEnd)
\r
152 * Returns the value of field 'seqAEnd'.
\r
154 * @return the value of field 'SeqAEnd'.
\r
156 public int getSeqAEnd(
\r
158 return this._seqAEnd;
\r
162 * Returns the value of field 'seqAStart'.
\r
164 * @return the value of field 'SeqAStart'.
\r
166 public int getSeqAStart(
\r
168 return this._seqAStart;
\r
172 * Returns the value of field 'seqBEnd'.
\r
174 * @return the value of field 'SeqBEnd'.
\r
176 public int getSeqBEnd(
\r
178 return this._seqBEnd;
\r
182 * Returns the value of field 'seqBStart'.
\r
184 * @return the value of field 'SeqBStart'.
\r
186 public int getSeqBStart(
\r
188 return this._seqBStart;
\r
192 * Method hasSeqAEnd.
\r
194 * @return true if at least one SeqAEnd has been added
\r
196 public boolean hasSeqAEnd(
\r
198 return this._has_seqAEnd;
\r
202 * Method hasSeqAStart.
\r
204 * @return true if at least one SeqAStart has been added
\r
206 public boolean hasSeqAStart(
\r
208 return this._has_seqAStart;
\r
212 * Method hasSeqBEnd.
\r
214 * @return true if at least one SeqBEnd has been added
\r
216 public boolean hasSeqBEnd(
\r
218 return this._has_seqBEnd;
\r
222 * Method hasSeqBStart.
\r
224 * @return true if at least one SeqBStart has been added
\r
226 public boolean hasSeqBStart(
\r
228 return this._has_seqBStart;
\r
232 * Overrides the java.lang.Object.hashCode method.
\r
234 * The following steps came from <b>Effective Java Programming
\r
235 * Language Guide</b> by Joshua Bloch, Chapter 3
\r
237 * @return a hash code value for the object.
\r
239 public int hashCode(
\r
241 int result = super.hashCode();
\r
244 result = 37 * result + _seqAStart;
\r
245 result = 37 * result + _seqAEnd;
\r
246 result = 37 * result + _seqBStart;
\r
247 result = 37 * result + _seqBEnd;
\r
255 * @return true if this object is valid according to the schema
\r
257 public boolean isValid(
\r
261 } catch (org.exolab.castor.xml.ValidationException vex) {
\r
271 * @throws org.exolab.castor.xml.MarshalException if object is
\r
272 * null or if any SAXException is thrown during marshaling
\r
273 * @throws org.exolab.castor.xml.ValidationException if this
\r
274 * object is an invalid instance according to the schema
\r
276 public void marshal(
\r
277 final java.io.Writer out)
\r
278 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
\r
279 Marshaller.marshal(this, out);
\r
286 * @throws java.io.IOException if an IOException occurs during
\r
288 * @throws org.exolab.castor.xml.ValidationException if this
\r
289 * object is an invalid instance according to the schema
\r
290 * @throws org.exolab.castor.xml.MarshalException if object is
\r
291 * null or if any SAXException is thrown during marshaling
\r
293 public void marshal(
\r
294 final org.xml.sax.ContentHandler handler)
\r
295 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
\r
296 Marshaller.marshal(this, handler);
\r
300 * Sets the value of field 'seqAEnd'.
\r
302 * @param seqAEnd the value of field 'seqAEnd'.
\r
304 public void setSeqAEnd(
\r
305 final int seqAEnd) {
\r
306 this._seqAEnd = seqAEnd;
\r
307 this._has_seqAEnd = true;
\r
311 * Sets the value of field 'seqAStart'.
\r
313 * @param seqAStart the value of field 'seqAStart'.
\r
315 public void setSeqAStart(
\r
316 final int seqAStart) {
\r
317 this._seqAStart = seqAStart;
\r
318 this._has_seqAStart = true;
\r
322 * Sets the value of field 'seqBEnd'.
\r
324 * @param seqBEnd the value of field 'seqBEnd'.
\r
326 public void setSeqBEnd(
\r
327 final int seqBEnd) {
\r
328 this._seqBEnd = seqBEnd;
\r
329 this._has_seqBEnd = true;
\r
333 * Sets the value of field 'seqBStart'.
\r
335 * @param seqBStart the value of field 'seqBStart'.
\r
337 public void setSeqBStart(
\r
338 final int seqBStart) {
\r
339 this._seqBStart = seqBStart;
\r
340 this._has_seqBStart = true;
\r
344 * Method unmarshal.
\r
347 * @throws org.exolab.castor.xml.MarshalException if object is
\r
348 * null or if any SAXException is thrown during marshaling
\r
349 * @throws org.exolab.castor.xml.ValidationException if this
\r
350 * object is an invalid instance according to the schema
\r
351 * @return the unmarshaled uk.ac.vamsas.objects.core.Range
\r
353 public static uk.ac.vamsas.objects.core.Range unmarshal(
\r
354 final java.io.Reader reader)
\r
355 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
\r
356 return (uk.ac.vamsas.objects.core.Range) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.Range.class, reader);
\r
362 * @throws org.exolab.castor.xml.ValidationException if this
\r
363 * object is an invalid instance according to the schema
\r
365 public void validate(
\r
367 throws org.exolab.castor.xml.ValidationException {
\r
368 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
\r
369 validator.validate(this);
\r