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