5ebcee6497257f7c581264eeaf9f21813dd882a9
[jalview.git] / src / jalview / binding / 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.binding;
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.binding.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.binding.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.binding.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.binding.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.binding.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.binding.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.binding.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.binding.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.binding.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.binding.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.binding.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 jalview.binding.JGroup
222      * 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 jalview.binding.JSeq elements
233      */
234     public java.util.Enumeration enumerateJSeq(
235     ) {
236         return this._JSeqList.elements();
237     }
238
239     /**
240      * Method enumerateTree.
241      * 
242      * @return an Enumeration over all jalview.binding.Tree elements
243      */
244     public java.util.Enumeration enumerateTree(
245     ) {
246         return this._treeList.elements();
247     }
248
249     /**
250      * Method enumerateUserColours.
251      * 
252      * @return an Enumeration over all jalview.binding.UserColours
253      * elements
254      */
255     public java.util.Enumeration enumerateUserColours(
256     ) {
257         return this._userColoursList.elements();
258     }
259
260     /**
261      * Method enumerateViewport.
262      * 
263      * @return an Enumeration over all jalview.binding.Viewport
264      * elements
265      */
266     public java.util.Enumeration enumerateViewport(
267     ) {
268         return this._viewportList.elements();
269     }
270
271     /**
272      * Returns the value of field 'featureSettings'.
273      * 
274      * @return the value of field 'FeatureSettings'.
275      */
276     public jalview.binding.FeatureSettings getFeatureSettings(
277     ) {
278         return this._featureSettings;
279     }
280
281     /**
282      * Method getJGroup.
283      * 
284      * @param index
285      * @throws java.lang.IndexOutOfBoundsException if the index
286      * given is outside the bounds of the collection
287      * @return the value of the jalview.binding.JGroup at the given
288      * index
289      */
290     public jalview.binding.JGroup getJGroup(
291             final int index)
292     throws java.lang.IndexOutOfBoundsException {
293         // check bounds for index
294         if (index < 0 || index >= this._JGroupList.size()) {
295             throw new IndexOutOfBoundsException("getJGroup: Index value '" + index + "' not in range [0.." + (this._JGroupList.size() - 1) + "]");
296         }
297         
298         return (jalview.binding.JGroup) _JGroupList.get(index);
299     }
300
301     /**
302      * Method getJGroup.Returns the contents of the collection in
303      * an Array.  <p>Note:  Just in case the collection contents
304      * are changing in another thread, we pass a 0-length Array of
305      * the correct type into the API call.  This way we <i>know</i>
306      * that the Array returned is of exactly the correct length.
307      * 
308      * @return this collection as an Array
309      */
310     public jalview.binding.JGroup[] getJGroup(
311     ) {
312         jalview.binding.JGroup[] array = new jalview.binding.JGroup[0];
313         return (jalview.binding.JGroup[]) this._JGroupList.toArray(array);
314     }
315
316     /**
317      * Method getJGroupCount.
318      * 
319      * @return the size of this collection
320      */
321     public int getJGroupCount(
322     ) {
323         return this._JGroupList.size();
324     }
325
326     /**
327      * Method getJSeq.
328      * 
329      * @param index
330      * @throws java.lang.IndexOutOfBoundsException if the index
331      * given is outside the bounds of the collection
332      * @return the value of the jalview.binding.JSeq at the given
333      * index
334      */
335     public jalview.binding.JSeq getJSeq(
336             final int index)
337     throws java.lang.IndexOutOfBoundsException {
338         // check bounds for index
339         if (index < 0 || index >= this._JSeqList.size()) {
340             throw new IndexOutOfBoundsException("getJSeq: Index value '" + index + "' not in range [0.." + (this._JSeqList.size() - 1) + "]");
341         }
342         
343         return (jalview.binding.JSeq) _JSeqList.get(index);
344     }
345
346     /**
347      * Method getJSeq.Returns the contents of the collection in an
348      * Array.  <p>Note:  Just in case the collection contents are
349      * changing in another thread, we pass a 0-length Array of the
350      * correct type into the API call.  This way we <i>know</i>
351      * that the Array returned is of exactly the correct length.
352      * 
353      * @return this collection as an Array
354      */
355     public jalview.binding.JSeq[] getJSeq(
356     ) {
357         jalview.binding.JSeq[] array = new jalview.binding.JSeq[0];
358         return (jalview.binding.JSeq[]) this._JSeqList.toArray(array);
359     }
360
361     /**
362      * Method getJSeqCount.
363      * 
364      * @return the size of this collection
365      */
366     public int getJSeqCount(
367     ) {
368         return this._JSeqList.size();
369     }
370
371     /**
372      * Method getTree.
373      * 
374      * @param index
375      * @throws java.lang.IndexOutOfBoundsException if the index
376      * given is outside the bounds of the collection
377      * @return the value of the jalview.binding.Tree at the given
378      * index
379      */
380     public jalview.binding.Tree getTree(
381             final int index)
382     throws java.lang.IndexOutOfBoundsException {
383         // check bounds for index
384         if (index < 0 || index >= this._treeList.size()) {
385             throw new IndexOutOfBoundsException("getTree: Index value '" + index + "' not in range [0.." + (this._treeList.size() - 1) + "]");
386         }
387         
388         return (jalview.binding.Tree) _treeList.get(index);
389     }
390
391     /**
392      * Method getTree.Returns the contents of the collection in an
393      * Array.  <p>Note:  Just in case the collection contents are
394      * changing in another thread, we pass a 0-length Array of the
395      * correct type into the API call.  This way we <i>know</i>
396      * that the Array returned is of exactly the correct length.
397      * 
398      * @return this collection as an Array
399      */
400     public jalview.binding.Tree[] getTree(
401     ) {
402         jalview.binding.Tree[] array = new jalview.binding.Tree[0];
403         return (jalview.binding.Tree[]) this._treeList.toArray(array);
404     }
405
406     /**
407      * Method getTreeCount.
408      * 
409      * @return the size of this collection
410      */
411     public int getTreeCount(
412     ) {
413         return this._treeList.size();
414     }
415
416     /**
417      * Method getUserColours.
418      * 
419      * @param index
420      * @throws java.lang.IndexOutOfBoundsException if the index
421      * given is outside the bounds of the collection
422      * @return the value of the jalview.binding.UserColours at the
423      * given index
424      */
425     public jalview.binding.UserColours getUserColours(
426             final int index)
427     throws java.lang.IndexOutOfBoundsException {
428         // check bounds for index
429         if (index < 0 || index >= this._userColoursList.size()) {
430             throw new IndexOutOfBoundsException("getUserColours: Index value '" + index + "' not in range [0.." + (this._userColoursList.size() - 1) + "]");
431         }
432         
433         return (jalview.binding.UserColours) _userColoursList.get(index);
434     }
435
436     /**
437      * Method getUserColours.Returns the contents of the collection
438      * in an Array.  <p>Note:  Just in case the collection contents
439      * are changing in another thread, we pass a 0-length Array of
440      * the correct type into the API call.  This way we <i>know</i>
441      * that the Array returned is of exactly the correct length.
442      * 
443      * @return this collection as an Array
444      */
445     public jalview.binding.UserColours[] getUserColours(
446     ) {
447         jalview.binding.UserColours[] array = new jalview.binding.UserColours[0];
448         return (jalview.binding.UserColours[]) this._userColoursList.toArray(array);
449     }
450
451     /**
452      * Method getUserColoursCount.
453      * 
454      * @return the size of this collection
455      */
456     public int getUserColoursCount(
457     ) {
458         return this._userColoursList.size();
459     }
460
461     /**
462      * Method getViewport.
463      * 
464      * @param index
465      * @throws java.lang.IndexOutOfBoundsException if the index
466      * given is outside the bounds of the collection
467      * @return the value of the jalview.binding.Viewport at the
468      * given index
469      */
470     public jalview.binding.Viewport getViewport(
471             final int index)
472     throws java.lang.IndexOutOfBoundsException {
473         // check bounds for index
474         if (index < 0 || index >= this._viewportList.size()) {
475             throw new IndexOutOfBoundsException("getViewport: Index value '" + index + "' not in range [0.." + (this._viewportList.size() - 1) + "]");
476         }
477         
478         return (jalview.binding.Viewport) _viewportList.get(index);
479     }
480
481     /**
482      * Method getViewport.Returns the contents of the collection in
483      * an Array.  <p>Note:  Just in case the collection contents
484      * are changing in another thread, we pass a 0-length Array of
485      * the correct type into the API call.  This way we <i>know</i>
486      * that the Array returned is of exactly the correct length.
487      * 
488      * @return this collection as an Array
489      */
490     public jalview.binding.Viewport[] getViewport(
491     ) {
492         jalview.binding.Viewport[] array = new jalview.binding.Viewport[0];
493         return (jalview.binding.Viewport[]) this._viewportList.toArray(array);
494     }
495
496     /**
497      * Method getViewportCount.
498      * 
499      * @return the size of this collection
500      */
501     public int getViewportCount(
502     ) {
503         return this._viewportList.size();
504     }
505
506     /**
507      * Method isValid.
508      * 
509      * @return true if this object is valid according to the schema
510      */
511     public boolean isValid(
512     ) {
513         try {
514             validate();
515         } catch (org.exolab.castor.xml.ValidationException vex) {
516             return false;
517         }
518         return true;
519     }
520
521     /**
522      * 
523      * 
524      * @param out
525      * @throws org.exolab.castor.xml.MarshalException if object is
526      * null or if any SAXException is thrown during marshaling
527      * @throws org.exolab.castor.xml.ValidationException if this
528      * object is an invalid instance according to the schema
529      */
530     public void marshal(
531             final java.io.Writer out)
532     throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
533         Marshaller.marshal(this, out);
534     }
535
536     /**
537      * 
538      * 
539      * @param handler
540      * @throws java.io.IOException if an IOException occurs during
541      * marshaling
542      * @throws org.exolab.castor.xml.ValidationException if this
543      * object is an invalid instance according to the schema
544      * @throws org.exolab.castor.xml.MarshalException if object is
545      * null or if any SAXException is thrown during marshaling
546      */
547     public void marshal(
548             final org.xml.sax.ContentHandler handler)
549     throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
550         Marshaller.marshal(this, handler);
551     }
552
553     /**
554      */
555     public void removeAllJGroup(
556     ) {
557         this._JGroupList.clear();
558     }
559
560     /**
561      */
562     public void removeAllJSeq(
563     ) {
564         this._JSeqList.clear();
565     }
566
567     /**
568      */
569     public void removeAllTree(
570     ) {
571         this._treeList.clear();
572     }
573
574     /**
575      */
576     public void removeAllUserColours(
577     ) {
578         this._userColoursList.clear();
579     }
580
581     /**
582      */
583     public void removeAllViewport(
584     ) {
585         this._viewportList.clear();
586     }
587
588     /**
589      * Method removeJGroup.
590      * 
591      * @param vJGroup
592      * @return true if the object was removed from the collection.
593      */
594     public boolean removeJGroup(
595             final jalview.binding.JGroup vJGroup) {
596         boolean removed = _JGroupList.remove(vJGroup);
597         return removed;
598     }
599
600     /**
601      * Method removeJGroupAt.
602      * 
603      * @param index
604      * @return the element removed from the collection
605      */
606     public jalview.binding.JGroup removeJGroupAt(
607             final int index) {
608         java.lang.Object obj = this._JGroupList.remove(index);
609         return (jalview.binding.JGroup) obj;
610     }
611
612     /**
613      * Method removeJSeq.
614      * 
615      * @param vJSeq
616      * @return true if the object was removed from the collection.
617      */
618     public boolean removeJSeq(
619             final jalview.binding.JSeq vJSeq) {
620         boolean removed = _JSeqList.remove(vJSeq);
621         return removed;
622     }
623
624     /**
625      * Method removeJSeqAt.
626      * 
627      * @param index
628      * @return the element removed from the collection
629      */
630     public jalview.binding.JSeq removeJSeqAt(
631             final int index) {
632         java.lang.Object obj = this._JSeqList.remove(index);
633         return (jalview.binding.JSeq) obj;
634     }
635
636     /**
637      * Method removeTree.
638      * 
639      * @param vTree
640      * @return true if the object was removed from the collection.
641      */
642     public boolean removeTree(
643             final jalview.binding.Tree vTree) {
644         boolean removed = _treeList.remove(vTree);
645         return removed;
646     }
647
648     /**
649      * Method removeTreeAt.
650      * 
651      * @param index
652      * @return the element removed from the collection
653      */
654     public jalview.binding.Tree removeTreeAt(
655             final int index) {
656         java.lang.Object obj = this._treeList.remove(index);
657         return (jalview.binding.Tree) obj;
658     }
659
660     /**
661      * Method removeUserColours.
662      * 
663      * @param vUserColours
664      * @return true if the object was removed from the collection.
665      */
666     public boolean removeUserColours(
667             final jalview.binding.UserColours vUserColours) {
668         boolean removed = _userColoursList.remove(vUserColours);
669         return removed;
670     }
671
672     /**
673      * Method removeUserColoursAt.
674      * 
675      * @param index
676      * @return the element removed from the collection
677      */
678     public jalview.binding.UserColours removeUserColoursAt(
679             final int index) {
680         java.lang.Object obj = this._userColoursList.remove(index);
681         return (jalview.binding.UserColours) obj;
682     }
683
684     /**
685      * Method removeViewport.
686      * 
687      * @param vViewport
688      * @return true if the object was removed from the collection.
689      */
690     public boolean removeViewport(
691             final jalview.binding.Viewport vViewport) {
692         boolean removed = _viewportList.remove(vViewport);
693         return removed;
694     }
695
696     /**
697      * Method removeViewportAt.
698      * 
699      * @param index
700      * @return the element removed from the collection
701      */
702     public jalview.binding.Viewport removeViewportAt(
703             final int index) {
704         java.lang.Object obj = this._viewportList.remove(index);
705         return (jalview.binding.Viewport) obj;
706     }
707
708     /**
709      * Sets the value of field 'featureSettings'.
710      * 
711      * @param featureSettings the value of field 'featureSettings'.
712      */
713     public void setFeatureSettings(
714             final jalview.binding.FeatureSettings featureSettings) {
715         this._featureSettings = featureSettings;
716     }
717
718     /**
719      * 
720      * 
721      * @param index
722      * @param vJGroup
723      * @throws java.lang.IndexOutOfBoundsException if the index
724      * given is outside the bounds of the collection
725      */
726     public void setJGroup(
727             final int index,
728             final jalview.binding.JGroup vJGroup)
729     throws java.lang.IndexOutOfBoundsException {
730         // check bounds for index
731         if (index < 0 || index >= this._JGroupList.size()) {
732             throw new IndexOutOfBoundsException("setJGroup: Index value '" + index + "' not in range [0.." + (this._JGroupList.size() - 1) + "]");
733         }
734         
735         this._JGroupList.set(index, vJGroup);
736     }
737
738     /**
739      * 
740      * 
741      * @param vJGroupArray
742      */
743     public void setJGroup(
744             final jalview.binding.JGroup[] vJGroupArray) {
745         //-- copy array
746         _JGroupList.clear();
747         
748         for (int i = 0; i < vJGroupArray.length; i++) {
749                 this._JGroupList.add(vJGroupArray[i]);
750         }
751     }
752
753     /**
754      * 
755      * 
756      * @param index
757      * @param vJSeq
758      * @throws java.lang.IndexOutOfBoundsException if the index
759      * given is outside the bounds of the collection
760      */
761     public void setJSeq(
762             final int index,
763             final jalview.binding.JSeq vJSeq)
764     throws java.lang.IndexOutOfBoundsException {
765         // check bounds for index
766         if (index < 0 || index >= this._JSeqList.size()) {
767             throw new IndexOutOfBoundsException("setJSeq: Index value '" + index + "' not in range [0.." + (this._JSeqList.size() - 1) + "]");
768         }
769         
770         this._JSeqList.set(index, vJSeq);
771     }
772
773     /**
774      * 
775      * 
776      * @param vJSeqArray
777      */
778     public void setJSeq(
779             final jalview.binding.JSeq[] vJSeqArray) {
780         //-- copy array
781         _JSeqList.clear();
782         
783         for (int i = 0; i < vJSeqArray.length; i++) {
784                 this._JSeqList.add(vJSeqArray[i]);
785         }
786     }
787
788     /**
789      * 
790      * 
791      * @param index
792      * @param vTree
793      * @throws java.lang.IndexOutOfBoundsException if the index
794      * given is outside the bounds of the collection
795      */
796     public void setTree(
797             final int index,
798             final jalview.binding.Tree vTree)
799     throws java.lang.IndexOutOfBoundsException {
800         // check bounds for index
801         if (index < 0 || index >= this._treeList.size()) {
802             throw new IndexOutOfBoundsException("setTree: Index value '" + index + "' not in range [0.." + (this._treeList.size() - 1) + "]");
803         }
804         
805         this._treeList.set(index, vTree);
806     }
807
808     /**
809      * 
810      * 
811      * @param vTreeArray
812      */
813     public void setTree(
814             final jalview.binding.Tree[] vTreeArray) {
815         //-- copy array
816         _treeList.clear();
817         
818         for (int i = 0; i < vTreeArray.length; i++) {
819                 this._treeList.add(vTreeArray[i]);
820         }
821     }
822
823     /**
824      * 
825      * 
826      * @param index
827      * @param vUserColours
828      * @throws java.lang.IndexOutOfBoundsException if the index
829      * given is outside the bounds of the collection
830      */
831     public void setUserColours(
832             final int index,
833             final jalview.binding.UserColours vUserColours)
834     throws java.lang.IndexOutOfBoundsException {
835         // check bounds for index
836         if (index < 0 || index >= this._userColoursList.size()) {
837             throw new IndexOutOfBoundsException("setUserColours: Index value '" + index + "' not in range [0.." + (this._userColoursList.size() - 1) + "]");
838         }
839         
840         this._userColoursList.set(index, vUserColours);
841     }
842
843     /**
844      * 
845      * 
846      * @param vUserColoursArray
847      */
848     public void setUserColours(
849             final jalview.binding.UserColours[] vUserColoursArray) {
850         //-- copy array
851         _userColoursList.clear();
852         
853         for (int i = 0; i < vUserColoursArray.length; i++) {
854                 this._userColoursList.add(vUserColoursArray[i]);
855         }
856     }
857
858     /**
859      * 
860      * 
861      * @param index
862      * @param vViewport
863      * @throws java.lang.IndexOutOfBoundsException if the index
864      * given is outside the bounds of the collection
865      */
866     public void setViewport(
867             final int index,
868             final jalview.binding.Viewport vViewport)
869     throws java.lang.IndexOutOfBoundsException {
870         // check bounds for index
871         if (index < 0 || index >= this._viewportList.size()) {
872             throw new IndexOutOfBoundsException("setViewport: Index value '" + index + "' not in range [0.." + (this._viewportList.size() - 1) + "]");
873         }
874         
875         this._viewportList.set(index, vViewport);
876     }
877
878     /**
879      * 
880      * 
881      * @param vViewportArray
882      */
883     public void setViewport(
884             final jalview.binding.Viewport[] vViewportArray) {
885         //-- copy array
886         _viewportList.clear();
887         
888         for (int i = 0; i < vViewportArray.length; i++) {
889                 this._viewportList.add(vViewportArray[i]);
890         }
891     }
892
893     /**
894      * Method unmarshal.
895      * 
896      * @param reader
897      * @throws org.exolab.castor.xml.MarshalException if object is
898      * null or if any SAXException is thrown during marshaling
899      * @throws org.exolab.castor.xml.ValidationException if this
900      * object is an invalid instance according to the schema
901      * @return the unmarshaled jalview.binding.JalviewModelSequence
902      */
903     public static jalview.binding.JalviewModelSequence unmarshal(
904             final java.io.Reader reader)
905     throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
906         return (jalview.binding.JalviewModelSequence) Unmarshaller.unmarshal(jalview.binding.JalviewModelSequence.class, reader);
907     }
908
909     /**
910      * 
911      * 
912      * @throws org.exolab.castor.xml.ValidationException if this
913      * object is an invalid instance according to the schema
914      */
915     public void validate(
916     )
917     throws org.exolab.castor.xml.ValidationException {
918         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
919         validator.validate(this);
920     }
921
922 }