2 * This class was automatically generated with
3 * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
8 package uk.ac.vamsas.objects.core;
10 //---------------------------------/
11 //- Imported classes and packages -/
12 //---------------------------------/
14 import org.exolab.castor.xml.Marshaller;
15 import org.exolab.castor.xml.Unmarshaller;
20 * @version $Revision$ $Date$
22 public class DataSet extends uk.ac.vamsas.client.Vobject
23 implements java.io.Serializable
27 //--------------------------/
28 //- Class/Member Variables -/
29 //--------------------------/
32 * Primary Key for vamsas object referencing
34 private java.lang.String _id;
37 * Field _sequenceList.
39 private java.util.Vector _sequenceList;
42 * Field _dataSetAnnotationsList.
44 private java.util.Vector _dataSetAnnotationsList;
47 * Field _alignmentList.
49 private java.util.Vector _alignmentList;
54 private java.util.Vector _treeList;
59 private uk.ac.vamsas.objects.core.Provenance _provenance;
68 this._sequenceList = new java.util.Vector();
69 this._dataSetAnnotationsList = new java.util.Vector();
70 this._alignmentList = new java.util.Vector();
71 this._treeList = new java.util.Vector();
83 * @throws java.lang.IndexOutOfBoundsException if the index
84 * given is outside the bounds of the collection
86 public void addAlignment(
87 final uk.ac.vamsas.objects.core.Alignment vAlignment)
88 throws java.lang.IndexOutOfBoundsException {
89 this._alignmentList.addElement(vAlignment);
97 * @throws java.lang.IndexOutOfBoundsException if the index
98 * given is outside the bounds of the collection
100 public void addAlignment(
102 final uk.ac.vamsas.objects.core.Alignment vAlignment)
103 throws java.lang.IndexOutOfBoundsException {
104 this._alignmentList.add(index, vAlignment);
110 * @param vDataSetAnnotations
111 * @throws java.lang.IndexOutOfBoundsException if the index
112 * given is outside the bounds of the collection
114 public void addDataSetAnnotations(
115 final uk.ac.vamsas.objects.core.DataSetAnnotations vDataSetAnnotations)
116 throws java.lang.IndexOutOfBoundsException {
117 this._dataSetAnnotationsList.addElement(vDataSetAnnotations);
124 * @param vDataSetAnnotations
125 * @throws java.lang.IndexOutOfBoundsException if the index
126 * given is outside the bounds of the collection
128 public void addDataSetAnnotations(
130 final uk.ac.vamsas.objects.core.DataSetAnnotations vDataSetAnnotations)
131 throws java.lang.IndexOutOfBoundsException {
132 this._dataSetAnnotationsList.add(index, vDataSetAnnotations);
139 * @throws java.lang.IndexOutOfBoundsException if the index
140 * given is outside the bounds of the collection
142 public void addSequence(
143 final uk.ac.vamsas.objects.core.Sequence vSequence)
144 throws java.lang.IndexOutOfBoundsException {
145 this._sequenceList.addElement(vSequence);
153 * @throws java.lang.IndexOutOfBoundsException if the index
154 * given is outside the bounds of the collection
156 public void addSequence(
158 final uk.ac.vamsas.objects.core.Sequence vSequence)
159 throws java.lang.IndexOutOfBoundsException {
160 this._sequenceList.add(index, vSequence);
167 * @throws java.lang.IndexOutOfBoundsException if the index
168 * given is outside the bounds of the collection
171 final uk.ac.vamsas.objects.core.Tree vTree)
172 throws java.lang.IndexOutOfBoundsException {
173 this._treeList.addElement(vTree);
181 * @throws java.lang.IndexOutOfBoundsException if the index
182 * given is outside the bounds of the collection
186 final uk.ac.vamsas.objects.core.Tree vTree)
187 throws java.lang.IndexOutOfBoundsException {
188 this._treeList.add(index, vTree);
192 * Method enumerateAlignment.
194 * @return an Enumeration over all
195 * uk.ac.vamsas.objects.core.Alignment elements
197 public java.util.Enumeration enumerateAlignment(
199 return this._alignmentList.elements();
203 * Method enumerateDataSetAnnotations.
205 * @return an Enumeration over all
206 * uk.ac.vamsas.objects.core.DataSetAnnotations elements
208 public java.util.Enumeration enumerateDataSetAnnotations(
210 return this._dataSetAnnotationsList.elements();
214 * Method enumerateSequence.
216 * @return an Enumeration over all
217 * uk.ac.vamsas.objects.core.Sequence elements
219 public java.util.Enumeration enumerateSequence(
221 return this._sequenceList.elements();
225 * Method enumerateTree.
227 * @return an Enumeration over all
228 * uk.ac.vamsas.objects.core.Tree elements
230 public java.util.Enumeration enumerateTree(
232 return this._treeList.elements();
236 * Overrides the java.lang.Object.equals method.
239 * @return true if the objects are equal.
241 public boolean equals(
242 final java.lang.Object obj) {
246 if (super.equals(obj)==false)
249 if (obj instanceof DataSet) {
251 DataSet temp = (DataSet)obj;
252 if (this._id != null) {
253 if (temp._id == null) return false;
254 else if (!(this._id.equals(temp._id)))
257 else if (temp._id != null)
259 if (this._sequenceList != null) {
260 if (temp._sequenceList == null) return false;
261 else if (!(this._sequenceList.equals(temp._sequenceList)))
264 else if (temp._sequenceList != null)
266 if (this._dataSetAnnotationsList != null) {
267 if (temp._dataSetAnnotationsList == null) return false;
268 else if (!(this._dataSetAnnotationsList.equals(temp._dataSetAnnotationsList)))
271 else if (temp._dataSetAnnotationsList != null)
273 if (this._alignmentList != null) {
274 if (temp._alignmentList == null) return false;
275 else if (!(this._alignmentList.equals(temp._alignmentList)))
278 else if (temp._alignmentList != null)
280 if (this._treeList != null) {
281 if (temp._treeList == null) return false;
282 else if (!(this._treeList.equals(temp._treeList)))
285 else if (temp._treeList != null)
287 if (this._provenance != null) {
288 if (temp._provenance == null) return false;
289 else if (!(this._provenance.equals(temp._provenance)))
292 else if (temp._provenance != null)
300 * Method getAlignment.
303 * @throws java.lang.IndexOutOfBoundsException if the index
304 * given is outside the bounds of the collection
305 * @return the value of the uk.ac.vamsas.objects.core.Alignment
308 public uk.ac.vamsas.objects.core.Alignment getAlignment(
310 throws java.lang.IndexOutOfBoundsException {
311 // check bounds for index
312 if (index < 0 || index >= this._alignmentList.size()) {
313 throw new IndexOutOfBoundsException("getAlignment: Index value '" + index + "' not in range [0.." + (this._alignmentList.size() - 1) + "]");
316 return (uk.ac.vamsas.objects.core.Alignment) _alignmentList.get(index);
320 * Method getAlignment.Returns the contents of the collection
321 * in an Array. <p>Note: Just in case the collection contents
322 * are changing in another thread, we pass a 0-length Array of
323 * the correct type into the API call. This way we <i>know</i>
324 * that the Array returned is of exactly the correct length.
326 * @return this collection as an Array
328 public uk.ac.vamsas.objects.core.Alignment[] getAlignment(
330 uk.ac.vamsas.objects.core.Alignment[] array = new uk.ac.vamsas.objects.core.Alignment[0];
331 return (uk.ac.vamsas.objects.core.Alignment[]) this._alignmentList.toArray(array);
335 * Method getAlignmentAsReference.Returns a reference to
336 * '_alignmentList'. No type checking is performed on any
337 * modifications to the Vector.
339 * @return a reference to the Vector backing this class
341 public java.util.Vector getAlignmentAsReference(
343 return this._alignmentList;
347 * Method getAlignmentCount.
349 * @return the size of this collection
351 public int getAlignmentCount(
353 return this._alignmentList.size();
357 * Method getDataSetAnnotations.
360 * @throws java.lang.IndexOutOfBoundsException if the index
361 * given is outside the bounds of the collection
362 * @return the value of the
363 * uk.ac.vamsas.objects.core.DataSetAnnotations at the given
366 public uk.ac.vamsas.objects.core.DataSetAnnotations getDataSetAnnotations(
368 throws java.lang.IndexOutOfBoundsException {
369 // check bounds for index
370 if (index < 0 || index >= this._dataSetAnnotationsList.size()) {
371 throw new IndexOutOfBoundsException("getDataSetAnnotations: Index value '" + index + "' not in range [0.." + (this._dataSetAnnotationsList.size() - 1) + "]");
374 return (uk.ac.vamsas.objects.core.DataSetAnnotations) _dataSetAnnotationsList.get(index);
378 * Method getDataSetAnnotations.Returns the contents of the
379 * collection in an Array. <p>Note: Just in case the
380 * collection contents are changing in another thread, we pass
381 * a 0-length Array of the correct type into the API call.
382 * This way we <i>know</i> that the Array returned is of
383 * exactly the correct length.
385 * @return this collection as an Array
387 public uk.ac.vamsas.objects.core.DataSetAnnotations[] getDataSetAnnotations(
389 uk.ac.vamsas.objects.core.DataSetAnnotations[] array = new uk.ac.vamsas.objects.core.DataSetAnnotations[0];
390 return (uk.ac.vamsas.objects.core.DataSetAnnotations[]) this._dataSetAnnotationsList.toArray(array);
394 * Method getDataSetAnnotationsAsReference.Returns a reference
395 * to '_dataSetAnnotationsList'. No type checking is performed
396 * on any modifications to the Vector.
398 * @return a reference to the Vector backing this class
400 public java.util.Vector getDataSetAnnotationsAsReference(
402 return this._dataSetAnnotationsList;
406 * Method getDataSetAnnotationsCount.
408 * @return the size of this collection
410 public int getDataSetAnnotationsCount(
412 return this._dataSetAnnotationsList.size();
416 * Returns the value of field 'id'. The field 'id' has the
417 * following description: Primary Key for vamsas object
420 * @return the value of field 'Id'.
422 public java.lang.String getId(
428 * Returns the value of field 'provenance'.
430 * @return the value of field 'Provenance'.
432 public uk.ac.vamsas.objects.core.Provenance getProvenance(
434 return this._provenance;
438 * Method getSequence.
441 * @throws java.lang.IndexOutOfBoundsException if the index
442 * given is outside the bounds of the collection
443 * @return the value of the uk.ac.vamsas.objects.core.Sequence
446 public uk.ac.vamsas.objects.core.Sequence getSequence(
448 throws java.lang.IndexOutOfBoundsException {
449 // check bounds for index
450 if (index < 0 || index >= this._sequenceList.size()) {
451 throw new IndexOutOfBoundsException("getSequence: Index value '" + index + "' not in range [0.." + (this._sequenceList.size() - 1) + "]");
454 return (uk.ac.vamsas.objects.core.Sequence) _sequenceList.get(index);
458 * Method getSequence.Returns the contents of the collection in
459 * an Array. <p>Note: Just in case the collection contents
460 * are changing in another thread, we pass a 0-length Array of
461 * the correct type into the API call. This way we <i>know</i>
462 * that the Array returned is of exactly the correct length.
464 * @return this collection as an Array
466 public uk.ac.vamsas.objects.core.Sequence[] getSequence(
468 uk.ac.vamsas.objects.core.Sequence[] array = new uk.ac.vamsas.objects.core.Sequence[0];
469 return (uk.ac.vamsas.objects.core.Sequence[]) this._sequenceList.toArray(array);
473 * Method getSequenceAsReference.Returns a reference to
474 * '_sequenceList'. No type checking is performed on any
475 * modifications to the Vector.
477 * @return a reference to the Vector backing this class
479 public java.util.Vector getSequenceAsReference(
481 return this._sequenceList;
485 * Method getSequenceCount.
487 * @return the size of this collection
489 public int getSequenceCount(
491 return this._sequenceList.size();
498 * @throws java.lang.IndexOutOfBoundsException if the index
499 * given is outside the bounds of the collection
500 * @return the value of the uk.ac.vamsas.objects.core.Tree at
503 public uk.ac.vamsas.objects.core.Tree getTree(
505 throws java.lang.IndexOutOfBoundsException {
506 // check bounds for index
507 if (index < 0 || index >= this._treeList.size()) {
508 throw new IndexOutOfBoundsException("getTree: Index value '" + index + "' not in range [0.." + (this._treeList.size() - 1) + "]");
511 return (uk.ac.vamsas.objects.core.Tree) _treeList.get(index);
515 * Method getTree.Returns the contents of the collection in an
516 * Array. <p>Note: Just in case the collection contents are
517 * changing in another thread, we pass a 0-length Array of the
518 * correct type into the API call. This way we <i>know</i>
519 * that the Array returned is of exactly the correct length.
521 * @return this collection as an Array
523 public uk.ac.vamsas.objects.core.Tree[] getTree(
525 uk.ac.vamsas.objects.core.Tree[] array = new uk.ac.vamsas.objects.core.Tree[0];
526 return (uk.ac.vamsas.objects.core.Tree[]) this._treeList.toArray(array);
530 * Method getTreeAsReference.Returns a reference to
531 * '_treeList'. No type checking is performed on any
532 * modifications to the Vector.
534 * @return a reference to the Vector backing this class
536 public java.util.Vector getTreeAsReference(
538 return this._treeList;
542 * Method getTreeCount.
544 * @return the size of this collection
546 public int getTreeCount(
548 return this._treeList.size();
552 * Overrides the java.lang.Object.hashCode method.
554 * The following steps came from <b>Effective Java Programming
555 * Language Guide</b> by Joshua Bloch, Chapter 3
557 * @return a hash code value for the object.
561 int result = super.hashCode();
565 result = 37 * result + _id.hashCode();
567 if (_sequenceList != null) {
568 result = 37 * result + _sequenceList.hashCode();
570 if (_dataSetAnnotationsList != null) {
571 result = 37 * result + _dataSetAnnotationsList.hashCode();
573 if (_alignmentList != null) {
574 result = 37 * result + _alignmentList.hashCode();
576 if (_treeList != null) {
577 result = 37 * result + _treeList.hashCode();
579 if (_provenance != null) {
580 result = 37 * result + _provenance.hashCode();
589 * @return true if this object is valid according to the schema
591 public boolean isValid(
595 } catch (org.exolab.castor.xml.ValidationException vex) {
605 * @throws org.exolab.castor.xml.MarshalException if object is
606 * null or if any SAXException is thrown during marshaling
607 * @throws org.exolab.castor.xml.ValidationException if this
608 * object is an invalid instance according to the schema
611 final java.io.Writer out)
612 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
613 Marshaller.marshal(this, out);
620 * @throws java.io.IOException if an IOException occurs during
622 * @throws org.exolab.castor.xml.ValidationException if this
623 * object is an invalid instance according to the schema
624 * @throws org.exolab.castor.xml.MarshalException if object is
625 * null or if any SAXException is thrown during marshaling
628 final org.xml.sax.ContentHandler handler)
629 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
630 Marshaller.marshal(this, handler);
634 * Method removeAlignment.
637 * @return true if the object was removed from the collection.
639 public boolean removeAlignment(
640 final uk.ac.vamsas.objects.core.Alignment vAlignment) {
641 boolean removed = _alignmentList.remove(vAlignment);
646 * Method removeAlignmentAt.
649 * @return the element removed from the collection
651 public uk.ac.vamsas.objects.core.Alignment removeAlignmentAt(
653 java.lang.Object obj = this._alignmentList.remove(index);
654 return (uk.ac.vamsas.objects.core.Alignment) obj;
659 public void removeAllAlignment(
661 this._alignmentList.clear();
666 public void removeAllDataSetAnnotations(
668 this._dataSetAnnotationsList.clear();
673 public void removeAllSequence(
675 this._sequenceList.clear();
680 public void removeAllTree(
682 this._treeList.clear();
686 * Method removeDataSetAnnotations.
688 * @param vDataSetAnnotations
689 * @return true if the object was removed from the collection.
691 public boolean removeDataSetAnnotations(
692 final uk.ac.vamsas.objects.core.DataSetAnnotations vDataSetAnnotations) {
693 boolean removed = _dataSetAnnotationsList.remove(vDataSetAnnotations);
698 * Method removeDataSetAnnotationsAt.
701 * @return the element removed from the collection
703 public uk.ac.vamsas.objects.core.DataSetAnnotations removeDataSetAnnotationsAt(
705 java.lang.Object obj = this._dataSetAnnotationsList.remove(index);
706 return (uk.ac.vamsas.objects.core.DataSetAnnotations) obj;
710 * Method removeSequence.
713 * @return true if the object was removed from the collection.
715 public boolean removeSequence(
716 final uk.ac.vamsas.objects.core.Sequence vSequence) {
717 boolean removed = _sequenceList.remove(vSequence);
722 * Method removeSequenceAt.
725 * @return the element removed from the collection
727 public uk.ac.vamsas.objects.core.Sequence removeSequenceAt(
729 java.lang.Object obj = this._sequenceList.remove(index);
730 return (uk.ac.vamsas.objects.core.Sequence) obj;
737 * @return true if the object was removed from the collection.
739 public boolean removeTree(
740 final uk.ac.vamsas.objects.core.Tree vTree) {
741 boolean removed = _treeList.remove(vTree);
746 * Method removeTreeAt.
749 * @return the element removed from the collection
751 public uk.ac.vamsas.objects.core.Tree removeTreeAt(
753 java.lang.Object obj = this._treeList.remove(index);
754 return (uk.ac.vamsas.objects.core.Tree) obj;
762 * @throws java.lang.IndexOutOfBoundsException if the index
763 * given is outside the bounds of the collection
765 public void setAlignment(
767 final uk.ac.vamsas.objects.core.Alignment vAlignment)
768 throws java.lang.IndexOutOfBoundsException {
769 // check bounds for index
770 if (index < 0 || index >= this._alignmentList.size()) {
771 throw new IndexOutOfBoundsException("setAlignment: Index value '" + index + "' not in range [0.." + (this._alignmentList.size() - 1) + "]");
774 this._alignmentList.set(index, vAlignment);
780 * @param vAlignmentArray
782 public void setAlignment(
783 final uk.ac.vamsas.objects.core.Alignment[] vAlignmentArray) {
785 _alignmentList.clear();
787 for (int i = 0; i < vAlignmentArray.length; i++) {
788 this._alignmentList.add(vAlignmentArray[i]);
793 * Sets the value of '_alignmentList' by copying the given
794 * Vector. All elements will be checked for type safety.
796 * @param vAlignmentList the Vector to copy.
798 public void setAlignment(
799 final java.util.Vector vAlignmentList) {
801 this._alignmentList.clear();
803 this._alignmentList.addAll(vAlignmentList);
807 * Sets the value of '_alignmentList' by setting it to the
808 * given Vector. No type checking is performed.
811 * @param alignmentVector the Vector to set.
813 public void setAlignmentAsReference(
814 final java.util.Vector alignmentVector) {
815 this._alignmentList = alignmentVector;
822 * @param vDataSetAnnotations
823 * @throws java.lang.IndexOutOfBoundsException if the index
824 * given is outside the bounds of the collection
826 public void setDataSetAnnotations(
828 final uk.ac.vamsas.objects.core.DataSetAnnotations vDataSetAnnotations)
829 throws java.lang.IndexOutOfBoundsException {
830 // check bounds for index
831 if (index < 0 || index >= this._dataSetAnnotationsList.size()) {
832 throw new IndexOutOfBoundsException("setDataSetAnnotations: Index value '" + index + "' not in range [0.." + (this._dataSetAnnotationsList.size() - 1) + "]");
835 this._dataSetAnnotationsList.set(index, vDataSetAnnotations);
841 * @param vDataSetAnnotationsArray
843 public void setDataSetAnnotations(
844 final uk.ac.vamsas.objects.core.DataSetAnnotations[] vDataSetAnnotationsArray) {
846 _dataSetAnnotationsList.clear();
848 for (int i = 0; i < vDataSetAnnotationsArray.length; i++) {
849 this._dataSetAnnotationsList.add(vDataSetAnnotationsArray[i]);
854 * Sets the value of '_dataSetAnnotationsList' by copying the
855 * given Vector. All elements will be checked for type safety.
857 * @param vDataSetAnnotationsList the Vector to copy.
859 public void setDataSetAnnotations(
860 final java.util.Vector vDataSetAnnotationsList) {
862 this._dataSetAnnotationsList.clear();
864 this._dataSetAnnotationsList.addAll(vDataSetAnnotationsList);
868 * Sets the value of '_dataSetAnnotationsList' by setting it to
869 * the given Vector. No type checking is performed.
872 * @param dataSetAnnotationsVector the Vector to set.
874 public void setDataSetAnnotationsAsReference(
875 final java.util.Vector dataSetAnnotationsVector) {
876 this._dataSetAnnotationsList = dataSetAnnotationsVector;
880 * Sets the value of field 'id'. The field 'id' has the
881 * following description: Primary Key for vamsas object
884 * @param id the value of field 'id'.
887 final java.lang.String id) {
892 * Sets the value of field 'provenance'.
894 * @param provenance the value of field 'provenance'.
896 public void setProvenance(
897 final uk.ac.vamsas.objects.core.Provenance provenance) {
898 this._provenance = provenance;
906 * @throws java.lang.IndexOutOfBoundsException if the index
907 * given is outside the bounds of the collection
909 public void setSequence(
911 final uk.ac.vamsas.objects.core.Sequence vSequence)
912 throws java.lang.IndexOutOfBoundsException {
913 // check bounds for index
914 if (index < 0 || index >= this._sequenceList.size()) {
915 throw new IndexOutOfBoundsException("setSequence: Index value '" + index + "' not in range [0.." + (this._sequenceList.size() - 1) + "]");
918 this._sequenceList.set(index, vSequence);
924 * @param vSequenceArray
926 public void setSequence(
927 final uk.ac.vamsas.objects.core.Sequence[] vSequenceArray) {
929 _sequenceList.clear();
931 for (int i = 0; i < vSequenceArray.length; i++) {
932 this._sequenceList.add(vSequenceArray[i]);
937 * Sets the value of '_sequenceList' by copying the given
938 * Vector. All elements will be checked for type safety.
940 * @param vSequenceList the Vector to copy.
942 public void setSequence(
943 final java.util.Vector vSequenceList) {
945 this._sequenceList.clear();
947 this._sequenceList.addAll(vSequenceList);
951 * Sets the value of '_sequenceList' by setting it to the given
952 * Vector. No type checking is performed.
955 * @param sequenceVector the Vector to set.
957 public void setSequenceAsReference(
958 final java.util.Vector sequenceVector) {
959 this._sequenceList = sequenceVector;
967 * @throws java.lang.IndexOutOfBoundsException if the index
968 * given is outside the bounds of the collection
972 final uk.ac.vamsas.objects.core.Tree vTree)
973 throws java.lang.IndexOutOfBoundsException {
974 // check bounds for index
975 if (index < 0 || index >= this._treeList.size()) {
976 throw new IndexOutOfBoundsException("setTree: Index value '" + index + "' not in range [0.." + (this._treeList.size() - 1) + "]");
979 this._treeList.set(index, vTree);
988 final uk.ac.vamsas.objects.core.Tree[] vTreeArray) {
992 for (int i = 0; i < vTreeArray.length; i++) {
993 this._treeList.add(vTreeArray[i]);
998 * Sets the value of '_treeList' by copying the given Vector.
999 * All elements will be checked for type safety.
1001 * @param vTreeList the Vector to copy.
1003 public void setTree(
1004 final java.util.Vector vTreeList) {
1006 this._treeList.clear();
1008 this._treeList.addAll(vTreeList);
1012 * Sets the value of '_treeList' by setting it to the given
1013 * Vector. No type checking is performed.
1016 * @param treeVector the Vector to set.
1018 public void setTreeAsReference(
1019 final java.util.Vector treeVector) {
1020 this._treeList = treeVector;
1027 * @throws org.exolab.castor.xml.MarshalException if object is
1028 * null or if any SAXException is thrown during marshaling
1029 * @throws org.exolab.castor.xml.ValidationException if this
1030 * object is an invalid instance according to the schema
1031 * @return the unmarshaled uk.ac.vamsas.objects.core.DataSet
1033 public static uk.ac.vamsas.objects.core.DataSet unmarshal(
1034 final java.io.Reader reader)
1035 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
1036 return (uk.ac.vamsas.objects.core.DataSet) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.DataSet.class, reader);
1042 * @throws org.exolab.castor.xml.ValidationException if this
1043 * object is an invalid instance according to the schema
1045 public void validate(
1047 throws org.exolab.castor.xml.ValidationException {
1048 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
1049 validator.validate(this);