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