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