autogenerated java classes for current schema
[vamsas.git] / src / org / vamsas / objects / core / Map.java
1 /*
2  * This class was automatically generated with 
3  * <a href="http://www.castor.org">Castor 0.9.9M2</a>, using an XML
4  * Schema.
5  * $Id$
6  */
7
8 package org.vamsas.objects.core;
9
10   //---------------------------------/
11  //- Imported classes and packages -/
12 //---------------------------------/
13
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;
23
24 /**
25  * Class Map.
26  * 
27  * @version $Revision$ $Date$
28  */
29 public class Map extends org.vamsas.client.Vobject 
30 implements java.io.Serializable
31 {
32
33
34       //--------------------------/
35      //- Class/Member Variables -/
36     //--------------------------/
37
38     /**
39      * Offset
40      *  to
41      *  first
42      *  position
43      *  in
44      *  dataset
45      *  sequence
46      *  record
47      *  that
48      *  this
49      *  database
50      *  entry
51      *  maps
52      *  to
53      *  
54      */
55     private int _from = 0;
56
57     /**
58      * keeps track of state for field: _from
59      */
60     private boolean _has_from;
61
62     /**
63      * Offset
64      *  to
65      *  last
66      *  position
67      *  in
68      *  dataset
69      *  sequence
70      *  record
71      *  that
72      *  this
73      *  database
74      *  entry
75      *  maps
76      *  to
77      *  
78      */
79     private int _to = 0;
80
81     /**
82      * keeps track of state for field: _to
83      */
84     private boolean _has_to;
85
86     /**
87      * Offset
88      *  to first
89      *  last
90      *  position
91      *  in
92      *  database
93      *  entry
94      *  that
95      *  first
96      *  (or
97      *  offset)
98      *  position
99      *  in
100      *  sequence
101      *  maps to
102      *  
103      */
104     private int _start;
105
106     /**
107      * keeps track of state for field: _start
108      */
109     private boolean _has_start;
110
111     /**
112      * Offset
113      *  to last
114      *  position
115      *  in
116      *  database
117      *  entry
118      *  that
119      *  last
120      *  (offset)
121      *  position
122      *  in
123      *  sequence
124      *  maps to
125      *  
126      */
127     private int _end;
128
129     /**
130      * keeps track of state for field: _end
131      */
132     private boolean _has_end;
133
134
135       //----------------/
136      //- Constructors -/
137     //----------------/
138
139     public Map() 
140      {
141         super();
142     } //-- org.vamsas.objects.core.Map()
143
144
145       //-----------/
146      //- Methods -/
147     //-----------/
148
149     /**
150      * Method deleteEnd
151      * 
152      */
153     public void deleteEnd()
154     {
155         this._has_end= false;
156     } //-- void deleteEnd() 
157
158     /**
159      * Method deleteFrom
160      * 
161      */
162     public void deleteFrom()
163     {
164         this._has_from= false;
165     } //-- void deleteFrom() 
166
167     /**
168      * Method deleteStart
169      * 
170      */
171     public void deleteStart()
172     {
173         this._has_start= false;
174     } //-- void deleteStart() 
175
176     /**
177      * Method deleteTo
178      * 
179      */
180     public void deleteTo()
181     {
182         this._has_to= false;
183     } //-- void deleteTo() 
184
185     /**
186      * Note: hashCode() has not been overriden
187      * 
188      * @param obj
189      * @return boolean
190      */
191     public boolean equals(java.lang.Object obj)
192     {
193         if ( this == obj )
194             return true;
195         
196         if (super.equals(obj)==false)
197             return false;
198         
199         if (obj instanceof Map) {
200         
201             Map temp = (Map)obj;
202             if (this._from != temp._from)
203                 return false;
204             if (this._has_from != temp._has_from)
205                 return false;
206             if (this._to != temp._to)
207                 return false;
208             if (this._has_to != temp._has_to)
209                 return false;
210             if (this._start != temp._start)
211                 return false;
212             if (this._has_start != temp._has_start)
213                 return false;
214             if (this._end != temp._end)
215                 return false;
216             if (this._has_end != temp._has_end)
217                 return false;
218             return true;
219         }
220         return false;
221     } //-- boolean equals(java.lang.Object) 
222
223     /**
224      * Returns the value of field 'end'. The field 'end' has the
225      * following description: Offset
226      *  to last
227      *  position
228      *  in
229      *  database
230      *  entry
231      *  that
232      *  last
233      *  (offset)
234      *  position
235      *  in
236      *  sequence
237      *  maps to
238      *  
239      * 
240      * @return int
241      * @return the value of field 'end'.
242      */
243     public int getEnd()
244     {
245         return this._end;
246     } //-- int getEnd() 
247
248     /**
249      * Returns the value of field 'from'. The field 'from' has the
250      * following description: Offset
251      *  to
252      *  first
253      *  position
254      *  in
255      *  dataset
256      *  sequence
257      *  record
258      *  that
259      *  this
260      *  database
261      *  entry
262      *  maps
263      *  to
264      *  
265      * 
266      * @return int
267      * @return the value of field 'from'.
268      */
269     public int getFrom()
270     {
271         return this._from;
272     } //-- int getFrom() 
273
274     /**
275      * Returns the value of field 'start'. The field 'start' has
276      * the following description: Offset
277      *  to first
278      *  last
279      *  position
280      *  in
281      *  database
282      *  entry
283      *  that
284      *  first
285      *  (or
286      *  offset)
287      *  position
288      *  in
289      *  sequence
290      *  maps to
291      *  
292      * 
293      * @return int
294      * @return the value of field 'start'.
295      */
296     public int getStart()
297     {
298         return this._start;
299     } //-- int getStart() 
300
301     /**
302      * Returns the value of field 'to'. The field 'to' has the
303      * following description: Offset
304      *  to
305      *  last
306      *  position
307      *  in
308      *  dataset
309      *  sequence
310      *  record
311      *  that
312      *  this
313      *  database
314      *  entry
315      *  maps
316      *  to
317      *  
318      * 
319      * @return int
320      * @return the value of field 'to'.
321      */
322     public int getTo()
323     {
324         return this._to;
325     } //-- int getTo() 
326
327     /**
328      * Method hasEnd
329      * 
330      * 
331      * 
332      * @return boolean
333      */
334     public boolean hasEnd()
335     {
336         return this._has_end;
337     } //-- boolean hasEnd() 
338
339     /**
340      * Method hasFrom
341      * 
342      * 
343      * 
344      * @return boolean
345      */
346     public boolean hasFrom()
347     {
348         return this._has_from;
349     } //-- boolean hasFrom() 
350
351     /**
352      * Method hasStart
353      * 
354      * 
355      * 
356      * @return boolean
357      */
358     public boolean hasStart()
359     {
360         return this._has_start;
361     } //-- boolean hasStart() 
362
363     /**
364      * Method hasTo
365      * 
366      * 
367      * 
368      * @return boolean
369      */
370     public boolean hasTo()
371     {
372         return this._has_to;
373     } //-- boolean hasTo() 
374
375     /**
376      * Method isValid
377      * 
378      * 
379      * 
380      * @return boolean
381      */
382     public boolean isValid()
383     {
384         try {
385             validate();
386         }
387         catch (org.exolab.castor.xml.ValidationException vex) {
388             return false;
389         }
390         return true;
391     } //-- boolean isValid() 
392
393     /**
394      * Method marshal
395      * 
396      * 
397      * 
398      * @param out
399      */
400     public void marshal(java.io.Writer out)
401         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
402     {
403         
404         Marshaller.marshal(this, out);
405     } //-- void marshal(java.io.Writer) 
406
407     /**
408      * Method marshal
409      * 
410      * 
411      * 
412      * @param handler
413      */
414     public void marshal(org.xml.sax.ContentHandler handler)
415         throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
416     {
417         
418         Marshaller.marshal(this, handler);
419     } //-- void marshal(org.xml.sax.ContentHandler) 
420
421     /**
422      * Sets the value of field 'end'. The field 'end' has the
423      * following description: Offset
424      *  to last
425      *  position
426      *  in
427      *  database
428      *  entry
429      *  that
430      *  last
431      *  (offset)
432      *  position
433      *  in
434      *  sequence
435      *  maps to
436      *  
437      * 
438      * @param end the value of field 'end'.
439      */
440     public void setEnd(int end)
441     {
442         this._end = end;
443         this._has_end = true;
444     } //-- void setEnd(int) 
445
446     /**
447      * Sets the value of field 'from'. The field 'from' has the
448      * following description: Offset
449      *  to
450      *  first
451      *  position
452      *  in
453      *  dataset
454      *  sequence
455      *  record
456      *  that
457      *  this
458      *  database
459      *  entry
460      *  maps
461      *  to
462      *  
463      * 
464      * @param from the value of field 'from'.
465      */
466     public void setFrom(int from)
467     {
468         this._from = from;
469         this._has_from = true;
470     } //-- void setFrom(int) 
471
472     /**
473      * Sets the value of field 'start'. The field 'start' has the
474      * following description: Offset
475      *  to first
476      *  last
477      *  position
478      *  in
479      *  database
480      *  entry
481      *  that
482      *  first
483      *  (or
484      *  offset)
485      *  position
486      *  in
487      *  sequence
488      *  maps to
489      *  
490      * 
491      * @param start the value of field 'start'.
492      */
493     public void setStart(int start)
494     {
495         this._start = start;
496         this._has_start = true;
497     } //-- void setStart(int) 
498
499     /**
500      * Sets the value of field 'to'. The field 'to' has the
501      * following description: Offset
502      *  to
503      *  last
504      *  position
505      *  in
506      *  dataset
507      *  sequence
508      *  record
509      *  that
510      *  this
511      *  database
512      *  entry
513      *  maps
514      *  to
515      *  
516      * 
517      * @param to the value of field 'to'.
518      */
519     public void setTo(int to)
520     {
521         this._to = to;
522         this._has_to = true;
523     } //-- void setTo(int) 
524
525     /**
526      * Method unmarshal
527      * 
528      * 
529      * 
530      * @param reader
531      * @return Map
532      */
533     public static org.vamsas.objects.core.Map unmarshal(java.io.Reader reader)
534         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
535     {
536         return (org.vamsas.objects.core.Map) Unmarshaller.unmarshal(org.vamsas.objects.core.Map.class, reader);
537     } //-- org.vamsas.objects.core.Map unmarshal(java.io.Reader) 
538
539     /**
540      * Method validate
541      * 
542      */
543     public void validate()
544         throws org.exolab.castor.xml.ValidationException
545     {
546         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
547         validator.validate(this);
548     } //-- void validate() 
549
550 }