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 MapList extends uk.ac.vamsas.client.Vobject
\r
23 implements java.io.Serializable
\r
27 //--------------------------/
\r
28 //- Class/Member Variables -/
\r
29 //--------------------------/
\r
32 * Offset to first position in dataset sequence record that
\r
34 * position on 'onto' maps to
\r
36 private long _from = 0;
\r
39 * keeps track of state for field: _from
\r
41 private boolean _has_from;
\r
44 * Offset to last position in dataset sequence record that end
\r
45 * position on 'onto' maps to
\r
47 private long _to = 0;
\r
50 * keeps track of state for field: _to
\r
52 private boolean _has_to;
\r
55 * Offset to first position in database entry that first (or
\r
57 * position in sequence maps to
\r
59 private long _start;
\r
62 * keeps track of state for field: _start
\r
64 private boolean _has_start;
\r
67 * Offset to last position in database entry that last (offset)
\r
68 * position in sequence maps to
\r
73 * keeps track of state for field: _end
\r
75 private boolean _has_end;
\r
93 public void deleteEnd(
\r
95 this._has_end= false;
\r
100 public void deleteFrom(
\r
102 this._has_from= false;
\r
107 public void deleteStart(
\r
109 this._has_start= false;
\r
114 public void deleteTo(
\r
116 this._has_to= false;
\r
120 * Overrides the java.lang.Object.equals method.
\r
123 * @return true if the objects are equal.
\r
125 public boolean equals(
\r
126 final java.lang.Object obj) {
\r
130 if (super.equals(obj)==false)
\r
133 if (obj instanceof MapList) {
\r
135 MapList temp = (MapList)obj;
\r
136 if (this._from != temp._from)
\r
138 if (this._has_from != temp._has_from)
\r
140 if (this._to != temp._to)
\r
142 if (this._has_to != temp._has_to)
\r
144 if (this._start != temp._start)
\r
146 if (this._has_start != temp._has_start)
\r
148 if (this._end != temp._end)
\r
150 if (this._has_end != temp._has_end)
\r
158 * Returns the value of field 'end'. The field 'end' has the
\r
159 * following description: Offset to last position in database
\r
160 * entry that last (offset)
\r
161 * position in sequence maps to
\r
163 * @return the value of field 'End'.
\r
165 public long getEnd(
\r
171 * Returns the value of field 'from'. The field 'from' has the
\r
172 * following description: Offset to first position in dataset
\r
173 * sequence record that start
\r
174 * position on 'onto' maps to
\r
176 * @return the value of field 'From'.
\r
178 public long getFrom(
\r
184 * Returns the value of field 'start'. The field 'start' has
\r
185 * the following description: Offset to first position in
\r
186 * database entry that first (or offset)
\r
187 * position in sequence maps to
\r
189 * @return the value of field 'Start'.
\r
191 public long getStart(
\r
193 return this._start;
\r
197 * Returns the value of field 'to'. The field 'to' has the
\r
198 * following description: Offset to last position in dataset
\r
199 * sequence record that end
\r
200 * position on 'onto' maps to
\r
202 * @return the value of field 'To'.
\r
212 * @return true if at least one End has been added
\r
214 public boolean hasEnd(
\r
216 return this._has_end;
\r
222 * @return true if at least one From has been added
\r
224 public boolean hasFrom(
\r
226 return this._has_from;
\r
232 * @return true if at least one Start has been added
\r
234 public boolean hasStart(
\r
236 return this._has_start;
\r
242 * @return true if at least one To has been added
\r
244 public boolean hasTo(
\r
246 return this._has_to;
\r
250 * Overrides the java.lang.Object.hashCode method.
\r
252 * The following steps came from <b>Effective Java Programming
\r
253 * Language Guide</b> by Joshua Bloch, Chapter 3
\r
255 * @return a hash code value for the object.
\r
257 public int hashCode(
\r
259 int result = super.hashCode();
\r
262 result = 37 * result + (int)(_from^(_from>>>32));
\r
263 result = 37 * result + (int)(_to^(_to>>>32));
\r
264 result = 37 * result + (int)(_start^(_start>>>32));
\r
265 result = 37 * result + (int)(_end^(_end>>>32));
\r
273 * @return true if this object is valid according to the schema
\r
275 public boolean isValid(
\r
279 } catch (org.exolab.castor.xml.ValidationException vex) {
\r
289 * @throws org.exolab.castor.xml.MarshalException if object is
\r
290 * null or if any SAXException is thrown during marshaling
\r
291 * @throws org.exolab.castor.xml.ValidationException if this
\r
292 * object is an invalid instance according to the schema
\r
294 public void marshal(
\r
295 final java.io.Writer out)
\r
296 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
\r
297 Marshaller.marshal(this, out);
\r
304 * @throws java.io.IOException if an IOException occurs during
\r
306 * @throws org.exolab.castor.xml.ValidationException if this
\r
307 * object is an invalid instance according to the schema
\r
308 * @throws org.exolab.castor.xml.MarshalException if object is
\r
309 * null or if any SAXException is thrown during marshaling
\r
311 public void marshal(
\r
312 final org.xml.sax.ContentHandler handler)
\r
313 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
\r
314 Marshaller.marshal(this, handler);
\r
318 * Sets the value of field 'end'. The field 'end' has the
\r
319 * following description: Offset to last position in database
\r
320 * entry that last (offset)
\r
321 * position in sequence maps to
\r
323 * @param end the value of field 'end'.
\r
325 public void setEnd(
\r
328 this._has_end = true;
\r
332 * Sets the value of field 'from'. The field 'from' has the
\r
333 * following description: Offset to first position in dataset
\r
334 * sequence record that start
\r
335 * position on 'onto' maps to
\r
337 * @param from the value of field 'from'.
\r
339 public void setFrom(
\r
342 this._has_from = true;
\r
346 * Sets the value of field 'start'. The field 'start' has the
\r
347 * following description: Offset to first position in database
\r
348 * entry that first (or offset)
\r
349 * position in sequence maps to
\r
351 * @param start the value of field 'start'.
\r
353 public void setStart(
\r
354 final long start) {
\r
355 this._start = start;
\r
356 this._has_start = true;
\r
360 * Sets the value of field 'to'. The field 'to' has the
\r
361 * following description: Offset to last position in dataset
\r
362 * sequence record that end
\r
363 * position on 'onto' maps to
\r
365 * @param to the value of field 'to'.
\r
370 this._has_to = true;
\r
374 * Method unmarshal.
\r
377 * @throws org.exolab.castor.xml.MarshalException if object is
\r
378 * null or if any SAXException is thrown during marshaling
\r
379 * @throws org.exolab.castor.xml.ValidationException if this
\r
380 * object is an invalid instance according to the schema
\r
381 * @return the unmarshaled uk.ac.vamsas.objects.core.MapList
\r
383 public static uk.ac.vamsas.objects.core.MapList unmarshal(
\r
384 final java.io.Reader reader)
\r
385 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
\r
386 return (uk.ac.vamsas.objects.core.MapList) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.MapList.class, reader);
\r
392 * @throws org.exolab.castor.xml.ValidationException if this
\r
393 * object is an invalid instance according to the schema
\r
395 public void validate(
\r
397 throws org.exolab.castor.xml.ValidationException {
\r
398 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
\r
399 validator.validate(this);
\r