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