cdc1dc13795c8bb014eaf8e967032b596b7f01f3
[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 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 DataSet.
19  * 
20  * @version $Revision$ $Date$
21  */
22 public class DataSet extends uk.ac.vamsas.client.Vobject 
23 implements java.io.Serializable
24 {
25
26
27       //--------------------------/
28      //- Class/Member Variables -/
29     //--------------------------/
30
31     /**
32      * Primary Key for vamsas object referencing 
33      */
34     private java.lang.String _id;
35
36     /**
37      * Field _sequenceList.
38      */
39     private java.util.Vector _sequenceList;
40
41     /**
42      * Field _sequenceMappingList.
43      */
44     private java.util.Vector _sequenceMappingList;
45
46     /**
47      * Field _dataSetAnnotationsList.
48      */
49     private java.util.Vector _dataSetAnnotationsList;
50
51     /**
52      * Field _alignmentList.
53      */
54     private java.util.Vector _alignmentList;
55
56     /**
57      * Field _treeList.
58      */
59     private java.util.Vector _treeList;
60
61     /**
62      * Field _provenance.
63      */
64     private uk.ac.vamsas.objects.core.Provenance _provenance;
65
66
67       //----------------/
68      //- Constructors -/
69     //----------------/
70
71     public DataSet() {
72         super();
73         this._sequenceList = new java.util.Vector();
74         this._sequenceMappingList = new java.util.Vector();
75         this._dataSetAnnotationsList = new java.util.Vector();
76         this._alignmentList = new java.util.Vector();
77         this._treeList = new java.util.Vector();
78     }
79
80
81       //-----------/
82      //- Methods -/
83     //-----------/
84
85     /**
86      * 
87      * 
88      * @param vAlignment
89      * @throws java.lang.IndexOutOfBoundsException if the index
90      * given is outside the bounds of the collection
91      */
92     public void addAlignment(
93             final uk.ac.vamsas.objects.core.Alignment vAlignment)
94     throws java.lang.IndexOutOfBoundsException {
95         this._alignmentList.addElement(vAlignment);
96     }
97
98     /**
99      * 
100      * 
101      * @param index
102      * @param vAlignment
103      * @throws java.lang.IndexOutOfBoundsException if the index
104      * given is outside the bounds of the collection
105      */
106     public void addAlignment(
107             final int index,
108             final uk.ac.vamsas.objects.core.Alignment vAlignment)
109     throws java.lang.IndexOutOfBoundsException {
110         this._alignmentList.add(index, vAlignment);
111     }
112
113     /**
114      * 
115      * 
116      * @param vDataSetAnnotations
117      * @throws java.lang.IndexOutOfBoundsException if the index
118      * given is outside the bounds of the collection
119      */
120     public void addDataSetAnnotations(
121             final uk.ac.vamsas.objects.core.DataSetAnnotations vDataSetAnnotations)
122     throws java.lang.IndexOutOfBoundsException {
123         this._dataSetAnnotationsList.addElement(vDataSetAnnotations);
124     }
125
126     /**
127      * 
128      * 
129      * @param index
130      * @param vDataSetAnnotations
131      * @throws java.lang.IndexOutOfBoundsException if the index
132      * given is outside the bounds of the collection
133      */
134     public void addDataSetAnnotations(
135             final int index,
136             final uk.ac.vamsas.objects.core.DataSetAnnotations vDataSetAnnotations)
137     throws java.lang.IndexOutOfBoundsException {
138         this._dataSetAnnotationsList.add(index, vDataSetAnnotations);
139     }
140
141     /**
142      * 
143      * 
144      * @param vSequence
145      * @throws java.lang.IndexOutOfBoundsException if the index
146      * given is outside the bounds of the collection
147      */
148     public void addSequence(
149             final uk.ac.vamsas.objects.core.Sequence vSequence)
150     throws java.lang.IndexOutOfBoundsException {
151         this._sequenceList.addElement(vSequence);
152     }
153
154     /**
155      * 
156      * 
157      * @param index
158      * @param vSequence
159      * @throws java.lang.IndexOutOfBoundsException if the index
160      * given is outside the bounds of the collection
161      */
162     public void addSequence(
163             final int index,
164             final uk.ac.vamsas.objects.core.Sequence vSequence)
165     throws java.lang.IndexOutOfBoundsException {
166         this._sequenceList.add(index, vSequence);
167     }
168
169     /**
170      * 
171      * 
172      * @param vSequenceMapping
173      * @throws java.lang.IndexOutOfBoundsException if the index
174      * given is outside the bounds of the collection
175      */
176     public void addSequenceMapping(
177             final uk.ac.vamsas.objects.core.SequenceMapping vSequenceMapping)
178     throws java.lang.IndexOutOfBoundsException {
179         this._sequenceMappingList.addElement(vSequenceMapping);
180     }
181
182     /**
183      * 
184      * 
185      * @param index
186      * @param vSequenceMapping
187      * @throws java.lang.IndexOutOfBoundsException if the index
188      * given is outside the bounds of the collection
189      */
190     public void addSequenceMapping(
191             final int index,
192             final uk.ac.vamsas.objects.core.SequenceMapping vSequenceMapping)
193     throws java.lang.IndexOutOfBoundsException {
194         this._sequenceMappingList.add(index, vSequenceMapping);
195     }
196
197     /**
198      * 
199      * 
200      * @param vTree
201      * @throws java.lang.IndexOutOfBoundsException if the index
202      * given is outside the bounds of the collection
203      */
204     public void addTree(
205             final uk.ac.vamsas.objects.core.Tree vTree)
206     throws java.lang.IndexOutOfBoundsException {
207         this._treeList.addElement(vTree);
208     }
209
210     /**
211      * 
212      * 
213      * @param index
214      * @param vTree
215      * @throws java.lang.IndexOutOfBoundsException if the index
216      * given is outside the bounds of the collection
217      */
218     public void addTree(
219             final int index,
220             final uk.ac.vamsas.objects.core.Tree vTree)
221     throws java.lang.IndexOutOfBoundsException {
222         this._treeList.add(index, vTree);
223     }
224
225     /**
226      * Method enumerateAlignment.
227      * 
228      * @return an Enumeration over all
229      * uk.ac.vamsas.objects.core.Alignment elements
230      */
231     public java.util.Enumeration enumerateAlignment(
232     ) {
233         return this._alignmentList.elements();
234     }
235
236     /**
237      * Method enumerateDataSetAnnotations.
238      * 
239      * @return an Enumeration over all
240      * uk.ac.vamsas.objects.core.DataSetAnnotations elements
241      */
242     public java.util.Enumeration enumerateDataSetAnnotations(
243     ) {
244         return this._dataSetAnnotationsList.elements();
245     }
246
247     /**
248      * Method enumerateSequence.
249      * 
250      * @return an Enumeration over all
251      * uk.ac.vamsas.objects.core.Sequence elements
252      */
253     public java.util.Enumeration enumerateSequence(
254     ) {
255         return this._sequenceList.elements();
256     }
257
258     /**
259      * Method enumerateSequenceMapping.
260      * 
261      * @return an Enumeration over all
262      * uk.ac.vamsas.objects.core.SequenceMapping elements
263      */
264     public java.util.Enumeration enumerateSequenceMapping(
265     ) {
266         return this._sequenceMappingList.elements();
267     }
268
269     /**
270      * Method enumerateTree.
271      * 
272      * @return an Enumeration over all
273      * uk.ac.vamsas.objects.core.Tree elements
274      */
275     public java.util.Enumeration enumerateTree(
276     ) {
277         return this._treeList.elements();
278     }
279
280     /**
281      * Overrides the java.lang.Object.equals method.
282      * 
283      * @param obj
284      * @return true if the objects are equal.
285      */
286     public boolean equals(
287             final java.lang.Object obj) {
288         if ( this == obj )
289             return true;
290         
291         if (super.equals(obj)==false)
292             return false;
293         
294         if (obj instanceof DataSet) {
295         
296             DataSet temp = (DataSet)obj;
297             if (this._id != null) {
298                 if (temp._id == null) return false;
299                 else if (!(this._id.equals(temp._id))) 
300                     return false;
301             }
302             else if (temp._id != null)
303                 return false;
304             if (this._sequenceList != null) {
305                 if (temp._sequenceList == null) return false;
306                 else if (!(this._sequenceList.equals(temp._sequenceList))) 
307                     return false;
308             }
309             else if (temp._sequenceList != null)
310                 return false;
311             if (this._sequenceMappingList != null) {
312                 if (temp._sequenceMappingList == null) return false;
313                 else if (!(this._sequenceMappingList.equals(temp._sequenceMappingList))) 
314                     return false;
315             }
316             else if (temp._sequenceMappingList != null)
317                 return false;
318             if (this._dataSetAnnotationsList != null) {
319                 if (temp._dataSetAnnotationsList == null) return false;
320                 else if (!(this._dataSetAnnotationsList.equals(temp._dataSetAnnotationsList))) 
321                     return false;
322             }
323             else if (temp._dataSetAnnotationsList != null)
324                 return false;
325             if (this._alignmentList != null) {
326                 if (temp._alignmentList == null) return false;
327                 else if (!(this._alignmentList.equals(temp._alignmentList))) 
328                     return false;
329             }
330             else if (temp._alignmentList != null)
331                 return false;
332             if (this._treeList != null) {
333                 if (temp._treeList == null) return false;
334                 else if (!(this._treeList.equals(temp._treeList))) 
335                     return false;
336             }
337             else if (temp._treeList != null)
338                 return false;
339             if (this._provenance != null) {
340                 if (temp._provenance == null) return false;
341                 else if (!(this._provenance.equals(temp._provenance))) 
342                     return false;
343             }
344             else if (temp._provenance != null)
345                 return false;
346             return true;
347         }
348         return false;
349     }
350
351     /**
352      * Method getAlignment.
353      * 
354      * @param index
355      * @throws java.lang.IndexOutOfBoundsException if the index
356      * given is outside the bounds of the collection
357      * @return the value of the uk.ac.vamsas.objects.core.Alignment
358      * at the given index
359      */
360     public uk.ac.vamsas.objects.core.Alignment getAlignment(
361             final int index)
362     throws java.lang.IndexOutOfBoundsException {
363         // check bounds for index
364         if (index < 0 || index >= this._alignmentList.size()) {
365             throw new IndexOutOfBoundsException("getAlignment: Index value '" + index + "' not in range [0.." + (this._alignmentList.size() - 1) + "]");
366         }
367         
368         return (uk.ac.vamsas.objects.core.Alignment) _alignmentList.get(index);
369     }
370
371     /**
372      * Method getAlignment.Returns the contents of the collection
373      * in an Array.  <p>Note:  Just in case the collection contents
374      * are changing in another thread, we pass a 0-length Array of
375      * the correct type into the API call.  This way we <i>know</i>
376      * that the Array returned is of exactly the correct length.
377      * 
378      * @return this collection as an Array
379      */
380     public uk.ac.vamsas.objects.core.Alignment[] getAlignment(
381     ) {
382         uk.ac.vamsas.objects.core.Alignment[] array = new uk.ac.vamsas.objects.core.Alignment[0];
383         return (uk.ac.vamsas.objects.core.Alignment[]) this._alignmentList.toArray(array);
384     }
385
386     /**
387      * Method getAlignmentAsReference.Returns a reference to
388      * '_alignmentList'. No type checking is performed on any
389      * modifications to the Vector.
390      * 
391      * @return a reference to the Vector backing this class
392      */
393     public java.util.Vector getAlignmentAsReference(
394     ) {
395         return this._alignmentList;
396     }
397
398     /**
399      * Method getAlignmentCount.
400      * 
401      * @return the size of this collection
402      */
403     public int getAlignmentCount(
404     ) {
405         return this._alignmentList.size();
406     }
407
408     /**
409      * Method getDataSetAnnotations.
410      * 
411      * @param index
412      * @throws java.lang.IndexOutOfBoundsException if the index
413      * given is outside the bounds of the collection
414      * @return the value of the
415      * uk.ac.vamsas.objects.core.DataSetAnnotations at the given
416      * index
417      */
418     public uk.ac.vamsas.objects.core.DataSetAnnotations getDataSetAnnotations(
419             final int index)
420     throws java.lang.IndexOutOfBoundsException {
421         // check bounds for index
422         if (index < 0 || index >= this._dataSetAnnotationsList.size()) {
423             throw new IndexOutOfBoundsException("getDataSetAnnotations: Index value '" + index + "' not in range [0.." + (this._dataSetAnnotationsList.size() - 1) + "]");
424         }
425         
426         return (uk.ac.vamsas.objects.core.DataSetAnnotations) _dataSetAnnotationsList.get(index);
427     }
428
429     /**
430      * Method getDataSetAnnotations.Returns the contents of the
431      * collection in an Array.  <p>Note:  Just in case the
432      * collection contents are changing in another thread, we pass
433      * a 0-length Array of the correct type into the API call. 
434      * This way we <i>know</i> that the Array returned is of
435      * exactly the correct length.
436      * 
437      * @return this collection as an Array
438      */
439     public uk.ac.vamsas.objects.core.DataSetAnnotations[] getDataSetAnnotations(
440     ) {
441         uk.ac.vamsas.objects.core.DataSetAnnotations[] array = new uk.ac.vamsas.objects.core.DataSetAnnotations[0];
442         return (uk.ac.vamsas.objects.core.DataSetAnnotations[]) this._dataSetAnnotationsList.toArray(array);
443     }
444
445     /**
446      * Method getDataSetAnnotationsAsReference.Returns a reference
447      * to '_dataSetAnnotationsList'. No type checking is performed
448      * on any modifications to the Vector.
449      * 
450      * @return a reference to the Vector backing this class
451      */
452     public java.util.Vector getDataSetAnnotationsAsReference(
453     ) {
454         return this._dataSetAnnotationsList;
455     }
456
457     /**
458      * Method getDataSetAnnotationsCount.
459      * 
460      * @return the size of this collection
461      */
462     public int getDataSetAnnotationsCount(
463     ) {
464         return this._dataSetAnnotationsList.size();
465     }
466
467     /**
468      * Returns the value of field 'id'. The field 'id' has the
469      * following description: Primary Key for vamsas object
470      * referencing 
471      * 
472      * @return the value of field 'Id'.
473      */
474     public java.lang.String getId(
475     ) {
476         return this._id;
477     }
478
479     /**
480      * Returns the value of field 'provenance'.
481      * 
482      * @return the value of field 'Provenance'.
483      */
484     public uk.ac.vamsas.objects.core.Provenance getProvenance(
485     ) {
486         return this._provenance;
487     }
488
489     /**
490      * Method getSequence.
491      * 
492      * @param index
493      * @throws java.lang.IndexOutOfBoundsException if the index
494      * given is outside the bounds of the collection
495      * @return the value of the uk.ac.vamsas.objects.core.Sequence
496      * at the given index
497      */
498     public uk.ac.vamsas.objects.core.Sequence getSequence(
499             final int index)
500     throws java.lang.IndexOutOfBoundsException {
501         // check bounds for index
502         if (index < 0 || index >= this._sequenceList.size()) {
503             throw new IndexOutOfBoundsException("getSequence: Index value '" + index + "' not in range [0.." + (this._sequenceList.size() - 1) + "]");
504         }
505         
506         return (uk.ac.vamsas.objects.core.Sequence) _sequenceList.get(index);
507     }
508
509     /**
510      * Method getSequence.Returns the contents of the collection in
511      * an Array.  <p>Note:  Just in case the collection contents
512      * are changing in another thread, we pass a 0-length Array of
513      * the correct type into the API call.  This way we <i>know</i>
514      * that the Array returned is of exactly the correct length.
515      * 
516      * @return this collection as an Array
517      */
518     public uk.ac.vamsas.objects.core.Sequence[] getSequence(
519     ) {
520         uk.ac.vamsas.objects.core.Sequence[] array = new uk.ac.vamsas.objects.core.Sequence[0];
521         return (uk.ac.vamsas.objects.core.Sequence[]) this._sequenceList.toArray(array);
522     }
523
524     /**
525      * Method getSequenceAsReference.Returns a reference to
526      * '_sequenceList'. No type checking is performed on any
527      * modifications to the Vector.
528      * 
529      * @return a reference to the Vector backing this class
530      */
531     public java.util.Vector getSequenceAsReference(
532     ) {
533         return this._sequenceList;
534     }
535
536     /**
537      * Method getSequenceCount.
538      * 
539      * @return the size of this collection
540      */
541     public int getSequenceCount(
542     ) {
543         return this._sequenceList.size();
544     }
545
546     /**
547      * Method getSequenceMapping.
548      * 
549      * @param index
550      * @throws java.lang.IndexOutOfBoundsException if the index
551      * given is outside the bounds of the collection
552      * @return the value of the
553      * uk.ac.vamsas.objects.core.SequenceMapping at the given index
554      */
555     public uk.ac.vamsas.objects.core.SequenceMapping getSequenceMapping(
556             final int index)
557     throws java.lang.IndexOutOfBoundsException {
558         // check bounds for index
559         if (index < 0 || index >= this._sequenceMappingList.size()) {
560             throw new IndexOutOfBoundsException("getSequenceMapping: Index value '" + index + "' not in range [0.." + (this._sequenceMappingList.size() - 1) + "]");
561         }
562         
563         return (uk.ac.vamsas.objects.core.SequenceMapping) _sequenceMappingList.get(index);
564     }
565
566     /**
567      * Method getSequenceMapping.Returns the contents of the
568      * collection in an Array.  <p>Note:  Just in case the
569      * collection contents are changing in another thread, we pass
570      * a 0-length Array of the correct type into the API call. 
571      * This way we <i>know</i> that the Array returned is of
572      * exactly the correct length.
573      * 
574      * @return this collection as an Array
575      */
576     public uk.ac.vamsas.objects.core.SequenceMapping[] getSequenceMapping(
577     ) {
578         uk.ac.vamsas.objects.core.SequenceMapping[] array = new uk.ac.vamsas.objects.core.SequenceMapping[0];
579         return (uk.ac.vamsas.objects.core.SequenceMapping[]) this._sequenceMappingList.toArray(array);
580     }
581
582     /**
583      * Method getSequenceMappingAsReference.Returns a reference to
584      * '_sequenceMappingList'. No type checking is performed on any
585      * modifications to the Vector.
586      * 
587      * @return a reference to the Vector backing this class
588      */
589     public java.util.Vector getSequenceMappingAsReference(
590     ) {
591         return this._sequenceMappingList;
592     }
593
594     /**
595      * Method getSequenceMappingCount.
596      * 
597      * @return the size of this collection
598      */
599     public int getSequenceMappingCount(
600     ) {
601         return this._sequenceMappingList.size();
602     }
603
604     /**
605      * Method getTree.
606      * 
607      * @param index
608      * @throws java.lang.IndexOutOfBoundsException if the index
609      * given is outside the bounds of the collection
610      * @return the value of the uk.ac.vamsas.objects.core.Tree at
611      * the given index
612      */
613     public uk.ac.vamsas.objects.core.Tree getTree(
614             final int index)
615     throws java.lang.IndexOutOfBoundsException {
616         // check bounds for index
617         if (index < 0 || index >= this._treeList.size()) {
618             throw new IndexOutOfBoundsException("getTree: Index value '" + index + "' not in range [0.." + (this._treeList.size() - 1) + "]");
619         }
620         
621         return (uk.ac.vamsas.objects.core.Tree) _treeList.get(index);
622     }
623
624     /**
625      * Method getTree.Returns the contents of the collection in an
626      * Array.  <p>Note:  Just in case the collection contents are
627      * changing in another thread, we pass a 0-length Array of the
628      * correct type into the API call.  This way we <i>know</i>
629      * that the Array returned is of exactly the correct length.
630      * 
631      * @return this collection as an Array
632      */
633     public uk.ac.vamsas.objects.core.Tree[] getTree(
634     ) {
635         uk.ac.vamsas.objects.core.Tree[] array = new uk.ac.vamsas.objects.core.Tree[0];
636         return (uk.ac.vamsas.objects.core.Tree[]) this._treeList.toArray(array);
637     }
638
639     /**
640      * Method getTreeAsReference.Returns a reference to
641      * '_treeList'. No type checking is performed on any
642      * modifications to the Vector.
643      * 
644      * @return a reference to the Vector backing this class
645      */
646     public java.util.Vector getTreeAsReference(
647     ) {
648         return this._treeList;
649     }
650
651     /**
652      * Method getTreeCount.
653      * 
654      * @return the size of this collection
655      */
656     public int getTreeCount(
657     ) {
658         return this._treeList.size();
659     }
660
661     /**
662      * Overrides the java.lang.Object.hashCode method.
663      * <p>
664      * The following steps came from <b>Effective Java Programming
665      * Language Guide</b> by Joshua Bloch, Chapter 3
666      * 
667      * @return a hash code value for the object.
668      */
669     public int hashCode(
670     ) {
671         int result = super.hashCode();
672         
673         long tmp;
674         if (_id != null) {
675            result = 37 * result + _id.hashCode();
676         }
677         if (_sequenceList != null) {
678            result = 37 * result + _sequenceList.hashCode();
679         }
680         if (_sequenceMappingList != null) {
681            result = 37 * result + _sequenceMappingList.hashCode();
682         }
683         if (_dataSetAnnotationsList != null) {
684            result = 37 * result + _dataSetAnnotationsList.hashCode();
685         }
686         if (_alignmentList != null) {
687            result = 37 * result + _alignmentList.hashCode();
688         }
689         if (_treeList != null) {
690            result = 37 * result + _treeList.hashCode();
691         }
692         if (_provenance != null) {
693            result = 37 * result + _provenance.hashCode();
694         }
695         
696         return result;
697     }
698
699     /**
700      * Method isValid.
701      * 
702      * @return true if this object is valid according to the schema
703      */
704     public boolean isValid(
705     ) {
706         try {
707             validate();
708         } catch (org.exolab.castor.xml.ValidationException vex) {
709             return false;
710         }
711         return true;
712     }
713
714     /**
715      * 
716      * 
717      * @param out
718      * @throws org.exolab.castor.xml.MarshalException if object is
719      * null or if any SAXException is thrown during marshaling
720      * @throws org.exolab.castor.xml.ValidationException if this
721      * object is an invalid instance according to the schema
722      */
723     public void marshal(
724             final java.io.Writer out)
725     throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
726         Marshaller.marshal(this, out);
727     }
728
729     /**
730      * 
731      * 
732      * @param handler
733      * @throws java.io.IOException if an IOException occurs during
734      * marshaling
735      * @throws org.exolab.castor.xml.ValidationException if this
736      * object is an invalid instance according to the schema
737      * @throws org.exolab.castor.xml.MarshalException if object is
738      * null or if any SAXException is thrown during marshaling
739      */
740     public void marshal(
741             final org.xml.sax.ContentHandler handler)
742     throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
743         Marshaller.marshal(this, handler);
744     }
745
746     /**
747      * Method removeAlignment.
748      * 
749      * @param vAlignment
750      * @return true if the object was removed from the collection.
751      */
752     public boolean removeAlignment(
753             final uk.ac.vamsas.objects.core.Alignment vAlignment) {
754         boolean removed = _alignmentList.remove(vAlignment);
755         return removed;
756     }
757
758     /**
759      * Method removeAlignmentAt.
760      * 
761      * @param index
762      * @return the element removed from the collection
763      */
764     public uk.ac.vamsas.objects.core.Alignment removeAlignmentAt(
765             final int index) {
766         java.lang.Object obj = this._alignmentList.remove(index);
767         return (uk.ac.vamsas.objects.core.Alignment) obj;
768     }
769
770     /**
771      */
772     public void removeAllAlignment(
773     ) {
774         this._alignmentList.clear();
775     }
776
777     /**
778      */
779     public void removeAllDataSetAnnotations(
780     ) {
781         this._dataSetAnnotationsList.clear();
782     }
783
784     /**
785      */
786     public void removeAllSequence(
787     ) {
788         this._sequenceList.clear();
789     }
790
791     /**
792      */
793     public void removeAllSequenceMapping(
794     ) {
795         this._sequenceMappingList.clear();
796     }
797
798     /**
799      */
800     public void removeAllTree(
801     ) {
802         this._treeList.clear();
803     }
804
805     /**
806      * Method removeDataSetAnnotations.
807      * 
808      * @param vDataSetAnnotations
809      * @return true if the object was removed from the collection.
810      */
811     public boolean removeDataSetAnnotations(
812             final uk.ac.vamsas.objects.core.DataSetAnnotations vDataSetAnnotations) {
813         boolean removed = _dataSetAnnotationsList.remove(vDataSetAnnotations);
814         return removed;
815     }
816
817     /**
818      * Method removeDataSetAnnotationsAt.
819      * 
820      * @param index
821      * @return the element removed from the collection
822      */
823     public uk.ac.vamsas.objects.core.DataSetAnnotations removeDataSetAnnotationsAt(
824             final int index) {
825         java.lang.Object obj = this._dataSetAnnotationsList.remove(index);
826         return (uk.ac.vamsas.objects.core.DataSetAnnotations) obj;
827     }
828
829     /**
830      * Method removeSequence.
831      * 
832      * @param vSequence
833      * @return true if the object was removed from the collection.
834      */
835     public boolean removeSequence(
836             final uk.ac.vamsas.objects.core.Sequence vSequence) {
837         boolean removed = _sequenceList.remove(vSequence);
838         return removed;
839     }
840
841     /**
842      * Method removeSequenceAt.
843      * 
844      * @param index
845      * @return the element removed from the collection
846      */
847     public uk.ac.vamsas.objects.core.Sequence removeSequenceAt(
848             final int index) {
849         java.lang.Object obj = this._sequenceList.remove(index);
850         return (uk.ac.vamsas.objects.core.Sequence) obj;
851     }
852
853     /**
854      * Method removeSequenceMapping.
855      * 
856      * @param vSequenceMapping
857      * @return true if the object was removed from the collection.
858      */
859     public boolean removeSequenceMapping(
860             final uk.ac.vamsas.objects.core.SequenceMapping vSequenceMapping) {
861         boolean removed = _sequenceMappingList.remove(vSequenceMapping);
862         return removed;
863     }
864
865     /**
866      * Method removeSequenceMappingAt.
867      * 
868      * @param index
869      * @return the element removed from the collection
870      */
871     public uk.ac.vamsas.objects.core.SequenceMapping removeSequenceMappingAt(
872             final int index) {
873         java.lang.Object obj = this._sequenceMappingList.remove(index);
874         return (uk.ac.vamsas.objects.core.SequenceMapping) obj;
875     }
876
877     /**
878      * Method removeTree.
879      * 
880      * @param vTree
881      * @return true if the object was removed from the collection.
882      */
883     public boolean removeTree(
884             final uk.ac.vamsas.objects.core.Tree vTree) {
885         boolean removed = _treeList.remove(vTree);
886         return removed;
887     }
888
889     /**
890      * Method removeTreeAt.
891      * 
892      * @param index
893      * @return the element removed from the collection
894      */
895     public uk.ac.vamsas.objects.core.Tree removeTreeAt(
896             final int index) {
897         java.lang.Object obj = this._treeList.remove(index);
898         return (uk.ac.vamsas.objects.core.Tree) obj;
899     }
900
901     /**
902      * 
903      * 
904      * @param index
905      * @param vAlignment
906      * @throws java.lang.IndexOutOfBoundsException if the index
907      * given is outside the bounds of the collection
908      */
909     public void setAlignment(
910             final int index,
911             final uk.ac.vamsas.objects.core.Alignment vAlignment)
912     throws java.lang.IndexOutOfBoundsException {
913         // check bounds for index
914         if (index < 0 || index >= this._alignmentList.size()) {
915             throw new IndexOutOfBoundsException("setAlignment: Index value '" + index + "' not in range [0.." + (this._alignmentList.size() - 1) + "]");
916         }
917         
918         this._alignmentList.set(index, vAlignment);
919     }
920
921     /**
922      * 
923      * 
924      * @param vAlignmentArray
925      */
926     public void setAlignment(
927             final uk.ac.vamsas.objects.core.Alignment[] vAlignmentArray) {
928         //-- copy array
929         _alignmentList.clear();
930         
931         for (int i = 0; i < vAlignmentArray.length; i++) {
932                 this._alignmentList.add(vAlignmentArray[i]);
933         }
934     }
935
936     /**
937      * Sets the value of '_alignmentList' by copying the given
938      * Vector. All elements will be checked for type safety.
939      * 
940      * @param vAlignmentList the Vector to copy.
941      */
942     public void setAlignment(
943             final java.util.Vector vAlignmentList) {
944         // copy vector
945         this._alignmentList.clear();
946         
947         this._alignmentList.addAll(vAlignmentList);
948     }
949
950     /**
951      * Sets the value of '_alignmentList' by setting it to the
952      * given Vector. No type checking is performed.
953      * @deprecated
954      * 
955      * @param alignmentVector the Vector to set.
956      */
957     public void setAlignmentAsReference(
958             final java.util.Vector alignmentVector) {
959         this._alignmentList = alignmentVector;
960     }
961
962     /**
963      * 
964      * 
965      * @param index
966      * @param vDataSetAnnotations
967      * @throws java.lang.IndexOutOfBoundsException if the index
968      * given is outside the bounds of the collection
969      */
970     public void setDataSetAnnotations(
971             final int index,
972             final uk.ac.vamsas.objects.core.DataSetAnnotations vDataSetAnnotations)
973     throws java.lang.IndexOutOfBoundsException {
974         // check bounds for index
975         if (index < 0 || index >= this._dataSetAnnotationsList.size()) {
976             throw new IndexOutOfBoundsException("setDataSetAnnotations: Index value '" + index + "' not in range [0.." + (this._dataSetAnnotationsList.size() - 1) + "]");
977         }
978         
979         this._dataSetAnnotationsList.set(index, vDataSetAnnotations);
980     }
981
982     /**
983      * 
984      * 
985      * @param vDataSetAnnotationsArray
986      */
987     public void setDataSetAnnotations(
988             final uk.ac.vamsas.objects.core.DataSetAnnotations[] vDataSetAnnotationsArray) {
989         //-- copy array
990         _dataSetAnnotationsList.clear();
991         
992         for (int i = 0; i < vDataSetAnnotationsArray.length; i++) {
993                 this._dataSetAnnotationsList.add(vDataSetAnnotationsArray[i]);
994         }
995     }
996
997     /**
998      * Sets the value of '_dataSetAnnotationsList' by copying the
999      * given Vector. All elements will be checked for type safety.
1000      * 
1001      * @param vDataSetAnnotationsList the Vector to copy.
1002      */
1003     public void setDataSetAnnotations(
1004             final java.util.Vector vDataSetAnnotationsList) {
1005         // copy vector
1006         this._dataSetAnnotationsList.clear();
1007         
1008         this._dataSetAnnotationsList.addAll(vDataSetAnnotationsList);
1009     }
1010
1011     /**
1012      * Sets the value of '_dataSetAnnotationsList' by setting it to
1013      * the given Vector. No type checking is performed.
1014      * @deprecated
1015      * 
1016      * @param dataSetAnnotationsVector the Vector to set.
1017      */
1018     public void setDataSetAnnotationsAsReference(
1019             final java.util.Vector dataSetAnnotationsVector) {
1020         this._dataSetAnnotationsList = dataSetAnnotationsVector;
1021     }
1022
1023     /**
1024      * Sets the value of field 'id'. The field 'id' has the
1025      * following description: Primary Key for vamsas object
1026      * referencing 
1027      * 
1028      * @param id the value of field 'id'.
1029      */
1030     public void setId(
1031             final java.lang.String id) {
1032         this._id = id;
1033     }
1034
1035     /**
1036      * Sets the value of field 'provenance'.
1037      * 
1038      * @param provenance the value of field 'provenance'.
1039      */
1040     public void setProvenance(
1041             final uk.ac.vamsas.objects.core.Provenance provenance) {
1042         this._provenance = provenance;
1043     }
1044
1045     /**
1046      * 
1047      * 
1048      * @param index
1049      * @param vSequence
1050      * @throws java.lang.IndexOutOfBoundsException if the index
1051      * given is outside the bounds of the collection
1052      */
1053     public void setSequence(
1054             final int index,
1055             final uk.ac.vamsas.objects.core.Sequence vSequence)
1056     throws java.lang.IndexOutOfBoundsException {
1057         // check bounds for index
1058         if (index < 0 || index >= this._sequenceList.size()) {
1059             throw new IndexOutOfBoundsException("setSequence: Index value '" + index + "' not in range [0.." + (this._sequenceList.size() - 1) + "]");
1060         }
1061         
1062         this._sequenceList.set(index, vSequence);
1063     }
1064
1065     /**
1066      * 
1067      * 
1068      * @param vSequenceArray
1069      */
1070     public void setSequence(
1071             final uk.ac.vamsas.objects.core.Sequence[] vSequenceArray) {
1072         //-- copy array
1073         _sequenceList.clear();
1074         
1075         for (int i = 0; i < vSequenceArray.length; i++) {
1076                 this._sequenceList.add(vSequenceArray[i]);
1077         }
1078     }
1079
1080     /**
1081      * Sets the value of '_sequenceList' by copying the given
1082      * Vector. All elements will be checked for type safety.
1083      * 
1084      * @param vSequenceList the Vector to copy.
1085      */
1086     public void setSequence(
1087             final java.util.Vector vSequenceList) {
1088         // copy vector
1089         this._sequenceList.clear();
1090         
1091         this._sequenceList.addAll(vSequenceList);
1092     }
1093
1094     /**
1095      * Sets the value of '_sequenceList' by setting it to the given
1096      * Vector. No type checking is performed.
1097      * @deprecated
1098      * 
1099      * @param sequenceVector the Vector to set.
1100      */
1101     public void setSequenceAsReference(
1102             final java.util.Vector sequenceVector) {
1103         this._sequenceList = sequenceVector;
1104     }
1105
1106     /**
1107      * 
1108      * 
1109      * @param index
1110      * @param vSequenceMapping
1111      * @throws java.lang.IndexOutOfBoundsException if the index
1112      * given is outside the bounds of the collection
1113      */
1114     public void setSequenceMapping(
1115             final int index,
1116             final uk.ac.vamsas.objects.core.SequenceMapping vSequenceMapping)
1117     throws java.lang.IndexOutOfBoundsException {
1118         // check bounds for index
1119         if (index < 0 || index >= this._sequenceMappingList.size()) {
1120             throw new IndexOutOfBoundsException("setSequenceMapping: Index value '" + index + "' not in range [0.." + (this._sequenceMappingList.size() - 1) + "]");
1121         }
1122         
1123         this._sequenceMappingList.set(index, vSequenceMapping);
1124     }
1125
1126     /**
1127      * 
1128      * 
1129      * @param vSequenceMappingArray
1130      */
1131     public void setSequenceMapping(
1132             final uk.ac.vamsas.objects.core.SequenceMapping[] vSequenceMappingArray) {
1133         //-- copy array
1134         _sequenceMappingList.clear();
1135         
1136         for (int i = 0; i < vSequenceMappingArray.length; i++) {
1137                 this._sequenceMappingList.add(vSequenceMappingArray[i]);
1138         }
1139     }
1140
1141     /**
1142      * Sets the value of '_sequenceMappingList' by copying the
1143      * given Vector. All elements will be checked for type safety.
1144      * 
1145      * @param vSequenceMappingList the Vector to copy.
1146      */
1147     public void setSequenceMapping(
1148             final java.util.Vector vSequenceMappingList) {
1149         // copy vector
1150         this._sequenceMappingList.clear();
1151         
1152         this._sequenceMappingList.addAll(vSequenceMappingList);
1153     }
1154
1155     /**
1156      * Sets the value of '_sequenceMappingList' by setting it to
1157      * the given Vector. No type checking is performed.
1158      * @deprecated
1159      * 
1160      * @param sequenceMappingVector the Vector to set.
1161      */
1162     public void setSequenceMappingAsReference(
1163             final java.util.Vector sequenceMappingVector) {
1164         this._sequenceMappingList = sequenceMappingVector;
1165     }
1166
1167     /**
1168      * 
1169      * 
1170      * @param index
1171      * @param vTree
1172      * @throws java.lang.IndexOutOfBoundsException if the index
1173      * given is outside the bounds of the collection
1174      */
1175     public void setTree(
1176             final int index,
1177             final uk.ac.vamsas.objects.core.Tree vTree)
1178     throws java.lang.IndexOutOfBoundsException {
1179         // check bounds for index
1180         if (index < 0 || index >= this._treeList.size()) {
1181             throw new IndexOutOfBoundsException("setTree: Index value '" + index + "' not in range [0.." + (this._treeList.size() - 1) + "]");
1182         }
1183         
1184         this._treeList.set(index, vTree);
1185     }
1186
1187     /**
1188      * 
1189      * 
1190      * @param vTreeArray
1191      */
1192     public void setTree(
1193             final uk.ac.vamsas.objects.core.Tree[] vTreeArray) {
1194         //-- copy array
1195         _treeList.clear();
1196         
1197         for (int i = 0; i < vTreeArray.length; i++) {
1198                 this._treeList.add(vTreeArray[i]);
1199         }
1200     }
1201
1202     /**
1203      * Sets the value of '_treeList' by copying the given Vector.
1204      * All elements will be checked for type safety.
1205      * 
1206      * @param vTreeList the Vector to copy.
1207      */
1208     public void setTree(
1209             final java.util.Vector vTreeList) {
1210         // copy vector
1211         this._treeList.clear();
1212         
1213         this._treeList.addAll(vTreeList);
1214     }
1215
1216     /**
1217      * Sets the value of '_treeList' by setting it to the given
1218      * Vector. No type checking is performed.
1219      * @deprecated
1220      * 
1221      * @param treeVector the Vector to set.
1222      */
1223     public void setTreeAsReference(
1224             final java.util.Vector treeVector) {
1225         this._treeList = treeVector;
1226     }
1227
1228     /**
1229      * Method unmarshal.
1230      * 
1231      * @param reader
1232      * @throws org.exolab.castor.xml.MarshalException if object is
1233      * null or if any SAXException is thrown during marshaling
1234      * @throws org.exolab.castor.xml.ValidationException if this
1235      * object is an invalid instance according to the schema
1236      * @return the unmarshaled uk.ac.vamsas.objects.core.DataSet
1237      */
1238     public static uk.ac.vamsas.objects.core.DataSet unmarshal(
1239             final java.io.Reader reader)
1240     throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
1241         return (uk.ac.vamsas.objects.core.DataSet) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.DataSet.class, reader);
1242     }
1243
1244     /**
1245      * 
1246      * 
1247      * @throws org.exolab.castor.xml.ValidationException if this
1248      * object is an invalid instance according to the schema
1249      */
1250     public void validate(
1251     )
1252     throws org.exolab.castor.xml.ValidationException {
1253         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
1254         validator.validate(this);
1255     }
1256
1257 }