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