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