Clover icon

jalviewX

  1. Project Clover database Wed Oct 31 2018 15:13:58 GMT
  2. Package jalview.schemabinding.version2

File SequenceSet.java

 

Coverage histogram

../../../img/srcFileCovDistChart3.png
47% of files have more coverage

Code metrics

24
98
54
1
872
379
75
0.77
1.81
54
1.39

Classes

Class Line # Actions
SequenceSet 22 98 75 128
0.2727272827.3%
 

Contributing tests

This file is covered by 16 tests. .

Source view

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