JAL-1503 update version in GPL header
[jalview.git] / src / jalview / schemabinding / version2 / SequenceSet.java
1 /*******************************************************************************
2  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.1)
3  * Copyright (C) 2014 The Jalview Authors
4  * 
5  * This file is part of Jalview.
6  * 
7  * Jalview is free software: you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License 
9  * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
10  *  
11  * Jalview is distributed in the hope that it will be useful, but 
12  * WITHOUT ANY WARRANTY; without even the implied warranty 
13  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
14  * PURPOSE.  See the GNU General Public License for more details.
15  * 
16  * You should have received a copy of the GNU General Public License along with Jalview.  
17  * If not, see <http://www.gnu.org/licenses/>.
18  * The Jalview Authors are detailed in the 'AUTHORS' file.
19  ******************************************************************************/
20 /*
21  * This class was automatically generated with 
22  * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
23  * Schema.
24  * $Id$
25  */
26
27 package jalview.schemabinding.version2;
28
29 //---------------------------------/
30 //- Imported classes and packages -/
31 //---------------------------------/
32
33 import org.exolab.castor.xml.Marshaller;
34 import org.exolab.castor.xml.Unmarshaller;
35
36 /**
37  * Class SequenceSet.
38  * 
39  * @version $Revision$ $Date$
40  */
41 public class SequenceSet implements java.io.Serializable
42 {
43
44   // --------------------------/
45   // - Class/Member Variables -/
46   // --------------------------/
47
48   /**
49    * Field _gapChar.
50    */
51   private java.lang.String _gapChar;
52
53   /**
54    * reference to set where jalview will gather the dataset sequences for all
55    * sequences in the set.
56    * 
57    */
58   private java.lang.String _datasetId;
59
60   /**
61    * Field _sequenceList.
62    */
63   private java.util.Vector _sequenceList;
64
65   /**
66    * Field _annotationList.
67    */
68   private java.util.Vector _annotationList;
69
70   /**
71    * Field _sequenceSetPropertiesList.
72    */
73   private java.util.Vector _sequenceSetPropertiesList;
74
75   /**
76    * Field _alcodonFrameList.
77    */
78   private java.util.Vector _alcodonFrameList;
79
80   // ----------------/
81   // - Constructors -/
82   // ----------------/
83
84   public SequenceSet()
85   {
86     super();
87     this._sequenceList = new java.util.Vector();
88     this._annotationList = new java.util.Vector();
89     this._sequenceSetPropertiesList = new java.util.Vector();
90     this._alcodonFrameList = new java.util.Vector();
91   }
92
93   // -----------/
94   // - Methods -/
95   // -----------/
96
97   /**
98    * 
99    * 
100    * @param vAlcodonFrame
101    * @throws java.lang.IndexOutOfBoundsException
102    *           if the index given is outside the bounds of the collection
103    */
104   public void addAlcodonFrame(
105           final jalview.schemabinding.version2.AlcodonFrame vAlcodonFrame)
106           throws java.lang.IndexOutOfBoundsException
107   {
108     this._alcodonFrameList.addElement(vAlcodonFrame);
109   }
110
111   /**
112    * 
113    * 
114    * @param index
115    * @param vAlcodonFrame
116    * @throws java.lang.IndexOutOfBoundsException
117    *           if the index given is outside the bounds of the collection
118    */
119   public void addAlcodonFrame(final int index,
120           final jalview.schemabinding.version2.AlcodonFrame vAlcodonFrame)
121           throws java.lang.IndexOutOfBoundsException
122   {
123     this._alcodonFrameList.add(index, vAlcodonFrame);
124   }
125
126   /**
127    * 
128    * 
129    * @param vAnnotation
130    * @throws java.lang.IndexOutOfBoundsException
131    *           if the index given is outside the bounds of the collection
132    */
133   public void addAnnotation(
134           final jalview.schemabinding.version2.Annotation vAnnotation)
135           throws java.lang.IndexOutOfBoundsException
136   {
137     this._annotationList.addElement(vAnnotation);
138   }
139
140   /**
141    * 
142    * 
143    * @param index
144    * @param vAnnotation
145    * @throws java.lang.IndexOutOfBoundsException
146    *           if the index given is outside the bounds of the collection
147    */
148   public void addAnnotation(final int index,
149           final jalview.schemabinding.version2.Annotation vAnnotation)
150           throws java.lang.IndexOutOfBoundsException
151   {
152     this._annotationList.add(index, vAnnotation);
153   }
154
155   /**
156    * 
157    * 
158    * @param vSequence
159    * @throws java.lang.IndexOutOfBoundsException
160    *           if the index given is outside the bounds of the collection
161    */
162   public void addSequence(
163           final jalview.schemabinding.version2.Sequence vSequence)
164           throws java.lang.IndexOutOfBoundsException
165   {
166     this._sequenceList.addElement(vSequence);
167   }
168
169   /**
170    * 
171    * 
172    * @param index
173    * @param vSequence
174    * @throws java.lang.IndexOutOfBoundsException
175    *           if the index given is outside the bounds of the collection
176    */
177   public void addSequence(final int index,
178           final jalview.schemabinding.version2.Sequence vSequence)
179           throws java.lang.IndexOutOfBoundsException
180   {
181     this._sequenceList.add(index, vSequence);
182   }
183
184   /**
185    * 
186    * 
187    * @param vSequenceSetProperties
188    * @throws java.lang.IndexOutOfBoundsException
189    *           if the index given is outside the bounds of the collection
190    */
191   public void addSequenceSetProperties(
192           final jalview.schemabinding.version2.SequenceSetProperties vSequenceSetProperties)
193           throws java.lang.IndexOutOfBoundsException
194   {
195     this._sequenceSetPropertiesList.addElement(vSequenceSetProperties);
196   }
197
198   /**
199    * 
200    * 
201    * @param index
202    * @param vSequenceSetProperties
203    * @throws java.lang.IndexOutOfBoundsException
204    *           if the index given is outside the bounds of the collection
205    */
206   public void addSequenceSetProperties(
207           final int index,
208           final jalview.schemabinding.version2.SequenceSetProperties vSequenceSetProperties)
209           throws java.lang.IndexOutOfBoundsException
210   {
211     this._sequenceSetPropertiesList.add(index, vSequenceSetProperties);
212   }
213
214   /**
215    * Method enumerateAlcodonFrame.
216    * 
217    * @return an Enumeration over all jalview.schemabinding.version2.AlcodonFrame
218    *         elements
219    */
220   public java.util.Enumeration enumerateAlcodonFrame()
221   {
222     return this._alcodonFrameList.elements();
223   }
224
225   /**
226    * Method enumerateAnnotation.
227    * 
228    * @return an Enumeration over all jalview.schemabinding.version2.Annotation
229    *         elements
230    */
231   public java.util.Enumeration enumerateAnnotation()
232   {
233     return this._annotationList.elements();
234   }
235
236   /**
237    * Method enumerateSequence.
238    * 
239    * @return an Enumeration over all jalview.schemabinding.version2.Sequence
240    *         elements
241    */
242   public java.util.Enumeration enumerateSequence()
243   {
244     return this._sequenceList.elements();
245   }
246
247   /**
248    * Method enumerateSequenceSetProperties.
249    * 
250    * @return an Enumeration over all
251    *         jalview.schemabinding.version2.SequenceSetProperties elements
252    */
253   public java.util.Enumeration enumerateSequenceSetProperties()
254   {
255     return this._sequenceSetPropertiesList.elements();
256   }
257
258   /**
259    * Method getAlcodonFrame.
260    * 
261    * @param index
262    * @throws java.lang.IndexOutOfBoundsException
263    *           if the index given is outside the bounds of the collection
264    * @return the value of the jalview.schemabinding.version2.AlcodonFrame at the
265    *         given inde
266    */
267   public jalview.schemabinding.version2.AlcodonFrame getAlcodonFrame(
268           final int index) throws java.lang.IndexOutOfBoundsException
269   {
270     // check bounds for index
271     if (index < 0 || index >= this._alcodonFrameList.size())
272     {
273       throw new IndexOutOfBoundsException("getAlcodonFrame: Index value '"
274               + index + "' not in range [0.."
275               + (this._alcodonFrameList.size() - 1) + "]");
276     }
277
278     return (jalview.schemabinding.version2.AlcodonFrame) _alcodonFrameList
279             .get(index);
280   }
281
282   /**
283    * Method getAlcodonFrame.Returns the contents of the collection in an Array.
284    * <p>
285    * Note: Just in case the collection contents are changing in another thread,
286    * we pass a 0-length Array of the correct type into the API call. This way we
287    * <i>know</i> that the Array returned is of exactly the correct length.
288    * 
289    * @return this collection as an Array
290    */
291   public jalview.schemabinding.version2.AlcodonFrame[] getAlcodonFrame()
292   {
293     jalview.schemabinding.version2.AlcodonFrame[] array = new jalview.schemabinding.version2.AlcodonFrame[0];
294     return (jalview.schemabinding.version2.AlcodonFrame[]) this._alcodonFrameList
295             .toArray(array);
296   }
297
298   /**
299    * Method getAlcodonFrameCount.
300    * 
301    * @return the size of this collection
302    */
303   public int getAlcodonFrameCount()
304   {
305     return this._alcodonFrameList.size();
306   }
307
308   /**
309    * Method getAnnotation.
310    * 
311    * @param index
312    * @throws java.lang.IndexOutOfBoundsException
313    *           if the index given is outside the bounds of the collection
314    * @return the value of the jalview.schemabinding.version2.Annotation at the
315    *         given index
316    */
317   public jalview.schemabinding.version2.Annotation getAnnotation(
318           final int index) throws java.lang.IndexOutOfBoundsException
319   {
320     // check bounds for index
321     if (index < 0 || index >= this._annotationList.size())
322     {
323       throw new IndexOutOfBoundsException("getAnnotation: Index value '"
324               + index + "' not in range [0.."
325               + (this._annotationList.size() - 1) + "]");
326     }
327
328     return (jalview.schemabinding.version2.Annotation) _annotationList
329             .get(index);
330   }
331
332   /**
333    * Method getAnnotation.Returns the contents of the collection in an Array.
334    * <p>
335    * Note: Just in case the collection contents are changing in another thread,
336    * we pass a 0-length Array of the correct type into the API call. This way we
337    * <i>know</i> that the Array returned is of exactly the correct length.
338    * 
339    * @return this collection as an Array
340    */
341   public jalview.schemabinding.version2.Annotation[] getAnnotation()
342   {
343     jalview.schemabinding.version2.Annotation[] array = new jalview.schemabinding.version2.Annotation[0];
344     return (jalview.schemabinding.version2.Annotation[]) this._annotationList
345             .toArray(array);
346   }
347
348   /**
349    * Method getAnnotationCount.
350    * 
351    * @return the size of this collection
352    */
353   public int getAnnotationCount()
354   {
355     return this._annotationList.size();
356   }
357
358   /**
359    * Returns the value of field 'datasetId'. The field 'datasetId' has the
360    * following description: reference to set where jalview will gather the
361    * dataset sequences for all sequences in the set.
362    * 
363    * 
364    * @return the value of field 'DatasetId'.
365    */
366   public java.lang.String getDatasetId()
367   {
368     return this._datasetId;
369   }
370
371   /**
372    * Returns the value of field 'gapChar'.
373    * 
374    * @return the value of field 'GapChar'.
375    */
376   public java.lang.String getGapChar()
377   {
378     return this._gapChar;
379   }
380
381   /**
382    * Method getSequence.
383    * 
384    * @param index
385    * @throws java.lang.IndexOutOfBoundsException
386    *           if the index given is outside the bounds of the collection
387    * @return the value of the jalview.schemabinding.version2.Sequence at the
388    *         given index
389    */
390   public jalview.schemabinding.version2.Sequence getSequence(final int index)
391           throws java.lang.IndexOutOfBoundsException
392   {
393     // check bounds for index
394     if (index < 0 || index >= this._sequenceList.size())
395     {
396       throw new IndexOutOfBoundsException("getSequence: Index value '"
397               + index + "' not in range [0.."
398               + (this._sequenceList.size() - 1) + "]");
399     }
400
401     return (jalview.schemabinding.version2.Sequence) _sequenceList
402             .get(index);
403   }
404
405   /**
406    * Method getSequence.Returns the contents of the collection in an Array.
407    * <p>
408    * Note: Just in case the collection contents are changing in another thread,
409    * we pass a 0-length Array of the correct type into the API call. This way we
410    * <i>know</i> that the Array returned is of exactly the correct length.
411    * 
412    * @return this collection as an Array
413    */
414   public jalview.schemabinding.version2.Sequence[] getSequence()
415   {
416     jalview.schemabinding.version2.Sequence[] array = new jalview.schemabinding.version2.Sequence[0];
417     return (jalview.schemabinding.version2.Sequence[]) this._sequenceList
418             .toArray(array);
419   }
420
421   /**
422    * Method getSequenceCount.
423    * 
424    * @return the size of this collection
425    */
426   public int getSequenceCount()
427   {
428     return this._sequenceList.size();
429   }
430
431   /**
432    * Method getSequenceSetProperties.
433    * 
434    * @param index
435    * @throws java.lang.IndexOutOfBoundsException
436    *           if the index given is outside the bounds of the collection
437    * @return the value of the
438    *         jalview.schemabinding.version2.SequenceSetProperties at the given
439    *         index
440    */
441   public jalview.schemabinding.version2.SequenceSetProperties getSequenceSetProperties(
442           final int index) throws java.lang.IndexOutOfBoundsException
443   {
444     // check bounds for index
445     if (index < 0 || index >= this._sequenceSetPropertiesList.size())
446     {
447       throw new IndexOutOfBoundsException(
448               "getSequenceSetProperties: Index value '" + index
449                       + "' not in range [0.."
450                       + (this._sequenceSetPropertiesList.size() - 1) + "]");
451     }
452
453     return (jalview.schemabinding.version2.SequenceSetProperties) _sequenceSetPropertiesList
454             .get(index);
455   }
456
457   /**
458    * Method getSequenceSetProperties.Returns the contents of the collection in
459    * an Array.
460    * <p>
461    * Note: Just in case the collection contents are changing in another thread,
462    * we pass a 0-length Array of the correct type into the API call. This way we
463    * <i>know</i> that the Array returned is of exactly the correct length.
464    * 
465    * @return this collection as an Array
466    */
467   public jalview.schemabinding.version2.SequenceSetProperties[] getSequenceSetProperties()
468   {
469     jalview.schemabinding.version2.SequenceSetProperties[] array = new jalview.schemabinding.version2.SequenceSetProperties[0];
470     return (jalview.schemabinding.version2.SequenceSetProperties[]) this._sequenceSetPropertiesList
471             .toArray(array);
472   }
473
474   /**
475    * Method getSequenceSetPropertiesCount.
476    * 
477    * @return the size of this collection
478    */
479   public int getSequenceSetPropertiesCount()
480   {
481     return this._sequenceSetPropertiesList.size();
482   }
483
484   /**
485    * Method isValid.
486    * 
487    * @return true if this object is valid according to the schema
488    */
489   public boolean isValid()
490   {
491     try
492     {
493       validate();
494     } catch (org.exolab.castor.xml.ValidationException vex)
495     {
496       return false;
497     }
498     return true;
499   }
500
501   /**
502    * 
503    * 
504    * @param out
505    * @throws org.exolab.castor.xml.MarshalException
506    *           if object is null or if any SAXException is thrown during
507    *           marshaling
508    * @throws org.exolab.castor.xml.ValidationException
509    *           if this object is an invalid instance according to the schema
510    */
511   public void marshal(final java.io.Writer out)
512           throws org.exolab.castor.xml.MarshalException,
513           org.exolab.castor.xml.ValidationException
514   {
515     Marshaller.marshal(this, out);
516   }
517
518   /**
519    * 
520    * 
521    * @param handler
522    * @throws java.io.IOException
523    *           if an IOException occurs during marshaling
524    * @throws org.exolab.castor.xml.ValidationException
525    *           if this object is an invalid instance according to the schema
526    * @throws org.exolab.castor.xml.MarshalException
527    *           if object is null or if any SAXException is thrown during
528    *           marshaling
529    */
530   public void marshal(final org.xml.sax.ContentHandler handler)
531           throws java.io.IOException,
532           org.exolab.castor.xml.MarshalException,
533           org.exolab.castor.xml.ValidationException
534   {
535     Marshaller.marshal(this, handler);
536   }
537
538   /**
539    * Method removeAlcodonFrame.
540    * 
541    * @param vAlcodonFrame
542    * @return true if the object was removed from the collection.
543    */
544   public boolean removeAlcodonFrame(
545           final jalview.schemabinding.version2.AlcodonFrame vAlcodonFrame)
546   {
547     boolean removed = _alcodonFrameList.remove(vAlcodonFrame);
548     return removed;
549   }
550
551   /**
552    * Method removeAlcodonFrameAt.
553    * 
554    * @param index
555    * @return the element removed from the collection
556    */
557   public jalview.schemabinding.version2.AlcodonFrame removeAlcodonFrameAt(
558           final int index)
559   {
560     java.lang.Object obj = this._alcodonFrameList.remove(index);
561     return (jalview.schemabinding.version2.AlcodonFrame) obj;
562   }
563
564   /**
565      */
566   public void removeAllAlcodonFrame()
567   {
568     this._alcodonFrameList.clear();
569   }
570
571   /**
572      */
573   public void removeAllAnnotation()
574   {
575     this._annotationList.clear();
576   }
577
578   /**
579      */
580   public void removeAllSequence()
581   {
582     this._sequenceList.clear();
583   }
584
585   /**
586      */
587   public void removeAllSequenceSetProperties()
588   {
589     this._sequenceSetPropertiesList.clear();
590   }
591
592   /**
593    * Method removeAnnotation.
594    * 
595    * @param vAnnotation
596    * @return true if the object was removed from the collection.
597    */
598   public boolean removeAnnotation(
599           final jalview.schemabinding.version2.Annotation vAnnotation)
600   {
601     boolean removed = _annotationList.remove(vAnnotation);
602     return removed;
603   }
604
605   /**
606    * Method removeAnnotationAt.
607    * 
608    * @param index
609    * @return the element removed from the collection
610    */
611   public jalview.schemabinding.version2.Annotation removeAnnotationAt(
612           final int index)
613   {
614     java.lang.Object obj = this._annotationList.remove(index);
615     return (jalview.schemabinding.version2.Annotation) obj;
616   }
617
618   /**
619    * Method removeSequence.
620    * 
621    * @param vSequence
622    * @return true if the object was removed from the collection.
623    */
624   public boolean removeSequence(
625           final jalview.schemabinding.version2.Sequence vSequence)
626   {
627     boolean removed = _sequenceList.remove(vSequence);
628     return removed;
629   }
630
631   /**
632    * Method removeSequenceAt.
633    * 
634    * @param index
635    * @return the element removed from the collection
636    */
637   public jalview.schemabinding.version2.Sequence removeSequenceAt(
638           final int index)
639   {
640     java.lang.Object obj = this._sequenceList.remove(index);
641     return (jalview.schemabinding.version2.Sequence) obj;
642   }
643
644   /**
645    * Method removeSequenceSetProperties.
646    * 
647    * @param vSequenceSetProperties
648    * @return true if the object was removed from the collection.
649    */
650   public boolean removeSequenceSetProperties(
651           final jalview.schemabinding.version2.SequenceSetProperties vSequenceSetProperties)
652   {
653     boolean removed = _sequenceSetPropertiesList
654             .remove(vSequenceSetProperties);
655     return removed;
656   }
657
658   /**
659    * Method removeSequenceSetPropertiesAt.
660    * 
661    * @param index
662    * @return the element removed from the collection
663    */
664   public jalview.schemabinding.version2.SequenceSetProperties removeSequenceSetPropertiesAt(
665           final int index)
666   {
667     java.lang.Object obj = this._sequenceSetPropertiesList.remove(index);
668     return (jalview.schemabinding.version2.SequenceSetProperties) obj;
669   }
670
671   /**
672    * 
673    * 
674    * @param index
675    * @param vAlcodonFrame
676    * @throws java.lang.IndexOutOfBoundsException
677    *           if the index given is outside the bounds of the collection
678    */
679   public void setAlcodonFrame(final int index,
680           final jalview.schemabinding.version2.AlcodonFrame vAlcodonFrame)
681           throws java.lang.IndexOutOfBoundsException
682   {
683     // check bounds for index
684     if (index < 0 || index >= this._alcodonFrameList.size())
685     {
686       throw new IndexOutOfBoundsException("setAlcodonFrame: Index value '"
687               + index + "' not in range [0.."
688               + (this._alcodonFrameList.size() - 1) + "]");
689     }
690
691     this._alcodonFrameList.set(index, vAlcodonFrame);
692   }
693
694   /**
695    * 
696    * 
697    * @param vAlcodonFrameArray
698    */
699   public void setAlcodonFrame(
700           final jalview.schemabinding.version2.AlcodonFrame[] vAlcodonFrameArray)
701   {
702     // -- copy array
703     _alcodonFrameList.clear();
704
705     for (int i = 0; i < vAlcodonFrameArray.length; i++)
706     {
707       this._alcodonFrameList.add(vAlcodonFrameArray[i]);
708     }
709   }
710
711   /**
712    * 
713    * 
714    * @param index
715    * @param vAnnotation
716    * @throws java.lang.IndexOutOfBoundsException
717    *           if the index given is outside the bounds of the collection
718    */
719   public void setAnnotation(final int index,
720           final jalview.schemabinding.version2.Annotation vAnnotation)
721           throws java.lang.IndexOutOfBoundsException
722   {
723     // check bounds for index
724     if (index < 0 || index >= this._annotationList.size())
725     {
726       throw new IndexOutOfBoundsException("setAnnotation: Index value '"
727               + index + "' not in range [0.."
728               + (this._annotationList.size() - 1) + "]");
729     }
730
731     this._annotationList.set(index, vAnnotation);
732   }
733
734   /**
735    * 
736    * 
737    * @param vAnnotationArray
738    */
739   public void setAnnotation(
740           final jalview.schemabinding.version2.Annotation[] vAnnotationArray)
741   {
742     // -- copy array
743     _annotationList.clear();
744
745     for (int i = 0; i < vAnnotationArray.length; i++)
746     {
747       this._annotationList.add(vAnnotationArray[i]);
748     }
749   }
750
751   /**
752    * Sets the value of field 'datasetId'. The field 'datasetId' has the
753    * following description: reference to set where jalview will gather the
754    * dataset sequences for all sequences in the set.
755    * 
756    * 
757    * @param datasetId
758    *          the value of field 'datasetId'.
759    */
760   public void setDatasetId(final java.lang.String datasetId)
761   {
762     this._datasetId = datasetId;
763   }
764
765   /**
766    * Sets the value of field 'gapChar'.
767    * 
768    * @param gapChar
769    *          the value of field 'gapChar'.
770    */
771   public void setGapChar(final java.lang.String gapChar)
772   {
773     this._gapChar = gapChar;
774   }
775
776   /**
777    * 
778    * 
779    * @param index
780    * @param vSequence
781    * @throws java.lang.IndexOutOfBoundsException
782    *           if the index given is outside the bounds of the collection
783    */
784   public void setSequence(final int index,
785           final jalview.schemabinding.version2.Sequence vSequence)
786           throws java.lang.IndexOutOfBoundsException
787   {
788     // check bounds for index
789     if (index < 0 || index >= this._sequenceList.size())
790     {
791       throw new IndexOutOfBoundsException("setSequence: Index value '"
792               + index + "' not in range [0.."
793               + (this._sequenceList.size() - 1) + "]");
794     }
795
796     this._sequenceList.set(index, vSequence);
797   }
798
799   /**
800    * 
801    * 
802    * @param vSequenceArray
803    */
804   public void setSequence(
805           final jalview.schemabinding.version2.Sequence[] vSequenceArray)
806   {
807     // -- copy array
808     _sequenceList.clear();
809
810     for (int i = 0; i < vSequenceArray.length; i++)
811     {
812       this._sequenceList.add(vSequenceArray[i]);
813     }
814   }
815
816   /**
817    * 
818    * 
819    * @param index
820    * @param vSequenceSetProperties
821    * @throws java.lang.IndexOutOfBoundsException
822    *           if the index given is outside the bounds of the collection
823    */
824   public void setSequenceSetProperties(
825           final int index,
826           final jalview.schemabinding.version2.SequenceSetProperties vSequenceSetProperties)
827           throws java.lang.IndexOutOfBoundsException
828   {
829     // check bounds for index
830     if (index < 0 || index >= this._sequenceSetPropertiesList.size())
831     {
832       throw new IndexOutOfBoundsException(
833               "setSequenceSetProperties: Index value '" + index
834                       + "' not in range [0.."
835                       + (this._sequenceSetPropertiesList.size() - 1) + "]");
836     }
837
838     this._sequenceSetPropertiesList.set(index, vSequenceSetProperties);
839   }
840
841   /**
842    * 
843    * 
844    * @param vSequenceSetPropertiesArray
845    */
846   public void setSequenceSetProperties(
847           final jalview.schemabinding.version2.SequenceSetProperties[] vSequenceSetPropertiesArray)
848   {
849     // -- copy array
850     _sequenceSetPropertiesList.clear();
851
852     for (int i = 0; i < vSequenceSetPropertiesArray.length; i++)
853     {
854       this._sequenceSetPropertiesList.add(vSequenceSetPropertiesArray[i]);
855     }
856   }
857
858   /**
859    * Method unmarshal.
860    * 
861    * @param reader
862    * @throws org.exolab.castor.xml.MarshalException
863    *           if object is null or if any SAXException is thrown during
864    *           marshaling
865    * @throws org.exolab.castor.xml.ValidationException
866    *           if this object is an invalid instance according to the schema
867    * @return the unmarshaled jalview.schemabinding.version2.SequenceSet
868    */
869   public static jalview.schemabinding.version2.SequenceSet unmarshal(
870           final java.io.Reader reader)
871           throws org.exolab.castor.xml.MarshalException,
872           org.exolab.castor.xml.ValidationException
873   {
874     return (jalview.schemabinding.version2.SequenceSet) Unmarshaller
875             .unmarshal(jalview.schemabinding.version2.SequenceSet.class,
876                     reader);
877   }
878
879   /**
880    * 
881    * 
882    * @throws org.exolab.castor.xml.ValidationException
883    *           if this object is an invalid instance according to the schema
884    */
885   public void validate() throws org.exolab.castor.xml.ValidationException
886   {
887     org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
888     validator.validate(this);
889   }
890
891 }