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