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