jalview XML schema update for 2.4.1 (or 2.5?) introducing IDs for views and treepanel...
[jalview.git] / src / jalview / schemabinding / version2 / SequenceSet.java
1 /*\r
2  * This class was automatically generated with \r
3  * <a href="http://www.castor.org">Castor 1.1</a>, using an XML\r
4  * Schema.\r
5  * $Id$\r
6  */\r
7 \r
8 package jalview.schemabinding.version2;\r
9 \r
10   //---------------------------------/\r
11  //- Imported classes and packages -/\r
12 //---------------------------------/\r
13 \r
14 import org.exolab.castor.xml.Marshaller;\r
15 import org.exolab.castor.xml.Unmarshaller;\r
16 \r
17 /**\r
18  * Class SequenceSet.\r
19  * \r
20  * @version $Revision$ $Date$\r
21  */\r
22 public class SequenceSet implements java.io.Serializable {\r
23 \r
24 \r
25       //--------------------------/\r
26      //- Class/Member Variables -/\r
27     //--------------------------/\r
28 \r
29     /**\r
30      * Field _gapChar.\r
31      */\r
32     private java.lang.String _gapChar;\r
33 \r
34     /**\r
35      * reference to set where jalview will gather the dataset\r
36      * sequences for all sequences in the set. \r
37      *  \r
38      */\r
39     private java.lang.String _datasetId;\r
40 \r
41     /**\r
42      * Field _sequenceList.\r
43      */\r
44     private java.util.Vector _sequenceList;\r
45 \r
46     /**\r
47      * Field _annotationList.\r
48      */\r
49     private java.util.Vector _annotationList;\r
50 \r
51     /**\r
52      * Field _sequenceSetPropertiesList.\r
53      */\r
54     private java.util.Vector _sequenceSetPropertiesList;\r
55 \r
56     /**\r
57      * Field _alcodonFrameList.\r
58      */\r
59     private java.util.Vector _alcodonFrameList;\r
60 \r
61 \r
62       //----------------/\r
63      //- Constructors -/\r
64     //----------------/\r
65 \r
66     public SequenceSet() {\r
67         super();\r
68         this._sequenceList = new java.util.Vector();\r
69         this._annotationList = new java.util.Vector();\r
70         this._sequenceSetPropertiesList = new java.util.Vector();\r
71         this._alcodonFrameList = new java.util.Vector();\r
72     }\r
73 \r
74 \r
75       //-----------/\r
76      //- Methods -/\r
77     //-----------/\r
78 \r
79     /**\r
80      * \r
81      * \r
82      * @param vAlcodonFrame\r
83      * @throws java.lang.IndexOutOfBoundsException if the index\r
84      * given is outside the bounds of the collection\r
85      */\r
86     public void addAlcodonFrame(\r
87             final jalview.schemabinding.version2.AlcodonFrame vAlcodonFrame)\r
88     throws java.lang.IndexOutOfBoundsException {\r
89         this._alcodonFrameList.addElement(vAlcodonFrame);\r
90     }\r
91 \r
92     /**\r
93      * \r
94      * \r
95      * @param index\r
96      * @param vAlcodonFrame\r
97      * @throws java.lang.IndexOutOfBoundsException if the index\r
98      * given is outside the bounds of the collection\r
99      */\r
100     public void addAlcodonFrame(\r
101             final int index,\r
102             final jalview.schemabinding.version2.AlcodonFrame vAlcodonFrame)\r
103     throws java.lang.IndexOutOfBoundsException {\r
104         this._alcodonFrameList.add(index, vAlcodonFrame);\r
105     }\r
106 \r
107     /**\r
108      * \r
109      * \r
110      * @param vAnnotation\r
111      * @throws java.lang.IndexOutOfBoundsException if the index\r
112      * given is outside the bounds of the collection\r
113      */\r
114     public void addAnnotation(\r
115             final jalview.schemabinding.version2.Annotation vAnnotation)\r
116     throws java.lang.IndexOutOfBoundsException {\r
117         this._annotationList.addElement(vAnnotation);\r
118     }\r
119 \r
120     /**\r
121      * \r
122      * \r
123      * @param index\r
124      * @param vAnnotation\r
125      * @throws java.lang.IndexOutOfBoundsException if the index\r
126      * given is outside the bounds of the collection\r
127      */\r
128     public void addAnnotation(\r
129             final int index,\r
130             final jalview.schemabinding.version2.Annotation vAnnotation)\r
131     throws java.lang.IndexOutOfBoundsException {\r
132         this._annotationList.add(index, vAnnotation);\r
133     }\r
134 \r
135     /**\r
136      * \r
137      * \r
138      * @param vSequence\r
139      * @throws java.lang.IndexOutOfBoundsException if the index\r
140      * given is outside the bounds of the collection\r
141      */\r
142     public void addSequence(\r
143             final jalview.schemabinding.version2.Sequence vSequence)\r
144     throws java.lang.IndexOutOfBoundsException {\r
145         this._sequenceList.addElement(vSequence);\r
146     }\r
147 \r
148     /**\r
149      * \r
150      * \r
151      * @param index\r
152      * @param vSequence\r
153      * @throws java.lang.IndexOutOfBoundsException if the index\r
154      * given is outside the bounds of the collection\r
155      */\r
156     public void addSequence(\r
157             final int index,\r
158             final jalview.schemabinding.version2.Sequence vSequence)\r
159     throws java.lang.IndexOutOfBoundsException {\r
160         this._sequenceList.add(index, vSequence);\r
161     }\r
162 \r
163     /**\r
164      * \r
165      * \r
166      * @param vSequenceSetProperties\r
167      * @throws java.lang.IndexOutOfBoundsException if the index\r
168      * given is outside the bounds of the collection\r
169      */\r
170     public void addSequenceSetProperties(\r
171             final jalview.schemabinding.version2.SequenceSetProperties vSequenceSetProperties)\r
172     throws java.lang.IndexOutOfBoundsException {\r
173         this._sequenceSetPropertiesList.addElement(vSequenceSetProperties);\r
174     }\r
175 \r
176     /**\r
177      * \r
178      * \r
179      * @param index\r
180      * @param vSequenceSetProperties\r
181      * @throws java.lang.IndexOutOfBoundsException if the index\r
182      * given is outside the bounds of the collection\r
183      */\r
184     public void addSequenceSetProperties(\r
185             final int index,\r
186             final jalview.schemabinding.version2.SequenceSetProperties vSequenceSetProperties)\r
187     throws java.lang.IndexOutOfBoundsException {\r
188         this._sequenceSetPropertiesList.add(index, vSequenceSetProperties);\r
189     }\r
190 \r
191     /**\r
192      * Method enumerateAlcodonFrame.\r
193      * \r
194      * @return an Enumeration over all\r
195      * jalview.schemabinding.version2.AlcodonFrame elements\r
196      */\r
197     public java.util.Enumeration enumerateAlcodonFrame(\r
198     ) {\r
199         return this._alcodonFrameList.elements();\r
200     }\r
201 \r
202     /**\r
203      * Method enumerateAnnotation.\r
204      * \r
205      * @return an Enumeration over all\r
206      * jalview.schemabinding.version2.Annotation elements\r
207      */\r
208     public java.util.Enumeration enumerateAnnotation(\r
209     ) {\r
210         return this._annotationList.elements();\r
211     }\r
212 \r
213     /**\r
214      * Method enumerateSequence.\r
215      * \r
216      * @return an Enumeration over all\r
217      * jalview.schemabinding.version2.Sequence elements\r
218      */\r
219     public java.util.Enumeration enumerateSequence(\r
220     ) {\r
221         return this._sequenceList.elements();\r
222     }\r
223 \r
224     /**\r
225      * Method enumerateSequenceSetProperties.\r
226      * \r
227      * @return an Enumeration over all\r
228      * jalview.schemabinding.version2.SequenceSetProperties elements\r
229      */\r
230     public java.util.Enumeration enumerateSequenceSetProperties(\r
231     ) {\r
232         return this._sequenceSetPropertiesList.elements();\r
233     }\r
234 \r
235     /**\r
236      * Method getAlcodonFrame.\r
237      * \r
238      * @param index\r
239      * @throws java.lang.IndexOutOfBoundsException if the index\r
240      * given is outside the bounds of the collection\r
241      * @return the value of the\r
242      * jalview.schemabinding.version2.AlcodonFrame at the given inde\r
243      */\r
244     public jalview.schemabinding.version2.AlcodonFrame getAlcodonFrame(\r
245             final int index)\r
246     throws java.lang.IndexOutOfBoundsException {\r
247         // check bounds for index\r
248         if (index < 0 || index >= this._alcodonFrameList.size()) {\r
249             throw new IndexOutOfBoundsException("getAlcodonFrame: Index value '" + index + "' not in range [0.." + (this._alcodonFrameList.size() - 1) + "]");\r
250         }\r
251         \r
252         return (jalview.schemabinding.version2.AlcodonFrame) _alcodonFrameList.get(index);\r
253     }\r
254 \r
255     /**\r
256      * Method getAlcodonFrame.Returns the contents of the\r
257      * collection in an Array.  <p>Note:  Just in case the\r
258      * collection contents are changing in another thread, we pass\r
259      * a 0-length Array of the correct type into the API call. \r
260      * This way we <i>know</i> that the Array returned is of\r
261      * exactly the correct length.\r
262      * \r
263      * @return this collection as an Array\r
264      */\r
265     public jalview.schemabinding.version2.AlcodonFrame[] getAlcodonFrame(\r
266     ) {\r
267         jalview.schemabinding.version2.AlcodonFrame[] array = new jalview.schemabinding.version2.AlcodonFrame[0];\r
268         return (jalview.schemabinding.version2.AlcodonFrame[]) this._alcodonFrameList.toArray(array);\r
269     }\r
270 \r
271     /**\r
272      * Method getAlcodonFrameCount.\r
273      * \r
274      * @return the size of this collection\r
275      */\r
276     public int getAlcodonFrameCount(\r
277     ) {\r
278         return this._alcodonFrameList.size();\r
279     }\r
280 \r
281     /**\r
282      * Method getAnnotation.\r
283      * \r
284      * @param index\r
285      * @throws java.lang.IndexOutOfBoundsException if the index\r
286      * given is outside the bounds of the collection\r
287      * @return the value of the\r
288      * jalview.schemabinding.version2.Annotation at the given index\r
289      */\r
290     public jalview.schemabinding.version2.Annotation getAnnotation(\r
291             final int index)\r
292     throws java.lang.IndexOutOfBoundsException {\r
293         // check bounds for index\r
294         if (index < 0 || index >= this._annotationList.size()) {\r
295             throw new IndexOutOfBoundsException("getAnnotation: Index value '" + index + "' not in range [0.." + (this._annotationList.size() - 1) + "]");\r
296         }\r
297         \r
298         return (jalview.schemabinding.version2.Annotation) _annotationList.get(index);\r
299     }\r
300 \r
301     /**\r
302      * Method getAnnotation.Returns the contents of the collection\r
303      * in an Array.  <p>Note:  Just in case the collection contents\r
304      * are changing in another thread, we pass a 0-length Array of\r
305      * the correct type into the API call.  This way we <i>know</i>\r
306      * that the Array returned is of exactly the correct length.\r
307      * \r
308      * @return this collection as an Array\r
309      */\r
310     public jalview.schemabinding.version2.Annotation[] getAnnotation(\r
311     ) {\r
312         jalview.schemabinding.version2.Annotation[] array = new jalview.schemabinding.version2.Annotation[0];\r
313         return (jalview.schemabinding.version2.Annotation[]) this._annotationList.toArray(array);\r
314     }\r
315 \r
316     /**\r
317      * Method getAnnotationCount.\r
318      * \r
319      * @return the size of this collection\r
320      */\r
321     public int getAnnotationCount(\r
322     ) {\r
323         return this._annotationList.size();\r
324     }\r
325 \r
326     /**\r
327      * Returns the value of field 'datasetId'. The field\r
328      * 'datasetId' has the following description: reference to set\r
329      * where jalview will gather the dataset sequences for all\r
330      * sequences in the set. \r
331      *  \r
332      * \r
333      * @return the value of field 'DatasetId'.\r
334      */\r
335     public java.lang.String getDatasetId(\r
336     ) {\r
337         return this._datasetId;\r
338     }\r
339 \r
340     /**\r
341      * Returns the value of field 'gapChar'.\r
342      * \r
343      * @return the value of field 'GapChar'.\r
344      */\r
345     public java.lang.String getGapChar(\r
346     ) {\r
347         return this._gapChar;\r
348     }\r
349 \r
350     /**\r
351      * Method getSequence.\r
352      * \r
353      * @param index\r
354      * @throws java.lang.IndexOutOfBoundsException if the index\r
355      * given is outside the bounds of the collection\r
356      * @return the value of the\r
357      * jalview.schemabinding.version2.Sequence at the given index\r
358      */\r
359     public jalview.schemabinding.version2.Sequence getSequence(\r
360             final int index)\r
361     throws java.lang.IndexOutOfBoundsException {\r
362         // check bounds for index\r
363         if (index < 0 || index >= this._sequenceList.size()) {\r
364             throw new IndexOutOfBoundsException("getSequence: Index value '" + index + "' not in range [0.." + (this._sequenceList.size() - 1) + "]");\r
365         }\r
366         \r
367         return (jalview.schemabinding.version2.Sequence) _sequenceList.get(index);\r
368     }\r
369 \r
370     /**\r
371      * Method getSequence.Returns the contents of the collection in\r
372      * an Array.  <p>Note:  Just in case the collection contents\r
373      * are changing in another thread, we pass a 0-length Array of\r
374      * the correct type into the API call.  This way we <i>know</i>\r
375      * that the Array returned is of exactly the correct length.\r
376      * \r
377      * @return this collection as an Array\r
378      */\r
379     public jalview.schemabinding.version2.Sequence[] getSequence(\r
380     ) {\r
381         jalview.schemabinding.version2.Sequence[] array = new jalview.schemabinding.version2.Sequence[0];\r
382         return (jalview.schemabinding.version2.Sequence[]) this._sequenceList.toArray(array);\r
383     }\r
384 \r
385     /**\r
386      * Method getSequenceCount.\r
387      * \r
388      * @return the size of this collection\r
389      */\r
390     public int getSequenceCount(\r
391     ) {\r
392         return this._sequenceList.size();\r
393     }\r
394 \r
395     /**\r
396      * Method getSequenceSetProperties.\r
397      * \r
398      * @param index\r
399      * @throws java.lang.IndexOutOfBoundsException if the index\r
400      * given is outside the bounds of the collection\r
401      * @return the value of the\r
402      * jalview.schemabinding.version2.SequenceSetProperties at the\r
403      * given index\r
404      */\r
405     public jalview.schemabinding.version2.SequenceSetProperties getSequenceSetProperties(\r
406             final int index)\r
407     throws java.lang.IndexOutOfBoundsException {\r
408         // check bounds for index\r
409         if (index < 0 || index >= this._sequenceSetPropertiesList.size()) {\r
410             throw new IndexOutOfBoundsException("getSequenceSetProperties: Index value '" + index + "' not in range [0.." + (this._sequenceSetPropertiesList.size() - 1) + "]");\r
411         }\r
412         \r
413         return (jalview.schemabinding.version2.SequenceSetProperties) _sequenceSetPropertiesList.get(index);\r
414     }\r
415 \r
416     /**\r
417      * Method getSequenceSetProperties.Returns the contents of the\r
418      * collection in an Array.  <p>Note:  Just in case the\r
419      * collection contents are changing in another thread, we pass\r
420      * a 0-length Array of the correct type into the API call. \r
421      * This way we <i>know</i> that the Array returned is of\r
422      * exactly the correct length.\r
423      * \r
424      * @return this collection as an Array\r
425      */\r
426     public jalview.schemabinding.version2.SequenceSetProperties[] getSequenceSetProperties(\r
427     ) {\r
428         jalview.schemabinding.version2.SequenceSetProperties[] array = new jalview.schemabinding.version2.SequenceSetProperties[0];\r
429         return (jalview.schemabinding.version2.SequenceSetProperties[]) this._sequenceSetPropertiesList.toArray(array);\r
430     }\r
431 \r
432     /**\r
433      * Method getSequenceSetPropertiesCount.\r
434      * \r
435      * @return the size of this collection\r
436      */\r
437     public int getSequenceSetPropertiesCount(\r
438     ) {\r
439         return this._sequenceSetPropertiesList.size();\r
440     }\r
441 \r
442     /**\r
443      * Method isValid.\r
444      * \r
445      * @return true if this object is valid according to the schema\r
446      */\r
447     public boolean isValid(\r
448     ) {\r
449         try {\r
450             validate();\r
451         } catch (org.exolab.castor.xml.ValidationException vex) {\r
452             return false;\r
453         }\r
454         return true;\r
455     }\r
456 \r
457     /**\r
458      * \r
459      * \r
460      * @param out\r
461      * @throws org.exolab.castor.xml.MarshalException if object is\r
462      * null or if any SAXException is thrown during marshaling\r
463      * @throws org.exolab.castor.xml.ValidationException if this\r
464      * object is an invalid instance according to the schema\r
465      */\r
466     public void marshal(\r
467             final java.io.Writer out)\r
468     throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
469         Marshaller.marshal(this, out);\r
470     }\r
471 \r
472     /**\r
473      * \r
474      * \r
475      * @param handler\r
476      * @throws java.io.IOException if an IOException occurs during\r
477      * marshaling\r
478      * @throws org.exolab.castor.xml.ValidationException if this\r
479      * object is an invalid instance according to the schema\r
480      * @throws org.exolab.castor.xml.MarshalException if object is\r
481      * null or if any SAXException is thrown during marshaling\r
482      */\r
483     public void marshal(\r
484             final org.xml.sax.ContentHandler handler)\r
485     throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
486         Marshaller.marshal(this, handler);\r
487     }\r
488 \r
489     /**\r
490      * Method removeAlcodonFrame.\r
491      * \r
492      * @param vAlcodonFrame\r
493      * @return true if the object was removed from the collection.\r
494      */\r
495     public boolean removeAlcodonFrame(\r
496             final jalview.schemabinding.version2.AlcodonFrame vAlcodonFrame) {\r
497         boolean removed = _alcodonFrameList.remove(vAlcodonFrame);\r
498         return removed;\r
499     }\r
500 \r
501     /**\r
502      * Method removeAlcodonFrameAt.\r
503      * \r
504      * @param index\r
505      * @return the element removed from the collection\r
506      */\r
507     public jalview.schemabinding.version2.AlcodonFrame removeAlcodonFrameAt(\r
508             final int index) {\r
509         java.lang.Object obj = this._alcodonFrameList.remove(index);\r
510         return (jalview.schemabinding.version2.AlcodonFrame) obj;\r
511     }\r
512 \r
513     /**\r
514      */\r
515     public void removeAllAlcodonFrame(\r
516     ) {\r
517         this._alcodonFrameList.clear();\r
518     }\r
519 \r
520     /**\r
521      */\r
522     public void removeAllAnnotation(\r
523     ) {\r
524         this._annotationList.clear();\r
525     }\r
526 \r
527     /**\r
528      */\r
529     public void removeAllSequence(\r
530     ) {\r
531         this._sequenceList.clear();\r
532     }\r
533 \r
534     /**\r
535      */\r
536     public void removeAllSequenceSetProperties(\r
537     ) {\r
538         this._sequenceSetPropertiesList.clear();\r
539     }\r
540 \r
541     /**\r
542      * Method removeAnnotation.\r
543      * \r
544      * @param vAnnotation\r
545      * @return true if the object was removed from the collection.\r
546      */\r
547     public boolean removeAnnotation(\r
548             final jalview.schemabinding.version2.Annotation vAnnotation) {\r
549         boolean removed = _annotationList.remove(vAnnotation);\r
550         return removed;\r
551     }\r
552 \r
553     /**\r
554      * Method removeAnnotationAt.\r
555      * \r
556      * @param index\r
557      * @return the element removed from the collection\r
558      */\r
559     public jalview.schemabinding.version2.Annotation removeAnnotationAt(\r
560             final int index) {\r
561         java.lang.Object obj = this._annotationList.remove(index);\r
562         return (jalview.schemabinding.version2.Annotation) obj;\r
563     }\r
564 \r
565     /**\r
566      * Method removeSequence.\r
567      * \r
568      * @param vSequence\r
569      * @return true if the object was removed from the collection.\r
570      */\r
571     public boolean removeSequence(\r
572             final jalview.schemabinding.version2.Sequence vSequence) {\r
573         boolean removed = _sequenceList.remove(vSequence);\r
574         return removed;\r
575     }\r
576 \r
577     /**\r
578      * Method removeSequenceAt.\r
579      * \r
580      * @param index\r
581      * @return the element removed from the collection\r
582      */\r
583     public jalview.schemabinding.version2.Sequence removeSequenceAt(\r
584             final int index) {\r
585         java.lang.Object obj = this._sequenceList.remove(index);\r
586         return (jalview.schemabinding.version2.Sequence) obj;\r
587     }\r
588 \r
589     /**\r
590      * Method removeSequenceSetProperties.\r
591      * \r
592      * @param vSequenceSetProperties\r
593      * @return true if the object was removed from the collection.\r
594      */\r
595     public boolean removeSequenceSetProperties(\r
596             final jalview.schemabinding.version2.SequenceSetProperties vSequenceSetProperties) {\r
597         boolean removed = _sequenceSetPropertiesList.remove(vSequenceSetProperties);\r
598         return removed;\r
599     }\r
600 \r
601     /**\r
602      * Method removeSequenceSetPropertiesAt.\r
603      * \r
604      * @param index\r
605      * @return the element removed from the collection\r
606      */\r
607     public jalview.schemabinding.version2.SequenceSetProperties removeSequenceSetPropertiesAt(\r
608             final int index) {\r
609         java.lang.Object obj = this._sequenceSetPropertiesList.remove(index);\r
610         return (jalview.schemabinding.version2.SequenceSetProperties) obj;\r
611     }\r
612 \r
613     /**\r
614      * \r
615      * \r
616      * @param index\r
617      * @param vAlcodonFrame\r
618      * @throws java.lang.IndexOutOfBoundsException if the index\r
619      * given is outside the bounds of the collection\r
620      */\r
621     public void setAlcodonFrame(\r
622             final int index,\r
623             final jalview.schemabinding.version2.AlcodonFrame vAlcodonFrame)\r
624     throws java.lang.IndexOutOfBoundsException {\r
625         // check bounds for index\r
626         if (index < 0 || index >= this._alcodonFrameList.size()) {\r
627             throw new IndexOutOfBoundsException("setAlcodonFrame: Index value '" + index + "' not in range [0.." + (this._alcodonFrameList.size() - 1) + "]");\r
628         }\r
629         \r
630         this._alcodonFrameList.set(index, vAlcodonFrame);\r
631     }\r
632 \r
633     /**\r
634      * \r
635      * \r
636      * @param vAlcodonFrameArray\r
637      */\r
638     public void setAlcodonFrame(\r
639             final jalview.schemabinding.version2.AlcodonFrame[] vAlcodonFrameArray) {\r
640         //-- copy array\r
641         _alcodonFrameList.clear();\r
642         \r
643         for (int i = 0; i < vAlcodonFrameArray.length; i++) {\r
644                 this._alcodonFrameList.add(vAlcodonFrameArray[i]);\r
645         }\r
646     }\r
647 \r
648     /**\r
649      * \r
650      * \r
651      * @param index\r
652      * @param vAnnotation\r
653      * @throws java.lang.IndexOutOfBoundsException if the index\r
654      * given is outside the bounds of the collection\r
655      */\r
656     public void setAnnotation(\r
657             final int index,\r
658             final jalview.schemabinding.version2.Annotation vAnnotation)\r
659     throws java.lang.IndexOutOfBoundsException {\r
660         // check bounds for index\r
661         if (index < 0 || index >= this._annotationList.size()) {\r
662             throw new IndexOutOfBoundsException("setAnnotation: Index value '" + index + "' not in range [0.." + (this._annotationList.size() - 1) + "]");\r
663         }\r
664         \r
665         this._annotationList.set(index, vAnnotation);\r
666     }\r
667 \r
668     /**\r
669      * \r
670      * \r
671      * @param vAnnotationArray\r
672      */\r
673     public void setAnnotation(\r
674             final jalview.schemabinding.version2.Annotation[] vAnnotationArray) {\r
675         //-- copy array\r
676         _annotationList.clear();\r
677         \r
678         for (int i = 0; i < vAnnotationArray.length; i++) {\r
679                 this._annotationList.add(vAnnotationArray[i]);\r
680         }\r
681     }\r
682 \r
683     /**\r
684      * Sets the value of field 'datasetId'. The field 'datasetId'\r
685      * has the following description: reference to set where\r
686      * jalview will gather the dataset sequences for all sequences\r
687      * in the set. \r
688      *  \r
689      * \r
690      * @param datasetId the value of field 'datasetId'.\r
691      */\r
692     public void setDatasetId(\r
693             final java.lang.String datasetId) {\r
694         this._datasetId = datasetId;\r
695     }\r
696 \r
697     /**\r
698      * Sets the value of field 'gapChar'.\r
699      * \r
700      * @param gapChar the value of field 'gapChar'.\r
701      */\r
702     public void setGapChar(\r
703             final java.lang.String gapChar) {\r
704         this._gapChar = gapChar;\r
705     }\r
706 \r
707     /**\r
708      * \r
709      * \r
710      * @param index\r
711      * @param vSequence\r
712      * @throws java.lang.IndexOutOfBoundsException if the index\r
713      * given is outside the bounds of the collection\r
714      */\r
715     public void setSequence(\r
716             final int index,\r
717             final jalview.schemabinding.version2.Sequence vSequence)\r
718     throws java.lang.IndexOutOfBoundsException {\r
719         // check bounds for index\r
720         if (index < 0 || index >= this._sequenceList.size()) {\r
721             throw new IndexOutOfBoundsException("setSequence: Index value '" + index + "' not in range [0.." + (this._sequenceList.size() - 1) + "]");\r
722         }\r
723         \r
724         this._sequenceList.set(index, vSequence);\r
725     }\r
726 \r
727     /**\r
728      * \r
729      * \r
730      * @param vSequenceArray\r
731      */\r
732     public void setSequence(\r
733             final jalview.schemabinding.version2.Sequence[] vSequenceArray) {\r
734         //-- copy array\r
735         _sequenceList.clear();\r
736         \r
737         for (int i = 0; i < vSequenceArray.length; i++) {\r
738                 this._sequenceList.add(vSequenceArray[i]);\r
739         }\r
740     }\r
741 \r
742     /**\r
743      * \r
744      * \r
745      * @param index\r
746      * @param vSequenceSetProperties\r
747      * @throws java.lang.IndexOutOfBoundsException if the index\r
748      * given is outside the bounds of the collection\r
749      */\r
750     public void setSequenceSetProperties(\r
751             final int index,\r
752             final jalview.schemabinding.version2.SequenceSetProperties vSequenceSetProperties)\r
753     throws java.lang.IndexOutOfBoundsException {\r
754         // check bounds for index\r
755         if (index < 0 || index >= this._sequenceSetPropertiesList.size()) {\r
756             throw new IndexOutOfBoundsException("setSequenceSetProperties: Index value '" + index + "' not in range [0.." + (this._sequenceSetPropertiesList.size() - 1) + "]");\r
757         }\r
758         \r
759         this._sequenceSetPropertiesList.set(index, vSequenceSetProperties);\r
760     }\r
761 \r
762     /**\r
763      * \r
764      * \r
765      * @param vSequenceSetPropertiesArray\r
766      */\r
767     public void setSequenceSetProperties(\r
768             final jalview.schemabinding.version2.SequenceSetProperties[] vSequenceSetPropertiesArray) {\r
769         //-- copy array\r
770         _sequenceSetPropertiesList.clear();\r
771         \r
772         for (int i = 0; i < vSequenceSetPropertiesArray.length; i++) {\r
773                 this._sequenceSetPropertiesList.add(vSequenceSetPropertiesArray[i]);\r
774         }\r
775     }\r
776 \r
777     /**\r
778      * Method unmarshal.\r
779      * \r
780      * @param reader\r
781      * @throws org.exolab.castor.xml.MarshalException if object is\r
782      * null or if any SAXException is thrown during marshaling\r
783      * @throws org.exolab.castor.xml.ValidationException if this\r
784      * object is an invalid instance according to the schema\r
785      * @return the unmarshaled\r
786      * jalview.schemabinding.version2.SequenceSet\r
787      */\r
788     public static jalview.schemabinding.version2.SequenceSet unmarshal(\r
789             final java.io.Reader reader)\r
790     throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
791         return (jalview.schemabinding.version2.SequenceSet) Unmarshaller.unmarshal(jalview.schemabinding.version2.SequenceSet.class, reader);\r
792     }\r
793 \r
794     /**\r
795      * \r
796      * \r
797      * @throws org.exolab.castor.xml.ValidationException if this\r
798      * object is an invalid instance according to the schema\r
799      */\r
800     public void validate(\r
801     )\r
802     throws org.exolab.castor.xml.ValidationException {\r
803         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();\r
804         validator.validate(this);\r
805     }\r
806 \r
807 }\r