refactored org to uk
[vamsas.git] / src / uk / ac / vamsas / objects / core / MapList.java
1 /*\r
2  * This class was automatically generated with \r
3  * <a href="http://www.castor.org">Castor 0.9.9M2</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 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
23 \r
24 /**\r
25  * Class MapList.\r
26  * \r
27  * @version $Revision$ $Date$\r
28  */\r
29 public class MapList extends uk.ac.vamsas.client.Vobject \r
30 implements java.io.Serializable\r
31 {\r
32 \r
33 \r
34       //--------------------------/\r
35      //- Class/Member Variables -/\r
36     //--------------------------/\r
37 \r
38     /**\r
39      * Offset to first position in dataset sequence record that\r
40      * start\r
41      *  position on 'onto' maps to \r
42      */\r
43     private int _from = 0;\r
44 \r
45     /**\r
46      * keeps track of state for field: _from\r
47      */\r
48     private boolean _has_from;\r
49 \r
50     /**\r
51      * Offset to last position in dataset sequence record that end\r
52      *  position on 'onto' maps to \r
53      */\r
54     private int _to = 0;\r
55 \r
56     /**\r
57      * keeps track of state for field: _to\r
58      */\r
59     private boolean _has_to;\r
60 \r
61     /**\r
62      * Offset to first position in database entry that first (or\r
63      * offset)\r
64      *  position in sequence maps to \r
65      */\r
66     private int _start;\r
67 \r
68     /**\r
69      * keeps track of state for field: _start\r
70      */\r
71     private boolean _has_start;\r
72 \r
73     /**\r
74      * Offset to last position in database entry that last (offset)\r
75      *  position in sequence maps to \r
76      */\r
77     private int _end;\r
78 \r
79     /**\r
80      * keeps track of state for field: _end\r
81      */\r
82     private boolean _has_end;\r
83 \r
84 \r
85       //----------------/\r
86      //- Constructors -/\r
87     //----------------/\r
88 \r
89     public MapList() \r
90      {\r
91         super();\r
92     } //-- uk.ac.vamsas.objects.core.MapList()\r
93 \r
94 \r
95       //-----------/\r
96      //- Methods -/\r
97     //-----------/\r
98 \r
99     /**\r
100      * Method deleteEnd\r
101      * \r
102      */\r
103     public void deleteEnd()\r
104     {\r
105         this._has_end= false;\r
106     } //-- void deleteEnd() \r
107 \r
108     /**\r
109      * Method deleteFrom\r
110      * \r
111      */\r
112     public void deleteFrom()\r
113     {\r
114         this._has_from= false;\r
115     } //-- void deleteFrom() \r
116 \r
117     /**\r
118      * Method deleteStart\r
119      * \r
120      */\r
121     public void deleteStart()\r
122     {\r
123         this._has_start= false;\r
124     } //-- void deleteStart() \r
125 \r
126     /**\r
127      * Method deleteTo\r
128      * \r
129      */\r
130     public void deleteTo()\r
131     {\r
132         this._has_to= false;\r
133     } //-- void deleteTo() \r
134 \r
135     /**\r
136      * Note: hashCode() has not been overriden\r
137      * \r
138      * @param obj\r
139      * @return boolean\r
140      */\r
141     public boolean equals(java.lang.Object obj)\r
142     {\r
143         if ( this == obj )\r
144             return true;\r
145         \r
146         if (super.equals(obj)==false)\r
147             return false;\r
148         \r
149         if (obj instanceof MapList) {\r
150         \r
151             MapList temp = (MapList)obj;\r
152             if (this._from != temp._from)\r
153                 return false;\r
154             if (this._has_from != temp._has_from)\r
155                 return false;\r
156             if (this._to != temp._to)\r
157                 return false;\r
158             if (this._has_to != temp._has_to)\r
159                 return false;\r
160             if (this._start != temp._start)\r
161                 return false;\r
162             if (this._has_start != temp._has_start)\r
163                 return false;\r
164             if (this._end != temp._end)\r
165                 return false;\r
166             if (this._has_end != temp._has_end)\r
167                 return false;\r
168             return true;\r
169         }\r
170         return false;\r
171     } //-- boolean equals(java.lang.Object) \r
172 \r
173     /**\r
174      * Returns the value of field 'end'. The field 'end' has the\r
175      * following description: Offset to last position in database\r
176      * entry that last (offset)\r
177      *  position in sequence maps to \r
178      * \r
179      * @return int\r
180      * @return the value of field 'end'.\r
181      */\r
182     public int getEnd()\r
183     {\r
184         return this._end;\r
185     } //-- int getEnd() \r
186 \r
187     /**\r
188      * Returns the value of field 'from'. The field 'from' has the\r
189      * following description: Offset to first position in dataset\r
190      * sequence record that start\r
191      *  position on 'onto' maps to \r
192      * \r
193      * @return int\r
194      * @return the value of field 'from'.\r
195      */\r
196     public int getFrom()\r
197     {\r
198         return this._from;\r
199     } //-- int getFrom() \r
200 \r
201     /**\r
202      * Returns the value of field 'start'. The field 'start' has\r
203      * the following description: Offset to first position in\r
204      * database entry that first (or offset)\r
205      *  position in sequence maps to \r
206      * \r
207      * @return int\r
208      * @return the value of field 'start'.\r
209      */\r
210     public int getStart()\r
211     {\r
212         return this._start;\r
213     } //-- int getStart() \r
214 \r
215     /**\r
216      * Returns the value of field 'to'. The field 'to' has the\r
217      * following description: Offset to last position in dataset\r
218      * sequence record that end\r
219      *  position on 'onto' maps to \r
220      * \r
221      * @return int\r
222      * @return the value of field 'to'.\r
223      */\r
224     public int getTo()\r
225     {\r
226         return this._to;\r
227     } //-- int getTo() \r
228 \r
229     /**\r
230      * Method hasEnd\r
231      * \r
232      * \r
233      * \r
234      * @return boolean\r
235      */\r
236     public boolean hasEnd()\r
237     {\r
238         return this._has_end;\r
239     } //-- boolean hasEnd() \r
240 \r
241     /**\r
242      * Method hasFrom\r
243      * \r
244      * \r
245      * \r
246      * @return boolean\r
247      */\r
248     public boolean hasFrom()\r
249     {\r
250         return this._has_from;\r
251     } //-- boolean hasFrom() \r
252 \r
253     /**\r
254      * Method hasStart\r
255      * \r
256      * \r
257      * \r
258      * @return boolean\r
259      */\r
260     public boolean hasStart()\r
261     {\r
262         return this._has_start;\r
263     } //-- boolean hasStart() \r
264 \r
265     /**\r
266      * Method hasTo\r
267      * \r
268      * \r
269      * \r
270      * @return boolean\r
271      */\r
272     public boolean hasTo()\r
273     {\r
274         return this._has_to;\r
275     } //-- boolean hasTo() \r
276 \r
277     /**\r
278      * Method isValid\r
279      * \r
280      * \r
281      * \r
282      * @return boolean\r
283      */\r
284     public boolean isValid()\r
285     {\r
286         try {\r
287             validate();\r
288         }\r
289         catch (org.exolab.castor.xml.ValidationException vex) {\r
290             return false;\r
291         }\r
292         return true;\r
293     } //-- boolean isValid() \r
294 \r
295     /**\r
296      * Method marshal\r
297      * \r
298      * \r
299      * \r
300      * @param out\r
301      */\r
302     public void marshal(java.io.Writer out)\r
303         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
304     {\r
305         \r
306         Marshaller.marshal(this, out);\r
307     } //-- void marshal(java.io.Writer) \r
308 \r
309     /**\r
310      * Method marshal\r
311      * \r
312      * \r
313      * \r
314      * @param handler\r
315      */\r
316     public void marshal(org.xml.sax.ContentHandler handler)\r
317         throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
318     {\r
319         \r
320         Marshaller.marshal(this, handler);\r
321     } //-- void marshal(org.xml.sax.ContentHandler) \r
322 \r
323     /**\r
324      * Sets the value of field 'end'. The field 'end' has the\r
325      * following description: Offset to last position in database\r
326      * entry that last (offset)\r
327      *  position in sequence maps to \r
328      * \r
329      * @param end the value of field 'end'.\r
330      */\r
331     public void setEnd(int end)\r
332     {\r
333         this._end = end;\r
334         this._has_end = true;\r
335     } //-- void setEnd(int) \r
336 \r
337     /**\r
338      * Sets the value of field 'from'. The field 'from' has the\r
339      * following description: Offset to first position in dataset\r
340      * sequence record that start\r
341      *  position on 'onto' maps to \r
342      * \r
343      * @param from the value of field 'from'.\r
344      */\r
345     public void setFrom(int from)\r
346     {\r
347         this._from = from;\r
348         this._has_from = true;\r
349     } //-- void setFrom(int) \r
350 \r
351     /**\r
352      * Sets the value of field 'start'. The field 'start' has the\r
353      * following description: Offset to first position in database\r
354      * entry that first (or offset)\r
355      *  position in sequence maps to \r
356      * \r
357      * @param start the value of field 'start'.\r
358      */\r
359     public void setStart(int start)\r
360     {\r
361         this._start = start;\r
362         this._has_start = true;\r
363     } //-- void setStart(int) \r
364 \r
365     /**\r
366      * Sets the value of field 'to'. The field 'to' has the\r
367      * following description: Offset to last position in dataset\r
368      * sequence record that end\r
369      *  position on 'onto' maps to \r
370      * \r
371      * @param to the value of field 'to'.\r
372      */\r
373     public void setTo(int to)\r
374     {\r
375         this._to = to;\r
376         this._has_to = true;\r
377     } //-- void setTo(int) \r
378 \r
379     /**\r
380      * Method unmarshal\r
381      * \r
382      * \r
383      * \r
384      * @param reader\r
385      * @return MapList\r
386      */\r
387     public static uk.ac.vamsas.objects.core.MapList unmarshal(java.io.Reader reader)\r
388         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
389     {\r
390         return (uk.ac.vamsas.objects.core.MapList) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.MapList.class, reader);\r
391     } //-- uk.ac.vamsas.objects.core.MapList unmarshal(java.io.Reader) \r
392 \r
393     /**\r
394      * Method validate\r
395      * \r
396      */\r
397     public void validate()\r
398         throws org.exolab.castor.xml.ValidationException\r
399     {\r
400         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();\r
401         validator.validate(this);\r
402     } //-- void validate() \r
403 \r
404 }\r