refactored org to uk
[vamsas.git] / src / uk / ac / vamsas / objects / core / DataSet.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:DataSet.java 264 2006-12-14 17:42:54Z JimP $
6  */
7
8 package uk.ac.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 java.util.Enumeration;
19 import java.util.Vector;
20 import org.exolab.castor.xml.MarshalException;
21 import org.exolab.castor.xml.Marshaller;
22 import org.exolab.castor.xml.Unmarshaller;
23 import org.exolab.castor.xml.ValidationException;
24 import org.xml.sax.ContentHandler;
25
26 /**
27  * Class DataSet.
28  * 
29  * @version $Revision:264 $ $Date:2006-12-14 17:42:54 +0000 (Thu, 14 Dec 2006) $
30  */
31 public class DataSet extends uk.ac.vamsas.client.Vobject 
32 implements java.io.Serializable
33 {
34
35
36       //--------------------------/
37      //- Class/Member Variables -/
38     //--------------------------/
39
40     /**
41      * Primary Key for vamsas object referencing 
42      */
43     private java.lang.String _id;
44
45     /**
46      * Field _sequenceList
47      */
48     private java.util.Vector _sequenceList;
49
50     /**
51      * Field _dataSetAnnotationsList
52      */
53     private java.util.Vector _dataSetAnnotationsList;
54
55     /**
56      * Field _alignmentList
57      */
58     private java.util.Vector _alignmentList;
59
60     /**
61      * Field _treeList
62      */
63     private java.util.Vector _treeList;
64
65     /**
66      * Field _provenance
67      */
68     private uk.ac.vamsas.objects.core.Provenance _provenance;
69
70
71       //----------------/
72      //- Constructors -/
73     //----------------/
74
75     public DataSet() 
76      {
77         super();
78         _sequenceList = new Vector();
79         _dataSetAnnotationsList = new Vector();
80         _alignmentList = new Vector();
81         _treeList = new Vector();
82     } //-- uk.ac.vamsas.objects.core.DataSet()
83
84
85       //-----------/
86      //- Methods -/
87     //-----------/
88
89     /**
90      * Method addAlignment
91      * 
92      * 
93      * 
94      * @param vAlignment
95      */
96     public void addAlignment(uk.ac.vamsas.objects.core.Alignment vAlignment)
97         throws java.lang.IndexOutOfBoundsException
98     {
99         _alignmentList.addElement(vAlignment);
100     } //-- void addAlignment(uk.ac.vamsas.objects.core.Alignment) 
101
102     /**
103      * Method addAlignment
104      * 
105      * 
106      * 
107      * @param index
108      * @param vAlignment
109      */
110     public void addAlignment(int index, uk.ac.vamsas.objects.core.Alignment vAlignment)
111         throws java.lang.IndexOutOfBoundsException
112     {
113         _alignmentList.insertElementAt(vAlignment, index);
114     } //-- void addAlignment(int, uk.ac.vamsas.objects.core.Alignment) 
115
116     /**
117      * Method addDataSetAnnotations
118      * 
119      * 
120      * 
121      * @param vDataSetAnnotations
122      */
123     public void addDataSetAnnotations(uk.ac.vamsas.objects.core.DataSetAnnotations vDataSetAnnotations)
124         throws java.lang.IndexOutOfBoundsException
125     {
126         _dataSetAnnotationsList.addElement(vDataSetAnnotations);
127     } //-- void addDataSetAnnotations(uk.ac.vamsas.objects.core.DataSetAnnotations) 
128
129     /**
130      * Method addDataSetAnnotations
131      * 
132      * 
133      * 
134      * @param index
135      * @param vDataSetAnnotations
136      */
137     public void addDataSetAnnotations(int index, uk.ac.vamsas.objects.core.DataSetAnnotations vDataSetAnnotations)
138         throws java.lang.IndexOutOfBoundsException
139     {
140         _dataSetAnnotationsList.insertElementAt(vDataSetAnnotations, index);
141     } //-- void addDataSetAnnotations(int, uk.ac.vamsas.objects.core.DataSetAnnotations) 
142
143     /**
144      * Method addSequence
145      * 
146      * 
147      * 
148      * @param vSequence
149      */
150     public void addSequence(uk.ac.vamsas.objects.core.Sequence vSequence)
151         throws java.lang.IndexOutOfBoundsException
152     {
153         _sequenceList.addElement(vSequence);
154     } //-- void addSequence(uk.ac.vamsas.objects.core.Sequence) 
155
156     /**
157      * Method addSequence
158      * 
159      * 
160      * 
161      * @param index
162      * @param vSequence
163      */
164     public void addSequence(int index, uk.ac.vamsas.objects.core.Sequence vSequence)
165         throws java.lang.IndexOutOfBoundsException
166     {
167         _sequenceList.insertElementAt(vSequence, index);
168     } //-- void addSequence(int, uk.ac.vamsas.objects.core.Sequence) 
169
170     /**
171      * Method addTree
172      * 
173      * 
174      * 
175      * @param vTree
176      */
177     public void addTree(uk.ac.vamsas.objects.core.Tree vTree)
178         throws java.lang.IndexOutOfBoundsException
179     {
180         _treeList.addElement(vTree);
181     } //-- void addTree(uk.ac.vamsas.objects.core.Tree) 
182
183     /**
184      * Method addTree
185      * 
186      * 
187      * 
188      * @param index
189      * @param vTree
190      */
191     public void addTree(int index, uk.ac.vamsas.objects.core.Tree vTree)
192         throws java.lang.IndexOutOfBoundsException
193     {
194         _treeList.insertElementAt(vTree, index);
195     } //-- void addTree(int, uk.ac.vamsas.objects.core.Tree) 
196
197     /**
198      * Method enumerateAlignment
199      * 
200      * 
201      * 
202      * @return Enumeration
203      */
204     public java.util.Enumeration enumerateAlignment()
205     {
206         return _alignmentList.elements();
207     } //-- java.util.Enumeration enumerateAlignment() 
208
209     /**
210      * Method enumerateDataSetAnnotations
211      * 
212      * 
213      * 
214      * @return Enumeration
215      */
216     public java.util.Enumeration enumerateDataSetAnnotations()
217     {
218         return _dataSetAnnotationsList.elements();
219     } //-- java.util.Enumeration enumerateDataSetAnnotations() 
220
221     /**
222      * Method enumerateSequence
223      * 
224      * 
225      * 
226      * @return Enumeration
227      */
228     public java.util.Enumeration enumerateSequence()
229     {
230         return _sequenceList.elements();
231     } //-- java.util.Enumeration enumerateSequence() 
232
233     /**
234      * Method enumerateTree
235      * 
236      * 
237      * 
238      * @return Enumeration
239      */
240     public java.util.Enumeration enumerateTree()
241     {
242         return _treeList.elements();
243     } //-- java.util.Enumeration enumerateTree() 
244
245     /**
246      * Note: hashCode() has not been overriden
247      * 
248      * @param obj
249      * @return boolean
250      */
251     public boolean equals(java.lang.Object obj)
252     {
253         if ( this == obj )
254             return true;
255         
256         if (super.equals(obj)==false)
257             return false;
258         
259         if (obj instanceof DataSet) {
260         
261             DataSet temp = (DataSet)obj;
262             if (this._id != null) {
263                 if (temp._id == null) return false;
264                 else if (!(this._id.equals(temp._id))) 
265                     return false;
266             }
267             else if (temp._id != null)
268                 return false;
269             if (this._sequenceList != null) {
270                 if (temp._sequenceList == null) return false;
271                 else if (!(this._sequenceList.equals(temp._sequenceList))) 
272                     return false;
273             }
274             else if (temp._sequenceList != null)
275                 return false;
276             if (this._dataSetAnnotationsList != null) {
277                 if (temp._dataSetAnnotationsList == null) return false;
278                 else if (!(this._dataSetAnnotationsList.equals(temp._dataSetAnnotationsList))) 
279                     return false;
280             }
281             else if (temp._dataSetAnnotationsList != null)
282                 return false;
283             if (this._alignmentList != null) {
284                 if (temp._alignmentList == null) return false;
285                 else if (!(this._alignmentList.equals(temp._alignmentList))) 
286                     return false;
287             }
288             else if (temp._alignmentList != null)
289                 return false;
290             if (this._treeList != null) {
291                 if (temp._treeList == null) return false;
292                 else if (!(this._treeList.equals(temp._treeList))) 
293                     return false;
294             }
295             else if (temp._treeList != null)
296                 return false;
297             if (this._provenance != null) {
298                 if (temp._provenance == null) return false;
299                 else if (!(this._provenance.equals(temp._provenance))) 
300                     return false;
301             }
302             else if (temp._provenance != null)
303                 return false;
304             return true;
305         }
306         return false;
307     } //-- boolean equals(java.lang.Object) 
308
309     /**
310      * Method getAlignment
311      * 
312      * 
313      * 
314      * @param index
315      * @return Alignment
316      */
317     public uk.ac.vamsas.objects.core.Alignment getAlignment(int index)
318         throws java.lang.IndexOutOfBoundsException
319     {
320         //-- check bounds for index
321         if ((index < 0) || (index > _alignmentList.size())) {
322             throw new IndexOutOfBoundsException("getAlignment: Index value '"+index+"' not in range [0.."+_alignmentList.size()+ "]");
323         }
324         
325         return (uk.ac.vamsas.objects.core.Alignment) _alignmentList.elementAt(index);
326     } //-- uk.ac.vamsas.objects.core.Alignment getAlignment(int) 
327
328     /**
329      * Method getAlignment
330      * 
331      * 
332      * 
333      * @return Alignment
334      */
335     public uk.ac.vamsas.objects.core.Alignment[] getAlignment()
336     {
337         int size = _alignmentList.size();
338         uk.ac.vamsas.objects.core.Alignment[] mArray = new uk.ac.vamsas.objects.core.Alignment[size];
339         for (int index = 0; index < size; index++) {
340             mArray[index] = (uk.ac.vamsas.objects.core.Alignment) _alignmentList.elementAt(index);
341         }
342         return mArray;
343     } //-- uk.ac.vamsas.objects.core.Alignment[] getAlignment() 
344
345     /**
346      * Method getAlignmentCount
347      * 
348      * 
349      * 
350      * @return int
351      */
352     public int getAlignmentCount()
353     {
354         return _alignmentList.size();
355     } //-- int getAlignmentCount() 
356
357     /**
358      * Method getDataSetAnnotations
359      * 
360      * 
361      * 
362      * @param index
363      * @return DataSetAnnotations
364      */
365     public uk.ac.vamsas.objects.core.DataSetAnnotations getDataSetAnnotations(int index)
366         throws java.lang.IndexOutOfBoundsException
367     {
368         //-- check bounds for index
369         if ((index < 0) || (index > _dataSetAnnotationsList.size())) {
370             throw new IndexOutOfBoundsException("getDataSetAnnotations: Index value '"+index+"' not in range [0.."+_dataSetAnnotationsList.size()+ "]");
371         }
372         
373         return (uk.ac.vamsas.objects.core.DataSetAnnotations) _dataSetAnnotationsList.elementAt(index);
374     } //-- uk.ac.vamsas.objects.core.DataSetAnnotations getDataSetAnnotations(int) 
375
376     /**
377      * Method getDataSetAnnotations
378      * 
379      * 
380      * 
381      * @return DataSetAnnotations
382      */
383     public uk.ac.vamsas.objects.core.DataSetAnnotations[] getDataSetAnnotations()
384     {
385         int size = _dataSetAnnotationsList.size();
386         uk.ac.vamsas.objects.core.DataSetAnnotations[] mArray = new uk.ac.vamsas.objects.core.DataSetAnnotations[size];
387         for (int index = 0; index < size; index++) {
388             mArray[index] = (uk.ac.vamsas.objects.core.DataSetAnnotations) _dataSetAnnotationsList.elementAt(index);
389         }
390         return mArray;
391     } //-- uk.ac.vamsas.objects.core.DataSetAnnotations[] getDataSetAnnotations() 
392
393     /**
394      * Method getDataSetAnnotationsCount
395      * 
396      * 
397      * 
398      * @return int
399      */
400     public int getDataSetAnnotationsCount()
401     {
402         return _dataSetAnnotationsList.size();
403     } //-- int getDataSetAnnotationsCount() 
404
405     /**
406      * Returns the value of field 'id'. The field 'id' has the
407      * following description: Primary Key for vamsas object
408      * referencing 
409      * 
410      * @return String
411      * @return the value of field 'id'.
412      */
413     public java.lang.String getId()
414     {
415         return this._id;
416     } //-- java.lang.String getId() 
417
418     /**
419      * Returns the value of field 'provenance'.
420      * 
421      * @return Provenance
422      * @return the value of field 'provenance'.
423      */
424     public uk.ac.vamsas.objects.core.Provenance getProvenance()
425     {
426         return this._provenance;
427     } //-- uk.ac.vamsas.objects.core.Provenance getProvenance() 
428
429     /**
430      * Method getSequence
431      * 
432      * 
433      * 
434      * @param index
435      * @return Sequence
436      */
437     public uk.ac.vamsas.objects.core.Sequence getSequence(int index)
438         throws java.lang.IndexOutOfBoundsException
439     {
440         //-- check bounds for index
441         if ((index < 0) || (index > _sequenceList.size())) {
442             throw new IndexOutOfBoundsException("getSequence: Index value '"+index+"' not in range [0.."+_sequenceList.size()+ "]");
443         }
444         
445         return (uk.ac.vamsas.objects.core.Sequence) _sequenceList.elementAt(index);
446     } //-- uk.ac.vamsas.objects.core.Sequence getSequence(int) 
447
448     /**
449      * Method getSequence
450      * 
451      * 
452      * 
453      * @return Sequence
454      */
455     public uk.ac.vamsas.objects.core.Sequence[] getSequence()
456     {
457         int size = _sequenceList.size();
458         uk.ac.vamsas.objects.core.Sequence[] mArray = new uk.ac.vamsas.objects.core.Sequence[size];
459         for (int index = 0; index < size; index++) {
460             mArray[index] = (uk.ac.vamsas.objects.core.Sequence) _sequenceList.elementAt(index);
461         }
462         return mArray;
463     } //-- uk.ac.vamsas.objects.core.Sequence[] getSequence() 
464
465     /**
466      * Method getSequenceCount
467      * 
468      * 
469      * 
470      * @return int
471      */
472     public int getSequenceCount()
473     {
474         return _sequenceList.size();
475     } //-- int getSequenceCount() 
476
477     /**
478      * Method getTree
479      * 
480      * 
481      * 
482      * @param index
483      * @return Tree
484      */
485     public uk.ac.vamsas.objects.core.Tree getTree(int index)
486         throws java.lang.IndexOutOfBoundsException
487     {
488         //-- check bounds for index
489         if ((index < 0) || (index > _treeList.size())) {
490             throw new IndexOutOfBoundsException("getTree: Index value '"+index+"' not in range [0.."+_treeList.size()+ "]");
491         }
492         
493         return (uk.ac.vamsas.objects.core.Tree) _treeList.elementAt(index);
494     } //-- uk.ac.vamsas.objects.core.Tree getTree(int) 
495
496     /**
497      * Method getTree
498      * 
499      * 
500      * 
501      * @return Tree
502      */
503     public uk.ac.vamsas.objects.core.Tree[] getTree()
504     {
505         int size = _treeList.size();
506         uk.ac.vamsas.objects.core.Tree[] mArray = new uk.ac.vamsas.objects.core.Tree[size];
507         for (int index = 0; index < size; index++) {
508             mArray[index] = (uk.ac.vamsas.objects.core.Tree) _treeList.elementAt(index);
509         }
510         return mArray;
511     } //-- uk.ac.vamsas.objects.core.Tree[] getTree() 
512
513     /**
514      * Method getTreeCount
515      * 
516      * 
517      * 
518      * @return int
519      */
520     public int getTreeCount()
521     {
522         return _treeList.size();
523     } //-- int getTreeCount() 
524
525     /**
526      * Method isValid
527      * 
528      * 
529      * 
530      * @return boolean
531      */
532     public boolean isValid()
533     {
534         try {
535             validate();
536         }
537         catch (org.exolab.castor.xml.ValidationException vex) {
538             return false;
539         }
540         return true;
541     } //-- boolean isValid() 
542
543     /**
544      * Method marshal
545      * 
546      * 
547      * 
548      * @param out
549      */
550     public void marshal(java.io.Writer out)
551         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
552     {
553         
554         Marshaller.marshal(this, out);
555     } //-- void marshal(java.io.Writer) 
556
557     /**
558      * Method marshal
559      * 
560      * 
561      * 
562      * @param handler
563      */
564     public void marshal(org.xml.sax.ContentHandler handler)
565         throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
566     {
567         
568         Marshaller.marshal(this, handler);
569     } //-- void marshal(org.xml.sax.ContentHandler) 
570
571     /**
572      * Method removeAlignment
573      * 
574      * 
575      * 
576      * @param index
577      * @return Alignment
578      */
579     public uk.ac.vamsas.objects.core.Alignment removeAlignment(int index)
580     {
581         java.lang.Object obj = _alignmentList.elementAt(index);
582         _alignmentList.removeElementAt(index);
583         return (uk.ac.vamsas.objects.core.Alignment) obj;
584     } //-- uk.ac.vamsas.objects.core.Alignment removeAlignment(int) 
585
586     /**
587      * Method removeAllAlignment
588      * 
589      */
590     public void removeAllAlignment()
591     {
592         _alignmentList.removeAllElements();
593     } //-- void removeAllAlignment() 
594
595     /**
596      * Method removeAllDataSetAnnotations
597      * 
598      */
599     public void removeAllDataSetAnnotations()
600     {
601         _dataSetAnnotationsList.removeAllElements();
602     } //-- void removeAllDataSetAnnotations() 
603
604     /**
605      * Method removeAllSequence
606      * 
607      */
608     public void removeAllSequence()
609     {
610         _sequenceList.removeAllElements();
611     } //-- void removeAllSequence() 
612
613     /**
614      * Method removeAllTree
615      * 
616      */
617     public void removeAllTree()
618     {
619         _treeList.removeAllElements();
620     } //-- void removeAllTree() 
621
622     /**
623      * Method removeDataSetAnnotations
624      * 
625      * 
626      * 
627      * @param index
628      * @return DataSetAnnotations
629      */
630     public uk.ac.vamsas.objects.core.DataSetAnnotations removeDataSetAnnotations(int index)
631     {
632         java.lang.Object obj = _dataSetAnnotationsList.elementAt(index);
633         _dataSetAnnotationsList.removeElementAt(index);
634         return (uk.ac.vamsas.objects.core.DataSetAnnotations) obj;
635     } //-- uk.ac.vamsas.objects.core.DataSetAnnotations removeDataSetAnnotations(int) 
636
637     /**
638      * Method removeSequence
639      * 
640      * 
641      * 
642      * @param index
643      * @return Sequence
644      */
645     public uk.ac.vamsas.objects.core.Sequence removeSequence(int index)
646     {
647         java.lang.Object obj = _sequenceList.elementAt(index);
648         _sequenceList.removeElementAt(index);
649         return (uk.ac.vamsas.objects.core.Sequence) obj;
650     } //-- uk.ac.vamsas.objects.core.Sequence removeSequence(int) 
651
652     /**
653      * Method removeTree
654      * 
655      * 
656      * 
657      * @param index
658      * @return Tree
659      */
660     public uk.ac.vamsas.objects.core.Tree removeTree(int index)
661     {
662         java.lang.Object obj = _treeList.elementAt(index);
663         _treeList.removeElementAt(index);
664         return (uk.ac.vamsas.objects.core.Tree) obj;
665     } //-- uk.ac.vamsas.objects.core.Tree removeTree(int) 
666
667     /**
668      * Method setAlignment
669      * 
670      * 
671      * 
672      * @param index
673      * @param vAlignment
674      */
675     public void setAlignment(int index, uk.ac.vamsas.objects.core.Alignment vAlignment)
676         throws java.lang.IndexOutOfBoundsException
677     {
678         //-- check bounds for index
679         if ((index < 0) || (index > _alignmentList.size())) {
680             throw new IndexOutOfBoundsException("setAlignment: Index value '"+index+"' not in range [0.."+_alignmentList.size()+ "]");
681         }
682         _alignmentList.setElementAt(vAlignment, index);
683     } //-- void setAlignment(int, uk.ac.vamsas.objects.core.Alignment) 
684
685     /**
686      * Method setAlignment
687      * 
688      * 
689      * 
690      * @param alignmentArray
691      */
692     public void setAlignment(uk.ac.vamsas.objects.core.Alignment[] alignmentArray)
693     {
694         //-- copy array
695         _alignmentList.removeAllElements();
696         for (int i = 0; i < alignmentArray.length; i++) {
697             _alignmentList.addElement(alignmentArray[i]);
698         }
699     } //-- void setAlignment(uk.ac.vamsas.objects.core.Alignment) 
700
701     /**
702      * Method setDataSetAnnotations
703      * 
704      * 
705      * 
706      * @param index
707      * @param vDataSetAnnotations
708      */
709     public void setDataSetAnnotations(int index, uk.ac.vamsas.objects.core.DataSetAnnotations vDataSetAnnotations)
710         throws java.lang.IndexOutOfBoundsException
711     {
712         //-- check bounds for index
713         if ((index < 0) || (index > _dataSetAnnotationsList.size())) {
714             throw new IndexOutOfBoundsException("setDataSetAnnotations: Index value '"+index+"' not in range [0.."+_dataSetAnnotationsList.size()+ "]");
715         }
716         _dataSetAnnotationsList.setElementAt(vDataSetAnnotations, index);
717     } //-- void setDataSetAnnotations(int, uk.ac.vamsas.objects.core.DataSetAnnotations) 
718
719     /**
720      * Method setDataSetAnnotations
721      * 
722      * 
723      * 
724      * @param dataSetAnnotationsArray
725      */
726     public void setDataSetAnnotations(uk.ac.vamsas.objects.core.DataSetAnnotations[] dataSetAnnotationsArray)
727     {
728         //-- copy array
729         _dataSetAnnotationsList.removeAllElements();
730         for (int i = 0; i < dataSetAnnotationsArray.length; i++) {
731             _dataSetAnnotationsList.addElement(dataSetAnnotationsArray[i]);
732         }
733     } //-- void setDataSetAnnotations(uk.ac.vamsas.objects.core.DataSetAnnotations) 
734
735     /**
736      * Sets the value of field 'id'. The field 'id' has the
737      * following description: Primary Key for vamsas object
738      * referencing 
739      * 
740      * @param id the value of field 'id'.
741      */
742     public void setId(java.lang.String id)
743     {
744         this._id = id;
745     } //-- void setId(java.lang.String) 
746
747     /**
748      * Sets the value of field 'provenance'.
749      * 
750      * @param provenance the value of field 'provenance'.
751      */
752     public void setProvenance(uk.ac.vamsas.objects.core.Provenance provenance)
753     {
754         this._provenance = provenance;
755     } //-- void setProvenance(uk.ac.vamsas.objects.core.Provenance) 
756
757     /**
758      * Method setSequence
759      * 
760      * 
761      * 
762      * @param index
763      * @param vSequence
764      */
765     public void setSequence(int index, uk.ac.vamsas.objects.core.Sequence vSequence)
766         throws java.lang.IndexOutOfBoundsException
767     {
768         //-- check bounds for index
769         if ((index < 0) || (index > _sequenceList.size())) {
770             throw new IndexOutOfBoundsException("setSequence: Index value '"+index+"' not in range [0.."+_sequenceList.size()+ "]");
771         }
772         _sequenceList.setElementAt(vSequence, index);
773     } //-- void setSequence(int, uk.ac.vamsas.objects.core.Sequence) 
774
775     /**
776      * Method setSequence
777      * 
778      * 
779      * 
780      * @param sequenceArray
781      */
782     public void setSequence(uk.ac.vamsas.objects.core.Sequence[] sequenceArray)
783     {
784         //-- copy array
785         _sequenceList.removeAllElements();
786         for (int i = 0; i < sequenceArray.length; i++) {
787             _sequenceList.addElement(sequenceArray[i]);
788         }
789     } //-- void setSequence(uk.ac.vamsas.objects.core.Sequence) 
790
791     /**
792      * Method setTree
793      * 
794      * 
795      * 
796      * @param index
797      * @param vTree
798      */
799     public void setTree(int index, uk.ac.vamsas.objects.core.Tree vTree)
800         throws java.lang.IndexOutOfBoundsException
801     {
802         //-- check bounds for index
803         if ((index < 0) || (index > _treeList.size())) {
804             throw new IndexOutOfBoundsException("setTree: Index value '"+index+"' not in range [0.."+_treeList.size()+ "]");
805         }
806         _treeList.setElementAt(vTree, index);
807     } //-- void setTree(int, uk.ac.vamsas.objects.core.Tree) 
808
809     /**
810      * Method setTree
811      * 
812      * 
813      * 
814      * @param treeArray
815      */
816     public void setTree(uk.ac.vamsas.objects.core.Tree[] treeArray)
817     {
818         //-- copy array
819         _treeList.removeAllElements();
820         for (int i = 0; i < treeArray.length; i++) {
821             _treeList.addElement(treeArray[i]);
822         }
823     } //-- void setTree(uk.ac.vamsas.objects.core.Tree) 
824
825     /**
826      * Method unmarshal
827      * 
828      * 
829      * 
830      * @param reader
831      * @return DataSet
832      */
833     public static uk.ac.vamsas.objects.core.DataSet unmarshal(java.io.Reader reader)
834         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
835     {
836         return (uk.ac.vamsas.objects.core.DataSet) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.DataSet.class, reader);
837     } //-- uk.ac.vamsas.objects.core.DataSet unmarshal(java.io.Reader) 
838
839     /**
840      * Method validate
841      * 
842      */
843     public void validate()
844         throws org.exolab.castor.xml.ValidationException
845     {
846         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
847         validator.validate(this);
848     } //-- void validate() 
849
850 }