JAL-1645 source formatting and organise imports
[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 for this sequence. Schema
91    * supports one viewer showing multiple annotations for multiple sequences,
92    * though currently only one annotation for one sequence (gapped or trimmed)
93    * is used
94    * 
95    */
96   private java.util.Vector _rnaViewerList;
97
98   // ----------------/
99   // - Constructors -/
100   // ----------------/
101
102   public JSeq()
103   {
104     super();
105     this._featuresList = new java.util.Vector();
106     this._pdbidsList = new java.util.Vector();
107     this._hiddenSequencesList = new java.util.Vector();
108     this._rnaViewerList = new java.util.Vector();
109   }
110
111   // -----------/
112   // - Methods -/
113   // -----------/
114
115   /**
116    * 
117    * 
118    * @param vFeatures
119    * @throws java.lang.IndexOutOfBoundsException
120    *           if the index given is outside the bounds of the collection
121    */
122   public void addFeatures(
123           final jalview.schemabinding.version2.Features vFeatures)
124           throws java.lang.IndexOutOfBoundsException
125   {
126     this._featuresList.addElement(vFeatures);
127   }
128
129   /**
130    * 
131    * 
132    * @param index
133    * @param vFeatures
134    * @throws java.lang.IndexOutOfBoundsException
135    *           if the index given is outside the bounds of the collection
136    */
137   public void addFeatures(final int index,
138           final jalview.schemabinding.version2.Features vFeatures)
139           throws java.lang.IndexOutOfBoundsException
140   {
141     this._featuresList.add(index, vFeatures);
142   }
143
144   /**
145    * 
146    * 
147    * @param vHiddenSequences
148    * @throws java.lang.IndexOutOfBoundsException
149    *           if the index given is outside the bounds of the collection
150    */
151   public void addHiddenSequences(final int vHiddenSequences)
152           throws java.lang.IndexOutOfBoundsException
153   {
154     this._hiddenSequencesList.addElement(new java.lang.Integer(
155             vHiddenSequences));
156   }
157
158   /**
159    * 
160    * 
161    * @param index
162    * @param vHiddenSequences
163    * @throws java.lang.IndexOutOfBoundsException
164    *           if the index given is outside the bounds of the collection
165    */
166   public void addHiddenSequences(final int index, final int vHiddenSequences)
167           throws java.lang.IndexOutOfBoundsException
168   {
169     this._hiddenSequencesList.add(index, new java.lang.Integer(
170             vHiddenSequences));
171   }
172
173   /**
174    * 
175    * 
176    * @param vPdbids
177    * @throws java.lang.IndexOutOfBoundsException
178    *           if the index given is outside the bounds of the collection
179    */
180   public void addPdbids(final jalview.schemabinding.version2.Pdbids vPdbids)
181           throws java.lang.IndexOutOfBoundsException
182   {
183     this._pdbidsList.addElement(vPdbids);
184   }
185
186   /**
187    * 
188    * 
189    * @param index
190    * @param vPdbids
191    * @throws java.lang.IndexOutOfBoundsException
192    *           if the index given is outside the bounds of the collection
193    */
194   public void addPdbids(final int index,
195           final jalview.schemabinding.version2.Pdbids vPdbids)
196           throws java.lang.IndexOutOfBoundsException
197   {
198     this._pdbidsList.add(index, vPdbids);
199   }
200
201   /**
202    * 
203    * 
204    * @param vRnaViewer
205    * @throws java.lang.IndexOutOfBoundsException
206    *           if the index given is outside the bounds of the collection
207    */
208   public void addRnaViewer(
209           final jalview.schemabinding.version2.RnaViewer vRnaViewer)
210           throws java.lang.IndexOutOfBoundsException
211   {
212     this._rnaViewerList.addElement(vRnaViewer);
213   }
214
215   /**
216    * 
217    * 
218    * @param index
219    * @param vRnaViewer
220    * @throws java.lang.IndexOutOfBoundsException
221    *           if the index given is outside the bounds of the collection
222    */
223   public void addRnaViewer(final int index,
224           final jalview.schemabinding.version2.RnaViewer vRnaViewer)
225           throws java.lang.IndexOutOfBoundsException
226   {
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 jalview.schemabinding.version2.Features
262    *         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 jalview.schemabinding.version2.Pdbids
283    *         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 jalview.schemabinding.version2.RnaViewer
294    *         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
326    *           if the index given is outside the bounds of the collection
327    * @return the value of the jalview.schemabinding.version2.Features at the
328    *         given index
329    */
330   public jalview.schemabinding.version2.Features getFeatures(final int index)
331           throws java.lang.IndexOutOfBoundsException
332   {
333     // check bounds for index
334     if (index < 0 || index >= this._featuresList.size())
335     {
336       throw new IndexOutOfBoundsException("getFeatures: Index value '"
337               + index + "' not in range [0.."
338               + (this._featuresList.size() - 1) + "]");
339     }
340
341     return (jalview.schemabinding.version2.Features) _featuresList
342             .get(index);
343   }
344
345   /**
346    * Method getFeatures.Returns the contents of the collection in an Array.
347    * <p>
348    * Note: Just in case the collection contents are changing in another thread,
349    * we pass a 0-length Array of the correct type into the API call. This way we
350    * <i>know</i> that the Array returned is of exactly the correct length.
351    * 
352    * @return this collection as an Array
353    */
354   public jalview.schemabinding.version2.Features[] getFeatures()
355   {
356     jalview.schemabinding.version2.Features[] array = new jalview.schemabinding.version2.Features[0];
357     return (jalview.schemabinding.version2.Features[]) this._featuresList
358             .toArray(array);
359   }
360
361   /**
362    * Method getFeaturesCount.
363    * 
364    * @return the size of this collection
365    */
366   public int getFeaturesCount()
367   {
368     return this._featuresList.size();
369   }
370
371   /**
372    * Returns the value of field 'hidden'.
373    * 
374    * @return the value of field 'Hidden'.
375    */
376   public boolean getHidden()
377   {
378     return this._hidden;
379   }
380
381   /**
382    * Method getHiddenSequences.
383    * 
384    * @param index
385    * @throws java.lang.IndexOutOfBoundsException
386    *           if the index given is outside the bounds of the collection
387    * @return the value of the int at the given index
388    */
389   public int getHiddenSequences(final int index)
390           throws java.lang.IndexOutOfBoundsException
391   {
392     // check bounds for index
393     if (index < 0 || index >= this._hiddenSequencesList.size())
394     {
395       throw new IndexOutOfBoundsException(
396               "getHiddenSequences: Index value '" + index
397                       + "' not in range [0.."
398                       + (this._hiddenSequencesList.size() - 1) + "]");
399     }
400
401     return ((java.lang.Integer) _hiddenSequencesList.get(index)).intValue();
402   }
403
404   /**
405    * Method getHiddenSequences.Returns the contents of the collection in an
406    * Array.
407    * 
408    * @return this collection as an Array
409    */
410   public int[] getHiddenSequences()
411   {
412     int size = this._hiddenSequencesList.size();
413     int[] array = new int[size];
414     java.util.Iterator iter = _hiddenSequencesList.iterator();
415     for (int index = 0; index < size; index++)
416     {
417       array[index] = ((java.lang.Integer) iter.next()).intValue();
418     }
419     return array;
420   }
421
422   /**
423    * Method getHiddenSequencesCount.
424    * 
425    * @return the size of this collection
426    */
427   public int getHiddenSequencesCount()
428   {
429     return this._hiddenSequencesList.size();
430   }
431
432   /**
433    * Returns the value of field 'id'.
434    * 
435    * @return the value of field 'Id'.
436    */
437   public java.lang.String getId()
438   {
439     return this._id;
440   }
441
442   /**
443    * Method getPdbids.
444    * 
445    * @param index
446    * @throws java.lang.IndexOutOfBoundsException
447    *           if the index given is outside the bounds of the collection
448    * @return the value of the jalview.schemabinding.version2.Pdbids at the given
449    *         index
450    */
451   public jalview.schemabinding.version2.Pdbids getPdbids(final int index)
452           throws java.lang.IndexOutOfBoundsException
453   {
454     // check bounds for index
455     if (index < 0 || index >= this._pdbidsList.size())
456     {
457       throw new IndexOutOfBoundsException("getPdbids: Index value '"
458               + index + "' not in range [0.."
459               + (this._pdbidsList.size() - 1) + "]");
460     }
461
462     return (jalview.schemabinding.version2.Pdbids) _pdbidsList.get(index);
463   }
464
465   /**
466    * Method getPdbids.Returns the contents of the collection in an Array.
467    * <p>
468    * Note: Just in case the collection contents are changing in another thread,
469    * we pass a 0-length Array of the correct type into the API call. This way we
470    * <i>know</i> that the Array returned is of exactly the correct length.
471    * 
472    * @return this collection as an Array
473    */
474   public jalview.schemabinding.version2.Pdbids[] getPdbids()
475   {
476     jalview.schemabinding.version2.Pdbids[] array = new jalview.schemabinding.version2.Pdbids[0];
477     return (jalview.schemabinding.version2.Pdbids[]) this._pdbidsList
478             .toArray(array);
479   }
480
481   /**
482    * Method getPdbidsCount.
483    * 
484    * @return the size of this collection
485    */
486   public int getPdbidsCount()
487   {
488     return this._pdbidsList.size();
489   }
490
491   /**
492    * Method getRnaViewer.
493    * 
494    * @param index
495    * @throws java.lang.IndexOutOfBoundsException
496    *           if the index given is outside the bounds of the collection
497    * @return the value of the jalview.schemabinding.version2.RnaViewer at the
498    *         given index
499    */
500   public jalview.schemabinding.version2.RnaViewer getRnaViewer(
501           final int index) throws java.lang.IndexOutOfBoundsException
502   {
503     // check bounds for index
504     if (index < 0 || index >= this._rnaViewerList.size())
505     {
506       throw new IndexOutOfBoundsException("getRnaViewer: Index value '"
507               + index + "' not in range [0.."
508               + (this._rnaViewerList.size() - 1) + "]");
509     }
510
511     return (jalview.schemabinding.version2.RnaViewer) _rnaViewerList
512             .get(index);
513   }
514
515   /**
516    * Method getRnaViewer.Returns the contents of the collection in an Array.
517    * <p>
518    * Note: Just in case the collection contents are changing in another thread,
519    * we pass a 0-length Array of the correct type into the API call. This way we
520    * <i>know</i> that the Array returned is of exactly the correct length.
521    * 
522    * @return this collection as an Array
523    */
524   public jalview.schemabinding.version2.RnaViewer[] getRnaViewer()
525   {
526     jalview.schemabinding.version2.RnaViewer[] array = new jalview.schemabinding.version2.RnaViewer[0];
527     return (jalview.schemabinding.version2.RnaViewer[]) this._rnaViewerList
528             .toArray(array);
529   }
530
531   /**
532    * Method getRnaViewerCount.
533    * 
534    * @return the size of this collection
535    */
536   public int getRnaViewerCount()
537   {
538     return this._rnaViewerList.size();
539   }
540
541   /**
542    * Returns the value of field 'start'.
543    * 
544    * @return the value of field 'Start'.
545    */
546   public int getStart()
547   {
548     return this._start;
549   }
550
551   /**
552    * Method hasColour.
553    * 
554    * @return true if at least one Colour has been added
555    */
556   public boolean hasColour()
557   {
558     return this._has_colour;
559   }
560
561   /**
562    * Method hasEnd.
563    * 
564    * @return true if at least one End has been added
565    */
566   public boolean hasEnd()
567   {
568     return this._has_end;
569   }
570
571   /**
572    * Method hasHidden.
573    * 
574    * @return true if at least one Hidden has been added
575    */
576   public boolean hasHidden()
577   {
578     return this._has_hidden;
579   }
580
581   /**
582    * Method hasStart.
583    * 
584    * @return true if at least one Start has been added
585    */
586   public boolean hasStart()
587   {
588     return this._has_start;
589   }
590
591   /**
592    * Returns the value of field 'hidden'.
593    * 
594    * @return the value of field 'Hidden'.
595    */
596   public boolean isHidden()
597   {
598     return this._hidden;
599   }
600
601   /**
602    * Method isValid.
603    * 
604    * @return true if this object is valid according to the schema
605    */
606   public boolean isValid()
607   {
608     try
609     {
610       validate();
611     } catch (org.exolab.castor.xml.ValidationException vex)
612     {
613       return false;
614     }
615     return true;
616   }
617
618   /**
619    * 
620    * 
621    * @param out
622    * @throws org.exolab.castor.xml.MarshalException
623    *           if object is null or if any SAXException is thrown during
624    *           marshaling
625    * @throws org.exolab.castor.xml.ValidationException
626    *           if this object is an invalid instance according to the schema
627    */
628   public void marshal(final java.io.Writer out)
629           throws org.exolab.castor.xml.MarshalException,
630           org.exolab.castor.xml.ValidationException
631   {
632     Marshaller.marshal(this, out);
633   }
634
635   /**
636    * 
637    * 
638    * @param handler
639    * @throws java.io.IOException
640    *           if an IOException occurs during marshaling
641    * @throws org.exolab.castor.xml.ValidationException
642    *           if this object is an invalid instance according to the schema
643    * @throws org.exolab.castor.xml.MarshalException
644    *           if object is null or if any SAXException is thrown during
645    *           marshaling
646    */
647   public void marshal(final org.xml.sax.ContentHandler handler)
648           throws java.io.IOException,
649           org.exolab.castor.xml.MarshalException,
650           org.exolab.castor.xml.ValidationException
651   {
652     Marshaller.marshal(this, handler);
653   }
654
655   /**
656      */
657   public void removeAllFeatures()
658   {
659     this._featuresList.clear();
660   }
661
662   /**
663      */
664   public void removeAllHiddenSequences()
665   {
666     this._hiddenSequencesList.clear();
667   }
668
669   /**
670      */
671   public void removeAllPdbids()
672   {
673     this._pdbidsList.clear();
674   }
675
676   /**
677      */
678   public void removeAllRnaViewer()
679   {
680     this._rnaViewerList.clear();
681   }
682
683   /**
684    * Method removeFeatures.
685    * 
686    * @param vFeatures
687    * @return true if the object was removed from the collection.
688    */
689   public boolean removeFeatures(
690           final jalview.schemabinding.version2.Features vFeatures)
691   {
692     boolean removed = _featuresList.remove(vFeatures);
693     return removed;
694   }
695
696   /**
697    * Method removeFeaturesAt.
698    * 
699    * @param index
700    * @return the element removed from the collection
701    */
702   public jalview.schemabinding.version2.Features removeFeaturesAt(
703           final int index)
704   {
705     java.lang.Object obj = this._featuresList.remove(index);
706     return (jalview.schemabinding.version2.Features) obj;
707   }
708
709   /**
710    * Method removeHiddenSequences.
711    * 
712    * @param vHiddenSequences
713    * @return true if the object was removed from the collection.
714    */
715   public boolean removeHiddenSequences(final int vHiddenSequences)
716   {
717     boolean removed = _hiddenSequencesList.remove(new java.lang.Integer(
718             vHiddenSequences));
719     return removed;
720   }
721
722   /**
723    * Method removeHiddenSequencesAt.
724    * 
725    * @param index
726    * @return the element removed from the collection
727    */
728   public int removeHiddenSequencesAt(final int index)
729   {
730     java.lang.Object obj = this._hiddenSequencesList.remove(index);
731     return ((java.lang.Integer) obj).intValue();
732   }
733
734   /**
735    * Method removePdbids.
736    * 
737    * @param vPdbids
738    * @return true if the object was removed from the collection.
739    */
740   public boolean removePdbids(
741           final jalview.schemabinding.version2.Pdbids vPdbids)
742   {
743     boolean removed = _pdbidsList.remove(vPdbids);
744     return removed;
745   }
746
747   /**
748    * Method removePdbidsAt.
749    * 
750    * @param index
751    * @return the element removed from the collection
752    */
753   public jalview.schemabinding.version2.Pdbids removePdbidsAt(
754           final int index)
755   {
756     java.lang.Object obj = this._pdbidsList.remove(index);
757     return (jalview.schemabinding.version2.Pdbids) obj;
758   }
759
760   /**
761    * Method removeRnaViewer.
762    * 
763    * @param vRnaViewer
764    * @return true if the object was removed from the collection.
765    */
766   public boolean removeRnaViewer(
767           final jalview.schemabinding.version2.RnaViewer vRnaViewer)
768   {
769     boolean removed = _rnaViewerList.remove(vRnaViewer);
770     return removed;
771   }
772
773   /**
774    * Method removeRnaViewerAt.
775    * 
776    * @param index
777    * @return the element removed from the collection
778    */
779   public jalview.schemabinding.version2.RnaViewer removeRnaViewerAt(
780           final int index)
781   {
782     java.lang.Object obj = this._rnaViewerList.remove(index);
783     return (jalview.schemabinding.version2.RnaViewer) obj;
784   }
785
786   /**
787    * Sets the value of field 'colour'.
788    * 
789    * @param colour
790    *          the value of field 'colour'.
791    */
792   public void setColour(final int colour)
793   {
794     this._colour = colour;
795     this._has_colour = true;
796   }
797
798   /**
799    * Sets the value of field 'end'.
800    * 
801    * @param end
802    *          the value of field 'end'.
803    */
804   public void setEnd(final int end)
805   {
806     this._end = end;
807     this._has_end = true;
808   }
809
810   /**
811    * 
812    * 
813    * @param index
814    * @param vFeatures
815    * @throws java.lang.IndexOutOfBoundsException
816    *           if the index given is outside the bounds of the collection
817    */
818   public void setFeatures(final int index,
819           final jalview.schemabinding.version2.Features vFeatures)
820           throws java.lang.IndexOutOfBoundsException
821   {
822     // check bounds for index
823     if (index < 0 || index >= this._featuresList.size())
824     {
825       throw new IndexOutOfBoundsException("setFeatures: Index value '"
826               + index + "' not in range [0.."
827               + (this._featuresList.size() - 1) + "]");
828     }
829
830     this._featuresList.set(index, vFeatures);
831   }
832
833   /**
834    * 
835    * 
836    * @param vFeaturesArray
837    */
838   public void setFeatures(
839           final jalview.schemabinding.version2.Features[] vFeaturesArray)
840   {
841     // -- copy array
842     _featuresList.clear();
843
844     for (int i = 0; i < vFeaturesArray.length; i++)
845     {
846       this._featuresList.add(vFeaturesArray[i]);
847     }
848   }
849
850   /**
851    * Sets the value of field 'hidden'.
852    * 
853    * @param hidden
854    *          the value of field 'hidden'.
855    */
856   public void setHidden(final boolean hidden)
857   {
858     this._hidden = hidden;
859     this._has_hidden = true;
860   }
861
862   /**
863    * 
864    * 
865    * @param index
866    * @param vHiddenSequences
867    * @throws java.lang.IndexOutOfBoundsException
868    *           if the index given is outside the bounds of the collection
869    */
870   public void setHiddenSequences(final int index, final int vHiddenSequences)
871           throws java.lang.IndexOutOfBoundsException
872   {
873     // check bounds for index
874     if (index < 0 || index >= this._hiddenSequencesList.size())
875     {
876       throw new IndexOutOfBoundsException(
877               "setHiddenSequences: Index value '" + index
878                       + "' not in range [0.."
879                       + (this._hiddenSequencesList.size() - 1) + "]");
880     }
881
882     this._hiddenSequencesList.set(index, new java.lang.Integer(
883             vHiddenSequences));
884   }
885
886   /**
887    * 
888    * 
889    * @param vHiddenSequencesArray
890    */
891   public void setHiddenSequences(final int[] vHiddenSequencesArray)
892   {
893     // -- copy array
894     _hiddenSequencesList.clear();
895
896     for (int i = 0; i < vHiddenSequencesArray.length; i++)
897     {
898       this._hiddenSequencesList.add(new java.lang.Integer(
899               vHiddenSequencesArray[i]));
900     }
901   }
902
903   /**
904    * Sets the value of field 'id'.
905    * 
906    * @param id
907    *          the value of field 'id'.
908    */
909   public void setId(final java.lang.String id)
910   {
911     this._id = id;
912   }
913
914   /**
915    * 
916    * 
917    * @param index
918    * @param vPdbids
919    * @throws java.lang.IndexOutOfBoundsException
920    *           if the index given is outside the bounds of the collection
921    */
922   public void setPdbids(final int index,
923           final jalview.schemabinding.version2.Pdbids vPdbids)
924           throws java.lang.IndexOutOfBoundsException
925   {
926     // check bounds for index
927     if (index < 0 || index >= this._pdbidsList.size())
928     {
929       throw new IndexOutOfBoundsException("setPdbids: Index value '"
930               + index + "' not in range [0.."
931               + (this._pdbidsList.size() - 1) + "]");
932     }
933
934     this._pdbidsList.set(index, vPdbids);
935   }
936
937   /**
938    * 
939    * 
940    * @param vPdbidsArray
941    */
942   public void setPdbids(
943           final jalview.schemabinding.version2.Pdbids[] vPdbidsArray)
944   {
945     // -- copy array
946     _pdbidsList.clear();
947
948     for (int i = 0; i < vPdbidsArray.length; i++)
949     {
950       this._pdbidsList.add(vPdbidsArray[i]);
951     }
952   }
953
954   /**
955    * 
956    * 
957    * @param index
958    * @param vRnaViewer
959    * @throws java.lang.IndexOutOfBoundsException
960    *           if the index given is outside the bounds of the collection
961    */
962   public void setRnaViewer(final int index,
963           final jalview.schemabinding.version2.RnaViewer vRnaViewer)
964           throws java.lang.IndexOutOfBoundsException
965   {
966     // check bounds for index
967     if (index < 0 || index >= this._rnaViewerList.size())
968     {
969       throw new IndexOutOfBoundsException("setRnaViewer: Index value '"
970               + index + "' not in range [0.."
971               + (this._rnaViewerList.size() - 1) + "]");
972     }
973
974     this._rnaViewerList.set(index, vRnaViewer);
975   }
976
977   /**
978    * 
979    * 
980    * @param vRnaViewerArray
981    */
982   public void setRnaViewer(
983           final jalview.schemabinding.version2.RnaViewer[] vRnaViewerArray)
984   {
985     // -- copy array
986     _rnaViewerList.clear();
987
988     for (int i = 0; i < vRnaViewerArray.length; i++)
989     {
990       this._rnaViewerList.add(vRnaViewerArray[i]);
991     }
992   }
993
994   /**
995    * Sets the value of field 'start'.
996    * 
997    * @param start
998    *          the value of field 'start'.
999    */
1000   public void setStart(final int start)
1001   {
1002     this._start = start;
1003     this._has_start = true;
1004   }
1005
1006   /**
1007    * Method unmarshal.
1008    * 
1009    * @param reader
1010    * @throws org.exolab.castor.xml.MarshalException
1011    *           if object is null or if any SAXException is thrown during
1012    *           marshaling
1013    * @throws org.exolab.castor.xml.ValidationException
1014    *           if this object is an invalid instance according to the schema
1015    * @return the unmarshaled jalview.schemabinding.version2.JSeq
1016    */
1017   public static jalview.schemabinding.version2.JSeq unmarshal(
1018           final java.io.Reader reader)
1019           throws org.exolab.castor.xml.MarshalException,
1020           org.exolab.castor.xml.ValidationException
1021   {
1022     return (jalview.schemabinding.version2.JSeq) Unmarshaller.unmarshal(
1023             jalview.schemabinding.version2.JSeq.class, reader);
1024   }
1025
1026   /**
1027    * 
1028    * 
1029    * @throws org.exolab.castor.xml.ValidationException
1030    *           if this object is an invalid instance according to the schema
1031    */
1032   public void validate() throws org.exolab.castor.xml.ValidationException
1033   {
1034     org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
1035     validator.validate(this);
1036   }
1037
1038 }