2 * This class was automatically generated with
\r
3 * <a href="http://www.castor.org">Castor 0.9.9M2</a>, using an XML
\r
8 package org.vamsas.objects.core;
\r
10 //---------------------------------/
\r
11 //- Imported classes and packages -/
\r
12 //---------------------------------/
\r
14 import java.io.IOException;
\r
15 import java.io.Reader;
\r
16 import java.io.Serializable;
\r
17 import java.io.Writer;
\r
18 import org.exolab.castor.xml.MarshalException;
\r
19 import org.exolab.castor.xml.Marshaller;
\r
20 import org.exolab.castor.xml.Unmarshaller;
\r
21 import org.exolab.castor.xml.ValidationException;
\r
22 import org.xml.sax.ContentHandler;
\r
25 * a region from start to end, with flag for
\r
26 * inclusivity of terminii
\r
29 * @version $Revision$ $Date$
\r
31 public class Seg extends org.vamsas.client.Vobject
\r
32 implements java.io.Serializable
\r
36 //--------------------------/
\r
37 //- Class/Member Variables -/
\r
38 //--------------------------/
\r
46 * keeps track of state for field: _start
\r
48 private boolean _has_start;
\r
56 * keeps track of state for field: _end
\r
58 private boolean _has_end;
\r
61 * when false, a consecutive range like
\r
62 * 'start=1, end=2' means the region lying
\r
63 * after position 1 and before position 2
\r
66 private boolean _inclusive;
\r
69 * keeps track of state for field: _inclusive
\r
71 private boolean _has_inclusive;
\r
81 } //-- org.vamsas.objects.core.Seg()
\r
92 public void deleteEnd()
\r
94 this._has_end= false;
\r
95 } //-- void deleteEnd()
\r
98 * Method deleteInclusive
\r
101 public void deleteInclusive()
\r
103 this._has_inclusive= false;
\r
104 } //-- void deleteInclusive()
\r
107 * Method deleteStart
\r
110 public void deleteStart()
\r
112 this._has_start= false;
\r
113 } //-- void deleteStart()
\r
116 * Note: hashCode() has not been overriden
\r
121 public boolean equals(java.lang.Object obj)
\r
126 if (super.equals(obj)==false)
\r
129 if (obj instanceof Seg) {
\r
131 Seg temp = (Seg)obj;
\r
132 if (this._start != temp._start)
\r
134 if (this._has_start != temp._has_start)
\r
136 if (this._end != temp._end)
\r
138 if (this._has_end != temp._has_end)
\r
140 if (this._inclusive != temp._inclusive)
\r
142 if (this._has_inclusive != temp._has_inclusive)
\r
147 } //-- boolean equals(java.lang.Object)
\r
150 * Returns the value of field 'end'.
\r
153 * @return the value of field 'end'.
\r
155 public int getEnd()
\r
158 } //-- int getEnd()
\r
161 * Returns the value of field 'inclusive'. The field
\r
162 * 'inclusive' has the following description: when false, a
\r
163 * consecutive range like
\r
164 * 'start=1, end=2' means the region lying
\r
165 * after position 1 and before position 2
\r
169 * @return the value of field 'inclusive'.
\r
171 public boolean getInclusive()
\r
173 return this._inclusive;
\r
174 } //-- boolean getInclusive()
\r
177 * Returns the value of field 'start'.
\r
180 * @return the value of field 'start'.
\r
182 public int getStart()
\r
184 return this._start;
\r
185 } //-- int getStart()
\r
194 public boolean hasEnd()
\r
196 return this._has_end;
\r
197 } //-- boolean hasEnd()
\r
200 * Method hasInclusive
\r
206 public boolean hasInclusive()
\r
208 return this._has_inclusive;
\r
209 } //-- boolean hasInclusive()
\r
218 public boolean hasStart()
\r
220 return this._has_start;
\r
221 } //-- boolean hasStart()
\r
230 public boolean isValid()
\r
235 catch (org.exolab.castor.xml.ValidationException vex) {
\r
239 } //-- boolean isValid()
\r
248 public void marshal(java.io.Writer out)
\r
249 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
\r
252 Marshaller.marshal(this, out);
\r
253 } //-- void marshal(java.io.Writer)
\r
262 public void marshal(org.xml.sax.ContentHandler handler)
\r
263 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
\r
266 Marshaller.marshal(this, handler);
\r
267 } //-- void marshal(org.xml.sax.ContentHandler)
\r
270 * Sets the value of field 'end'.
\r
272 * @param end the value of field 'end'.
\r
274 public void setEnd(int end)
\r
277 this._has_end = true;
\r
278 } //-- void setEnd(int)
\r
281 * Sets the value of field 'inclusive'. The field 'inclusive'
\r
282 * has the following description: when false, a consecutive
\r
284 * 'start=1, end=2' means the region lying
\r
285 * after position 1 and before position 2
\r
288 * @param inclusive the value of field 'inclusive'.
\r
290 public void setInclusive(boolean inclusive)
\r
292 this._inclusive = inclusive;
\r
293 this._has_inclusive = true;
\r
294 } //-- void setInclusive(boolean)
\r
297 * Sets the value of field 'start'.
\r
299 * @param start the value of field 'start'.
\r
301 public void setStart(int start)
\r
303 this._start = start;
\r
304 this._has_start = true;
\r
305 } //-- void setStart(int)
\r
315 public static org.vamsas.objects.core.Seg unmarshal(java.io.Reader reader)
\r
316 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
\r
318 return (org.vamsas.objects.core.Seg) Unmarshaller.unmarshal(org.vamsas.objects.core.Seg.class, reader);
\r
319 } //-- org.vamsas.objects.core.Seg unmarshal(java.io.Reader)
\r
325 public void validate()
\r
326 throws org.exolab.castor.xml.ValidationException
\r
328 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
\r
329 validator.validate(this);
\r
330 } //-- void validate()
\r