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