11d84d3656f72be391753d808b6bd91ce02e23fc
[vamsas.git] / src / uk / ac / vamsas / objects / core / Range.java
1 /*\r
2  * This class was automatically generated with \r
3  * <a href="http://www.castor.org">Castor 1.1</a>, using an XML\r
4  * Schema.\r
5  * $Id$\r
6  */\r
7 \r
8 package uk.ac.vamsas.objects.core;\r
9 \r
10   //---------------------------------/\r
11  //- Imported classes and packages -/\r
12 //---------------------------------/\r
13 \r
14 import org.exolab.castor.xml.Marshaller;\r
15 import org.exolab.castor.xml.Unmarshaller;\r
16 \r
17 /**\r
18  * Class Range.\r
19  * \r
20  * @version $Revision$ $Date$\r
21  */\r
22 public class Range extends uk.ac.vamsas.client.Vobject \r
23 implements java.io.Serializable\r
24 {\r
25 \r
26 \r
27       //--------------------------/\r
28      //- Class/Member Variables -/\r
29     //--------------------------/\r
30 \r
31     /**\r
32      * Field _seqAStart.\r
33      */\r
34     private int _seqAStart;\r
35 \r
36     /**\r
37      * keeps track of state for field: _seqAStart\r
38      */\r
39     private boolean _has_seqAStart;\r
40 \r
41     /**\r
42      * Field _seqAEnd.\r
43      */\r
44     private int _seqAEnd;\r
45 \r
46     /**\r
47      * keeps track of state for field: _seqAEnd\r
48      */\r
49     private boolean _has_seqAEnd;\r
50 \r
51     /**\r
52      * Field _seqBStart.\r
53      */\r
54     private int _seqBStart;\r
55 \r
56     /**\r
57      * keeps track of state for field: _seqBStart\r
58      */\r
59     private boolean _has_seqBStart;\r
60 \r
61     /**\r
62      * Field _seqBEnd.\r
63      */\r
64     private int _seqBEnd;\r
65 \r
66     /**\r
67      * keeps track of state for field: _seqBEnd\r
68      */\r
69     private boolean _has_seqBEnd;\r
70 \r
71 \r
72       //----------------/\r
73      //- Constructors -/\r
74     //----------------/\r
75 \r
76     public Range() {\r
77         super();\r
78     }\r
79 \r
80 \r
81       //-----------/\r
82      //- Methods -/\r
83     //-----------/\r
84 \r
85     /**\r
86      */\r
87     public void deleteSeqAEnd(\r
88     ) {\r
89         this._has_seqAEnd= false;\r
90     }\r
91 \r
92     /**\r
93      */\r
94     public void deleteSeqAStart(\r
95     ) {\r
96         this._has_seqAStart= false;\r
97     }\r
98 \r
99     /**\r
100      */\r
101     public void deleteSeqBEnd(\r
102     ) {\r
103         this._has_seqBEnd= false;\r
104     }\r
105 \r
106     /**\r
107      */\r
108     public void deleteSeqBStart(\r
109     ) {\r
110         this._has_seqBStart= false;\r
111     }\r
112 \r
113     /**\r
114      * Overrides the java.lang.Object.equals method.\r
115      * \r
116      * @param obj\r
117      * @return true if the objects are equal.\r
118      */\r
119     public boolean equals(\r
120             final java.lang.Object obj) {\r
121         if ( this == obj )\r
122             return true;\r
123         \r
124         if (super.equals(obj)==false)\r
125             return false;\r
126         \r
127         if (obj instanceof Range) {\r
128         \r
129             Range temp = (Range)obj;\r
130             if (this._seqAStart != temp._seqAStart)\r
131                 return false;\r
132             if (this._has_seqAStart != temp._has_seqAStart)\r
133                 return false;\r
134             if (this._seqAEnd != temp._seqAEnd)\r
135                 return false;\r
136             if (this._has_seqAEnd != temp._has_seqAEnd)\r
137                 return false;\r
138             if (this._seqBStart != temp._seqBStart)\r
139                 return false;\r
140             if (this._has_seqBStart != temp._has_seqBStart)\r
141                 return false;\r
142             if (this._seqBEnd != temp._seqBEnd)\r
143                 return false;\r
144             if (this._has_seqBEnd != temp._has_seqBEnd)\r
145                 return false;\r
146             return true;\r
147         }\r
148         return false;\r
149     }\r
150 \r
151     /**\r
152      * Returns the value of field 'seqAEnd'.\r
153      * \r
154      * @return the value of field 'SeqAEnd'.\r
155      */\r
156     public int getSeqAEnd(\r
157     ) {\r
158         return this._seqAEnd;\r
159     }\r
160 \r
161     /**\r
162      * Returns the value of field 'seqAStart'.\r
163      * \r
164      * @return the value of field 'SeqAStart'.\r
165      */\r
166     public int getSeqAStart(\r
167     ) {\r
168         return this._seqAStart;\r
169     }\r
170 \r
171     /**\r
172      * Returns the value of field 'seqBEnd'.\r
173      * \r
174      * @return the value of field 'SeqBEnd'.\r
175      */\r
176     public int getSeqBEnd(\r
177     ) {\r
178         return this._seqBEnd;\r
179     }\r
180 \r
181     /**\r
182      * Returns the value of field 'seqBStart'.\r
183      * \r
184      * @return the value of field 'SeqBStart'.\r
185      */\r
186     public int getSeqBStart(\r
187     ) {\r
188         return this._seqBStart;\r
189     }\r
190 \r
191     /**\r
192      * Method hasSeqAEnd.\r
193      * \r
194      * @return true if at least one SeqAEnd has been added\r
195      */\r
196     public boolean hasSeqAEnd(\r
197     ) {\r
198         return this._has_seqAEnd;\r
199     }\r
200 \r
201     /**\r
202      * Method hasSeqAStart.\r
203      * \r
204      * @return true if at least one SeqAStart has been added\r
205      */\r
206     public boolean hasSeqAStart(\r
207     ) {\r
208         return this._has_seqAStart;\r
209     }\r
210 \r
211     /**\r
212      * Method hasSeqBEnd.\r
213      * \r
214      * @return true if at least one SeqBEnd has been added\r
215      */\r
216     public boolean hasSeqBEnd(\r
217     ) {\r
218         return this._has_seqBEnd;\r
219     }\r
220 \r
221     /**\r
222      * Method hasSeqBStart.\r
223      * \r
224      * @return true if at least one SeqBStart has been added\r
225      */\r
226     public boolean hasSeqBStart(\r
227     ) {\r
228         return this._has_seqBStart;\r
229     }\r
230 \r
231     /**\r
232      * Overrides the java.lang.Object.hashCode method.\r
233      * <p>\r
234      * The following steps came from <b>Effective Java Programming\r
235      * Language Guide</b> by Joshua Bloch, Chapter 3\r
236      * \r
237      * @return a hash code value for the object.\r
238      */\r
239     public int hashCode(\r
240     ) {\r
241         int result = super.hashCode();\r
242         \r
243         long tmp;\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
248         \r
249         return result;\r
250     }\r
251 \r
252     /**\r
253      * Method isValid.\r
254      * \r
255      * @return true if this object is valid according to the schema\r
256      */\r
257     public boolean isValid(\r
258     ) {\r
259         try {\r
260             validate();\r
261         } catch (org.exolab.castor.xml.ValidationException vex) {\r
262             return false;\r
263         }\r
264         return true;\r
265     }\r
266 \r
267     /**\r
268      * \r
269      * \r
270      * @param out\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
275      */\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
280     }\r
281 \r
282     /**\r
283      * \r
284      * \r
285      * @param handler\r
286      * @throws java.io.IOException if an IOException occurs during\r
287      * marshaling\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
292      */\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
297     }\r
298 \r
299     /**\r
300      * Sets the value of field 'seqAEnd'.\r
301      * \r
302      * @param seqAEnd the value of field 'seqAEnd'.\r
303      */\r
304     public void setSeqAEnd(\r
305             final int seqAEnd) {\r
306         this._seqAEnd = seqAEnd;\r
307         this._has_seqAEnd = true;\r
308     }\r
309 \r
310     /**\r
311      * Sets the value of field 'seqAStart'.\r
312      * \r
313      * @param seqAStart the value of field 'seqAStart'.\r
314      */\r
315     public void setSeqAStart(\r
316             final int seqAStart) {\r
317         this._seqAStart = seqAStart;\r
318         this._has_seqAStart = true;\r
319     }\r
320 \r
321     /**\r
322      * Sets the value of field 'seqBEnd'.\r
323      * \r
324      * @param seqBEnd the value of field 'seqBEnd'.\r
325      */\r
326     public void setSeqBEnd(\r
327             final int seqBEnd) {\r
328         this._seqBEnd = seqBEnd;\r
329         this._has_seqBEnd = true;\r
330     }\r
331 \r
332     /**\r
333      * Sets the value of field 'seqBStart'.\r
334      * \r
335      * @param seqBStart the value of field 'seqBStart'.\r
336      */\r
337     public void setSeqBStart(\r
338             final int seqBStart) {\r
339         this._seqBStart = seqBStart;\r
340         this._has_seqBStart = true;\r
341     }\r
342 \r
343     /**\r
344      * Method unmarshal.\r
345      * \r
346      * @param reader\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
352      */\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
357     }\r
358 \r
359     /**\r
360      * \r
361      * \r
362      * @throws org.exolab.castor.xml.ValidationException if this\r
363      * object is an invalid instance according to the schema\r
364      */\r
365     public void validate(\r
366     )\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
370     }\r
371 \r
372 }\r