05aec7733b738af565d76ab5b55445bb5264106e
[vamsas.git] / src / uk / ac / vamsas / objects / core / AnnotationElement.java
1 /*
2  * This class was automatically generated with 
3  * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
4  * Schema.
5  * $Id$
6  */
7
8 package uk.ac.vamsas.objects.core;
9
10   //---------------------------------/
11  //- Imported classes and packages -/
12 //---------------------------------/
13
14 import org.exolab.castor.xml.Marshaller;
15 import org.exolab.castor.xml.Unmarshaller;
16
17 /**
18  * Class AnnotationElement.
19  * 
20  * @version $Revision$ $Date$
21  */
22 public class AnnotationElement extends uk.ac.vamsas.client.Vobject 
23 implements java.io.Serializable
24 {
25
26
27       //--------------------------/
28      //- Class/Member Variables -/
29     //--------------------------/
30
31     /**
32      * position with respect to the coordinate frame defined by a
33      *  rangeType specification 
34      */
35     private long _position;
36
37     /**
38      * keeps track of state for field: _position
39      */
40     private boolean _has_position;
41
42     /**
43      * true means the annotation element appears between the
44      *  specified position and the next 
45      */
46     private boolean _after = false;
47
48     /**
49      * keeps track of state for field: _after
50      */
51     private boolean _has_after;
52
53     /**
54      * Primary Key for vamsas object referencing 
55      */
56     private java.lang.String _id;
57
58     /**
59      * Free text at this position 
60      */
61     private java.lang.String _description;
62
63     /**
64      * Discrete symbol - possibly graphically represented
65      *  
66      */
67     private java.util.Vector _glyphList;
68
69     /**
70      * Ordered set of float values - an application may treat
71      *  the values together as a vector with common support for a
72      * set of
73      *  annotation elements - but this is, again, not validated so
74      * applications
75      *  should deal gracefully with varying numbers of dimensions
76      *  
77      */
78     private java.util.Vector _valueList;
79
80
81       //----------------/
82      //- Constructors -/
83     //----------------/
84
85     public AnnotationElement() {
86         super();
87         this._glyphList = new java.util.Vector();
88         this._valueList = new java.util.Vector();
89     }
90
91
92       //-----------/
93      //- Methods -/
94     //-----------/
95
96     /**
97      * 
98      * 
99      * @param vGlyph
100      * @throws java.lang.IndexOutOfBoundsException if the index
101      * given is outside the bounds of the collection
102      */
103     public void addGlyph(
104             final uk.ac.vamsas.objects.core.Glyph vGlyph)
105     throws java.lang.IndexOutOfBoundsException {
106         this._glyphList.addElement(vGlyph);
107     }
108
109     /**
110      * 
111      * 
112      * @param index
113      * @param vGlyph
114      * @throws java.lang.IndexOutOfBoundsException if the index
115      * given is outside the bounds of the collection
116      */
117     public void addGlyph(
118             final int index,
119             final uk.ac.vamsas.objects.core.Glyph vGlyph)
120     throws java.lang.IndexOutOfBoundsException {
121         this._glyphList.add(index, vGlyph);
122     }
123
124     /**
125      * 
126      * 
127      * @param vValue
128      * @throws java.lang.IndexOutOfBoundsException if the index
129      * given is outside the bounds of the collection
130      */
131     public void addValue(
132             final float vValue)
133     throws java.lang.IndexOutOfBoundsException {
134         this._valueList.addElement(new java.lang.Float(vValue));
135     }
136
137     /**
138      * 
139      * 
140      * @param index
141      * @param vValue
142      * @throws java.lang.IndexOutOfBoundsException if the index
143      * given is outside the bounds of the collection
144      */
145     public void addValue(
146             final int index,
147             final float vValue)
148     throws java.lang.IndexOutOfBoundsException {
149         this._valueList.add(index, new java.lang.Float(vValue));
150     }
151
152     /**
153      */
154     public void deleteAfter(
155     ) {
156         this._has_after= false;
157     }
158
159     /**
160      */
161     public void deletePosition(
162     ) {
163         this._has_position= false;
164     }
165
166     /**
167      * Method enumerateGlyph.
168      * 
169      * @return an Enumeration over all
170      * uk.ac.vamsas.objects.core.Glyph elements
171      */
172     public java.util.Enumeration enumerateGlyph(
173     ) {
174         return this._glyphList.elements();
175     }
176
177     /**
178      * Method enumerateValue.
179      * 
180      * @return an Enumeration over all float elements
181      */
182     public java.util.Enumeration enumerateValue(
183     ) {
184         return this._valueList.elements();
185     }
186
187     /**
188      * Overrides the java.lang.Object.equals method.
189      * 
190      * @param obj
191      * @return true if the objects are equal.
192      */
193     public boolean equals(
194             final java.lang.Object obj) {
195         if ( this == obj )
196             return true;
197         
198         if (super.equals(obj)==false)
199             return false;
200         
201         if (obj instanceof AnnotationElement) {
202         
203             AnnotationElement temp = (AnnotationElement)obj;
204             boolean thcycle;
205             boolean tmcycle;
206             if (this._position != temp._position)
207                 return false;
208             if (this._has_position != temp._has_position)
209                 return false;
210             if (this._after != temp._after)
211                 return false;
212             if (this._has_after != temp._has_after)
213                 return false;
214             if (this._id != null) {
215                 if (temp._id == null) return false;
216                 if (this._id != temp._id) {
217                     thcycle=org.castor.util.CycleBreaker.startingToCycle(this._id);
218                     tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._id);
219                     if (thcycle!=tmcycle) {
220                         if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._id); };
221                         if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._id); };
222                         return false;
223                     }
224                     if (!thcycle) {
225                         if (!this._id.equals(temp._id)) {
226                             org.castor.util.CycleBreaker.releaseCycleHandle(this._id);
227                             org.castor.util.CycleBreaker.releaseCycleHandle(temp._id);
228                             return false;
229                         }
230                         org.castor.util.CycleBreaker.releaseCycleHandle(this._id);
231                         org.castor.util.CycleBreaker.releaseCycleHandle(temp._id);
232                     }
233                 }
234             } else if (temp._id != null)
235                 return false;
236             if (this._description != null) {
237                 if (temp._description == null) return false;
238                 if (this._description != temp._description) {
239                     thcycle=org.castor.util.CycleBreaker.startingToCycle(this._description);
240                     tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._description);
241                     if (thcycle!=tmcycle) {
242                         if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._description); };
243                         if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._description); };
244                         return false;
245                     }
246                     if (!thcycle) {
247                         if (!this._description.equals(temp._description)) {
248                             org.castor.util.CycleBreaker.releaseCycleHandle(this._description);
249                             org.castor.util.CycleBreaker.releaseCycleHandle(temp._description);
250                             return false;
251                         }
252                         org.castor.util.CycleBreaker.releaseCycleHandle(this._description);
253                         org.castor.util.CycleBreaker.releaseCycleHandle(temp._description);
254                     }
255                 }
256             } else if (temp._description != null)
257                 return false;
258             if (this._glyphList != null) {
259                 if (temp._glyphList == null) return false;
260                 if (this._glyphList != temp._glyphList) {
261                     thcycle=org.castor.util.CycleBreaker.startingToCycle(this._glyphList);
262                     tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._glyphList);
263                     if (thcycle!=tmcycle) {
264                         if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._glyphList); };
265                         if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._glyphList); };
266                         return false;
267                     }
268                     if (!thcycle) {
269                         if (!this._glyphList.equals(temp._glyphList)) {
270                             org.castor.util.CycleBreaker.releaseCycleHandle(this._glyphList);
271                             org.castor.util.CycleBreaker.releaseCycleHandle(temp._glyphList);
272                             return false;
273                         }
274                         org.castor.util.CycleBreaker.releaseCycleHandle(this._glyphList);
275                         org.castor.util.CycleBreaker.releaseCycleHandle(temp._glyphList);
276                     }
277                 }
278             } else if (temp._glyphList != null)
279                 return false;
280             if (this._valueList != null) {
281                 if (temp._valueList == null) return false;
282                 if (this._valueList != temp._valueList) {
283                     thcycle=org.castor.util.CycleBreaker.startingToCycle(this._valueList);
284                     tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._valueList);
285                     if (thcycle!=tmcycle) {
286                         if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._valueList); };
287                         if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._valueList); };
288                         return false;
289                     }
290                     if (!thcycle) {
291                         if (!this._valueList.equals(temp._valueList)) {
292                             org.castor.util.CycleBreaker.releaseCycleHandle(this._valueList);
293                             org.castor.util.CycleBreaker.releaseCycleHandle(temp._valueList);
294                             return false;
295                         }
296                         org.castor.util.CycleBreaker.releaseCycleHandle(this._valueList);
297                         org.castor.util.CycleBreaker.releaseCycleHandle(temp._valueList);
298                     }
299                 }
300             } else if (temp._valueList != null)
301                 return false;
302             return true;
303         }
304         return false;
305     }
306
307     /**
308      * Returns the value of field 'after'. The field 'after' has
309      * the following description: true means the annotation element
310      * appears between the
311      *  specified position and the next 
312      * 
313      * @return the value of field 'After'.
314      */
315     public boolean getAfter(
316     ) {
317         return this._after;
318     }
319
320     /**
321      * Returns the value of field 'description'. The field
322      * 'description' has the following description: Free text at
323      * this position 
324      * 
325      * @return the value of field 'Description'.
326      */
327     public java.lang.String getDescription(
328     ) {
329         return this._description;
330     }
331
332     /**
333      * Method getGlyph.
334      * 
335      * @param index
336      * @throws java.lang.IndexOutOfBoundsException if the index
337      * given is outside the bounds of the collection
338      * @return the value of the uk.ac.vamsas.objects.core.Glyph at
339      * the given index
340      */
341     public uk.ac.vamsas.objects.core.Glyph getGlyph(
342             final int index)
343     throws java.lang.IndexOutOfBoundsException {
344         // check bounds for index
345         if (index < 0 || index >= this._glyphList.size()) {
346             throw new IndexOutOfBoundsException("getGlyph: Index value '" + index + "' not in range [0.." + (this._glyphList.size() - 1) + "]");
347         }
348         
349         return (uk.ac.vamsas.objects.core.Glyph) _glyphList.get(index);
350     }
351
352     /**
353      * Method getGlyph.Returns the contents of the collection in an
354      * Array.  <p>Note:  Just in case the collection contents are
355      * changing in another thread, we pass a 0-length Array of the
356      * correct type into the API call.  This way we <i>know</i>
357      * that the Array returned is of exactly the correct length.
358      * 
359      * @return this collection as an Array
360      */
361     public uk.ac.vamsas.objects.core.Glyph[] getGlyph(
362     ) {
363         uk.ac.vamsas.objects.core.Glyph[] array = new uk.ac.vamsas.objects.core.Glyph[0];
364         return (uk.ac.vamsas.objects.core.Glyph[]) this._glyphList.toArray(array);
365     }
366
367     /**
368      * Method getGlyphAsReference.Returns a reference to
369      * '_glyphList'. No type checking is performed on any
370      * modifications to the Vector.
371      * 
372      * @return a reference to the Vector backing this class
373      */
374     public java.util.Vector getGlyphAsReference(
375     ) {
376         return this._glyphList;
377     }
378
379     /**
380      * Method getGlyphCount.
381      * 
382      * @return the size of this collection
383      */
384     public int getGlyphCount(
385     ) {
386         return this._glyphList.size();
387     }
388
389     /**
390      * Returns the value of field 'id'. The field 'id' has the
391      * following description: Primary Key for vamsas object
392      * referencing 
393      * 
394      * @return the value of field 'Id'.
395      */
396     public java.lang.String getId(
397     ) {
398         return this._id;
399     }
400
401     /**
402      * Returns the value of field 'position'. The field 'position'
403      * has the following description: position with respect to the
404      * coordinate frame defined by a
405      *  rangeType specification 
406      * 
407      * @return the value of field 'Position'.
408      */
409     public long getPosition(
410     ) {
411         return this._position;
412     }
413
414     /**
415      * Method getValue.
416      * 
417      * @param index
418      * @throws java.lang.IndexOutOfBoundsException if the index
419      * given is outside the bounds of the collection
420      * @return the value of the float at the given index
421      */
422     public float getValue(
423             final int index)
424     throws java.lang.IndexOutOfBoundsException {
425         // check bounds for index
426         if (index < 0 || index >= this._valueList.size()) {
427             throw new IndexOutOfBoundsException("getValue: Index value '" + index + "' not in range [0.." + (this._valueList.size() - 1) + "]");
428         }
429         
430         return ((java.lang.Float) _valueList.get(index)).floatValue();
431     }
432
433     /**
434      * Method getValue.Returns the contents of the collection in an
435      * Array.  
436      * 
437      * @return this collection as an Array
438      */
439     public float[] getValue(
440     ) {
441         int size = this._valueList.size();
442         float[] array = new float[size];
443         java.util.Iterator iter = _valueList.iterator();
444         for (int index = 0; index < size; index++) {
445             array[index] = ((java.lang.Float) iter.next()).floatValue();
446         }
447         return array;
448     }
449
450     /**
451      * Method getValueAsReference.Returns a reference to
452      * '_valueList'. No type checking is performed on any
453      * modifications to the Vector.
454      * 
455      * @return a reference to the Vector backing this class
456      */
457     public java.util.Vector getValueAsReference(
458     ) {
459         return this._valueList;
460     }
461
462     /**
463      * Method getValueCount.
464      * 
465      * @return the size of this collection
466      */
467     public int getValueCount(
468     ) {
469         return this._valueList.size();
470     }
471
472     /**
473      * Method hasAfter.
474      * 
475      * @return true if at least one After has been added
476      */
477     public boolean hasAfter(
478     ) {
479         return this._has_after;
480     }
481
482     /**
483      * Method hasPosition.
484      * 
485      * @return true if at least one Position has been added
486      */
487     public boolean hasPosition(
488     ) {
489         return this._has_position;
490     }
491
492     /**
493      * Overrides the java.lang.Object.hashCode method.
494      * <p>
495      * The following steps came from <b>Effective Java Programming
496      * Language Guide</b> by Joshua Bloch, Chapter 3
497      * 
498      * @return a hash code value for the object.
499      */
500     public int hashCode(
501     ) {
502         int result = super.hashCode();
503         
504         long tmp;
505         result = 37 * result + (int)(_position^(_position>>>32));
506         result = 37 * result + (_after?0:1);
507         if (_id != null
508             && !org.castor.util.CycleBreaker.startingToCycle(_id)) {
509            result = 37 * result + _id.hashCode();
510            org.castor.util.CycleBreaker.releaseCycleHandle(_id);
511         }
512         if (_description != null
513             && !org.castor.util.CycleBreaker.startingToCycle(_description)) {
514            result = 37 * result + _description.hashCode();
515            org.castor.util.CycleBreaker.releaseCycleHandle(_description);
516         }
517         if (_glyphList != null
518             && !org.castor.util.CycleBreaker.startingToCycle(_glyphList)) {
519            result = 37 * result + _glyphList.hashCode();
520            org.castor.util.CycleBreaker.releaseCycleHandle(_glyphList);
521         }
522         if (_valueList != null
523             && !org.castor.util.CycleBreaker.startingToCycle(_valueList)) {
524            result = 37 * result + _valueList.hashCode();
525            org.castor.util.CycleBreaker.releaseCycleHandle(_valueList);
526         }
527         
528         return result;
529     }
530
531     /**
532      * Returns the value of field 'after'. The field 'after' has
533      * the following description: true means the annotation element
534      * appears between the
535      *  specified position and the next 
536      * 
537      * @return the value of field 'After'.
538      */
539     public boolean isAfter(
540     ) {
541         return this._after;
542     }
543
544     /**
545      * Method isValid.
546      * 
547      * @return true if this object is valid according to the schema
548      */
549     public boolean isValid(
550     ) {
551         try {
552             validate();
553         } catch (org.exolab.castor.xml.ValidationException vex) {
554             return false;
555         }
556         return true;
557     }
558
559     /**
560      * 
561      * 
562      * @param out
563      * @throws org.exolab.castor.xml.MarshalException if object is
564      * null or if any SAXException is thrown during marshaling
565      * @throws org.exolab.castor.xml.ValidationException if this
566      * object is an invalid instance according to the schema
567      */
568     public void marshal(
569             final java.io.Writer out)
570     throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
571         Marshaller.marshal(this, out);
572     }
573
574     /**
575      * 
576      * 
577      * @param handler
578      * @throws java.io.IOException if an IOException occurs during
579      * marshaling
580      * @throws org.exolab.castor.xml.ValidationException if this
581      * object is an invalid instance according to the schema
582      * @throws org.exolab.castor.xml.MarshalException if object is
583      * null or if any SAXException is thrown during marshaling
584      */
585     public void marshal(
586             final org.xml.sax.ContentHandler handler)
587     throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
588         Marshaller.marshal(this, handler);
589     }
590
591     /**
592      */
593     public void removeAllGlyph(
594     ) {
595         this._glyphList.clear();
596     }
597
598     /**
599      */
600     public void removeAllValue(
601     ) {
602         this._valueList.clear();
603     }
604
605     /**
606      * Method removeGlyph.
607      * 
608      * @param vGlyph
609      * @return true if the object was removed from the collection.
610      */
611     public boolean removeGlyph(
612             final uk.ac.vamsas.objects.core.Glyph vGlyph) {
613         boolean removed = _glyphList.remove(vGlyph);
614         return removed;
615     }
616
617     /**
618      * Method removeGlyphAt.
619      * 
620      * @param index
621      * @return the element removed from the collection
622      */
623     public uk.ac.vamsas.objects.core.Glyph removeGlyphAt(
624             final int index) {
625         java.lang.Object obj = this._glyphList.remove(index);
626         return (uk.ac.vamsas.objects.core.Glyph) obj;
627     }
628
629     /**
630      * Method removeValue.
631      * 
632      * @param vValue
633      * @return true if the object was removed from the collection.
634      */
635     public boolean removeValue(
636             final float vValue) {
637         boolean removed = _valueList.remove(new java.lang.Float(vValue));
638         return removed;
639     }
640
641     /**
642      * Method removeValueAt.
643      * 
644      * @param index
645      * @return the element removed from the collection
646      */
647     public float removeValueAt(
648             final int index) {
649         java.lang.Object obj = this._valueList.remove(index);
650         return ((java.lang.Float) obj).floatValue();
651     }
652
653     /**
654      * Sets the value of field 'after'. The field 'after' has the
655      * following description: true means the annotation element
656      * appears between the
657      *  specified position and the next 
658      * 
659      * @param after the value of field 'after'.
660      */
661     public void setAfter(
662             final boolean after) {
663         this._after = after;
664         this._has_after = true;
665     }
666
667     /**
668      * Sets the value of field 'description'. The field
669      * 'description' has the following description: Free text at
670      * this position 
671      * 
672      * @param description the value of field 'description'.
673      */
674     public void setDescription(
675             final java.lang.String description) {
676         this._description = description;
677     }
678
679     /**
680      * 
681      * 
682      * @param index
683      * @param vGlyph
684      * @throws java.lang.IndexOutOfBoundsException if the index
685      * given is outside the bounds of the collection
686      */
687     public void setGlyph(
688             final int index,
689             final uk.ac.vamsas.objects.core.Glyph vGlyph)
690     throws java.lang.IndexOutOfBoundsException {
691         // check bounds for index
692         if (index < 0 || index >= this._glyphList.size()) {
693             throw new IndexOutOfBoundsException("setGlyph: Index value '" + index + "' not in range [0.." + (this._glyphList.size() - 1) + "]");
694         }
695         
696         this._glyphList.set(index, vGlyph);
697     }
698
699     /**
700      * 
701      * 
702      * @param vGlyphArray
703      */
704     public void setGlyph(
705             final uk.ac.vamsas.objects.core.Glyph[] vGlyphArray) {
706         //-- copy array
707         _glyphList.clear();
708         
709         for (int i = 0; i < vGlyphArray.length; i++) {
710                 this._glyphList.add(vGlyphArray[i]);
711         }
712     }
713
714     /**
715      * Sets the value of '_glyphList' by copying the given Vector.
716      * All elements will be checked for type safety.
717      * 
718      * @param vGlyphList the Vector to copy.
719      */
720     public void setGlyph(
721             final java.util.Vector vGlyphList) {
722         // copy vector
723         this._glyphList.clear();
724         
725         this._glyphList.addAll(vGlyphList);
726     }
727
728     /**
729      * Sets the value of '_glyphList' by setting it to the given
730      * Vector. No type checking is performed.
731      * @deprecated
732      * 
733      * @param glyphVector the Vector to set.
734      */
735     public void setGlyphAsReference(
736             final java.util.Vector glyphVector) {
737         this._glyphList = glyphVector;
738     }
739
740     /**
741      * Sets the value of field 'id'. The field 'id' has the
742      * following description: Primary Key for vamsas object
743      * referencing 
744      * 
745      * @param id the value of field 'id'.
746      */
747     public void setId(
748             final java.lang.String id) {
749         this._id = id;
750     }
751
752     /**
753      * Sets the value of field 'position'. The field 'position' has
754      * the following description: position with respect to the
755      * coordinate frame defined by a
756      *  rangeType specification 
757      * 
758      * @param position the value of field 'position'.
759      */
760     public void setPosition(
761             final long position) {
762         this._position = position;
763         this._has_position = true;
764     }
765
766     /**
767      * 
768      * 
769      * @param index
770      * @param vValue
771      * @throws java.lang.IndexOutOfBoundsException if the index
772      * given is outside the bounds of the collection
773      */
774     public void setValue(
775             final int index,
776             final float vValue)
777     throws java.lang.IndexOutOfBoundsException {
778         // check bounds for index
779         if (index < 0 || index >= this._valueList.size()) {
780             throw new IndexOutOfBoundsException("setValue: Index value '" + index + "' not in range [0.." + (this._valueList.size() - 1) + "]");
781         }
782         
783         this._valueList.set(index, new java.lang.Float(vValue));
784     }
785
786     /**
787      * 
788      * 
789      * @param vValueArray
790      */
791     public void setValue(
792             final float[] vValueArray) {
793         //-- copy array
794         _valueList.clear();
795         
796         for (int i = 0; i < vValueArray.length; i++) {
797                 this._valueList.add(new java.lang.Float(vValueArray[i]));
798         }
799     }
800
801     /**
802      * Sets the value of '_valueList' by copying the given Vector.
803      * All elements will be checked for type safety.
804      * 
805      * @param vValueList the Vector to copy.
806      */
807     public void setValue(
808             final java.util.Vector vValueList) {
809         // copy vector
810         this._valueList.clear();
811         
812         this._valueList.addAll(vValueList);
813     }
814
815     /**
816      * Sets the value of '_valueList' by setting it to the given
817      * Vector. No type checking is performed.
818      * @deprecated
819      * 
820      * @param valueVector the Vector to set.
821      */
822     public void setValueAsReference(
823             final java.util.Vector valueVector) {
824         this._valueList = valueVector;
825     }
826
827     /**
828      * Method unmarshal.
829      * 
830      * @param reader
831      * @throws org.exolab.castor.xml.MarshalException if object is
832      * null or if any SAXException is thrown during marshaling
833      * @throws org.exolab.castor.xml.ValidationException if this
834      * object is an invalid instance according to the schema
835      * @return the unmarshaled
836      * uk.ac.vamsas.objects.core.AnnotationElement
837      */
838     public static uk.ac.vamsas.objects.core.AnnotationElement unmarshal(
839             final java.io.Reader reader)
840     throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
841         return (uk.ac.vamsas.objects.core.AnnotationElement) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.AnnotationElement.class, reader);
842     }
843
844     /**
845      * 
846      * 
847      * @throws org.exolab.castor.xml.ValidationException if this
848      * object is an invalid instance according to the schema
849      */
850     public void validate(
851     )
852     throws org.exolab.castor.xml.ValidationException {
853         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
854         validator.validate(this);
855     }
856
857 }