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