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