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