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