Binding with descriptors
[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 0.9.6</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 java.io.IOException;\r
15 import java.io.Reader;\r
16 import java.io.Serializable;\r
17 import java.io.Writer;\r
18 import java.util.Enumeration;\r
19 import java.util.Vector;\r
20 import org.exolab.castor.xml.MarshalException;\r
21 import org.exolab.castor.xml.Marshaller;\r
22 import org.exolab.castor.xml.Unmarshaller;\r
23 import org.exolab.castor.xml.ValidationException;\r
24 import org.xml.sax.ContentHandler;\r
25 \r
26 /**\r
27  * Class JGroup.\r
28  * \r
29  * @version $Revision$ $Date$\r
30  */\r
31 public class JGroup implements java.io.Serializable {\r
32 \r
33 \r
34       //--------------------------/\r
35      //- Class/Member Variables -/\r
36     //--------------------------/\r
37 \r
38     /**\r
39      * Field _start\r
40      */\r
41     private int _start;\r
42 \r
43     /**\r
44      * keeps track of state for field: _start\r
45      */\r
46     private boolean _has_start;\r
47 \r
48     /**\r
49      * Field _end\r
50      */\r
51     private int _end;\r
52 \r
53     /**\r
54      * keeps track of state for field: _end\r
55      */\r
56     private boolean _has_end;\r
57 \r
58     /**\r
59      * Field _name\r
60      */\r
61     private java.lang.String _name;\r
62 \r
63     /**\r
64      * Field _colour\r
65      */\r
66     private java.lang.String _colour;\r
67 \r
68     /**\r
69      * Field _consThreshold\r
70      */\r
71     private int _consThreshold;\r
72 \r
73     /**\r
74      * keeps track of state for field: _consThreshold\r
75      */\r
76     private boolean _has_consThreshold;\r
77 \r
78     /**\r
79      * Field _pidThreshold\r
80      */\r
81     private int _pidThreshold;\r
82 \r
83     /**\r
84      * keeps track of state for field: _pidThreshold\r
85      */\r
86     private boolean _has_pidThreshold;\r
87 \r
88     /**\r
89      * Field _outlineColour\r
90      */\r
91     private int _outlineColour;\r
92 \r
93     /**\r
94      * keeps track of state for field: _outlineColour\r
95      */\r
96     private boolean _has_outlineColour;\r
97 \r
98     /**\r
99      * Field _displayBoxes\r
100      */\r
101     private boolean _displayBoxes;\r
102 \r
103     /**\r
104      * keeps track of state for field: _displayBoxes\r
105      */\r
106     private boolean _has_displayBoxes;\r
107 \r
108     /**\r
109      * Field _displayText\r
110      */\r
111     private boolean _displayText;\r
112 \r
113     /**\r
114      * keeps track of state for field: _displayText\r
115      */\r
116     private boolean _has_displayText;\r
117 \r
118     /**\r
119      * Field _colourText\r
120      */\r
121     private boolean _colourText;\r
122 \r
123     /**\r
124      * keeps track of state for field: _colourText\r
125      */\r
126     private boolean _has_colourText;\r
127 \r
128     /**\r
129      * Field _seqList\r
130      */\r
131     private java.util.Vector _seqList;\r
132 \r
133 \r
134       //----------------/\r
135      //- Constructors -/\r
136     //----------------/\r
137 \r
138     public JGroup() {\r
139         super();\r
140         _seqList = new Vector();\r
141     } //-- jalview.schemabinding.version2.JGroup()\r
142 \r
143 \r
144       //-----------/\r
145      //- Methods -/\r
146     //-----------/\r
147 \r
148     /**\r
149      * Method addSeq\r
150      * \r
151      * \r
152      * \r
153      * @param vSeq\r
154      */\r
155     public void addSeq(int vSeq)\r
156         throws java.lang.IndexOutOfBoundsException\r
157     {\r
158         _seqList.addElement(new java.lang.Integer(vSeq));\r
159     } //-- void addSeq(int) \r
160 \r
161     /**\r
162      * Method addSeq\r
163      * \r
164      * \r
165      * \r
166      * @param index\r
167      * @param vSeq\r
168      */\r
169     public void addSeq(int index, int vSeq)\r
170         throws java.lang.IndexOutOfBoundsException\r
171     {\r
172         _seqList.insertElementAt(new java.lang.Integer(vSeq), index);\r
173     } //-- void addSeq(int, int) \r
174 \r
175     /**\r
176      * Method deleteColourText\r
177      * \r
178      */\r
179     public void deleteColourText()\r
180     {\r
181         this._has_colourText= false;\r
182     } //-- void deleteColourText() \r
183 \r
184     /**\r
185      * Method deleteConsThreshold\r
186      * \r
187      */\r
188     public void deleteConsThreshold()\r
189     {\r
190         this._has_consThreshold= false;\r
191     } //-- void deleteConsThreshold() \r
192 \r
193     /**\r
194      * Method deleteDisplayBoxes\r
195      * \r
196      */\r
197     public void deleteDisplayBoxes()\r
198     {\r
199         this._has_displayBoxes= false;\r
200     } //-- void deleteDisplayBoxes() \r
201 \r
202     /**\r
203      * Method deleteDisplayText\r
204      * \r
205      */\r
206     public void deleteDisplayText()\r
207     {\r
208         this._has_displayText= false;\r
209     } //-- void deleteDisplayText() \r
210 \r
211     /**\r
212      * Method deleteEnd\r
213      * \r
214      */\r
215     public void deleteEnd()\r
216     {\r
217         this._has_end= false;\r
218     } //-- void deleteEnd() \r
219 \r
220     /**\r
221      * Method deleteOutlineColour\r
222      * \r
223      */\r
224     public void deleteOutlineColour()\r
225     {\r
226         this._has_outlineColour= false;\r
227     } //-- void deleteOutlineColour() \r
228 \r
229     /**\r
230      * Method deletePidThreshold\r
231      * \r
232      */\r
233     public void deletePidThreshold()\r
234     {\r
235         this._has_pidThreshold= false;\r
236     } //-- void deletePidThreshold() \r
237 \r
238     /**\r
239      * Method deleteStart\r
240      * \r
241      */\r
242     public void deleteStart()\r
243     {\r
244         this._has_start= false;\r
245     } //-- void deleteStart() \r
246 \r
247     /**\r
248      * Method enumerateSeq\r
249      * \r
250      * \r
251      * \r
252      * @return Enumeration\r
253      */\r
254     public java.util.Enumeration enumerateSeq()\r
255     {\r
256         return _seqList.elements();\r
257     } //-- java.util.Enumeration enumerateSeq() \r
258 \r
259     /**\r
260      * Returns the value of field 'colour'.\r
261      * \r
262      * @return String\r
263      * @return the value of field 'colour'.\r
264      */\r
265     public java.lang.String getColour()\r
266     {\r
267         return this._colour;\r
268     } //-- java.lang.String getColour() \r
269 \r
270     /**\r
271      * Returns the value of field 'colourText'.\r
272      * \r
273      * @return boolean\r
274      * @return the value of field 'colourText'.\r
275      */\r
276     public boolean getColourText()\r
277     {\r
278         return this._colourText;\r
279     } //-- boolean getColourText() \r
280 \r
281     /**\r
282      * Returns the value of field 'consThreshold'.\r
283      * \r
284      * @return int\r
285      * @return the value of field 'consThreshold'.\r
286      */\r
287     public int getConsThreshold()\r
288     {\r
289         return this._consThreshold;\r
290     } //-- int getConsThreshold() \r
291 \r
292     /**\r
293      * Returns the value of field 'displayBoxes'.\r
294      * \r
295      * @return boolean\r
296      * @return the value of field 'displayBoxes'.\r
297      */\r
298     public boolean getDisplayBoxes()\r
299     {\r
300         return this._displayBoxes;\r
301     } //-- boolean getDisplayBoxes() \r
302 \r
303     /**\r
304      * Returns the value of field 'displayText'.\r
305      * \r
306      * @return boolean\r
307      * @return the value of field 'displayText'.\r
308      */\r
309     public boolean getDisplayText()\r
310     {\r
311         return this._displayText;\r
312     } //-- boolean getDisplayText() \r
313 \r
314     /**\r
315      * Returns the value of field 'end'.\r
316      * \r
317      * @return int\r
318      * @return the value of field 'end'.\r
319      */\r
320     public int getEnd()\r
321     {\r
322         return this._end;\r
323     } //-- int getEnd() \r
324 \r
325     /**\r
326      * Returns the value of field 'name'.\r
327      * \r
328      * @return String\r
329      * @return the value of field 'name'.\r
330      */\r
331     public java.lang.String getName()\r
332     {\r
333         return this._name;\r
334     } //-- java.lang.String getName() \r
335 \r
336     /**\r
337      * Returns the value of field 'outlineColour'.\r
338      * \r
339      * @return int\r
340      * @return the value of field 'outlineColour'.\r
341      */\r
342     public int getOutlineColour()\r
343     {\r
344         return this._outlineColour;\r
345     } //-- int getOutlineColour() \r
346 \r
347     /**\r
348      * Returns the value of field 'pidThreshold'.\r
349      * \r
350      * @return int\r
351      * @return the value of field 'pidThreshold'.\r
352      */\r
353     public int getPidThreshold()\r
354     {\r
355         return this._pidThreshold;\r
356     } //-- int getPidThreshold() \r
357 \r
358     /**\r
359      * Method getSeq\r
360      * \r
361      * \r
362      * \r
363      * @param index\r
364      * @return int\r
365      */\r
366     public int getSeq(int index)\r
367         throws java.lang.IndexOutOfBoundsException\r
368     {\r
369         //-- check bounds for index\r
370         if ((index < 0) || (index > _seqList.size())) {\r
371             throw new IndexOutOfBoundsException();\r
372         }\r
373         \r
374         return ((java.lang.Integer)_seqList.elementAt(index)).intValue();\r
375     } //-- int getSeq(int) \r
376 \r
377     /**\r
378      * Method getSeq\r
379      * \r
380      * \r
381      * \r
382      * @return int\r
383      */\r
384     public int[] getSeq()\r
385     {\r
386         int size = _seqList.size();\r
387         int[] mArray = new int[size];\r
388         for (int index = 0; index < size; index++) {\r
389             mArray[index] = ((java.lang.Integer)_seqList.elementAt(index)).intValue();\r
390         }\r
391         return mArray;\r
392     } //-- int[] getSeq() \r
393 \r
394     /**\r
395      * Method getSeqCount\r
396      * \r
397      * \r
398      * \r
399      * @return int\r
400      */\r
401     public int getSeqCount()\r
402     {\r
403         return _seqList.size();\r
404     } //-- int getSeqCount() \r
405 \r
406     /**\r
407      * Returns the value of field 'start'.\r
408      * \r
409      * @return int\r
410      * @return the value of field 'start'.\r
411      */\r
412     public int getStart()\r
413     {\r
414         return this._start;\r
415     } //-- int getStart() \r
416 \r
417     /**\r
418      * Method hasColourText\r
419      * \r
420      * \r
421      * \r
422      * @return boolean\r
423      */\r
424     public boolean hasColourText()\r
425     {\r
426         return this._has_colourText;\r
427     } //-- boolean hasColourText() \r
428 \r
429     /**\r
430      * Method hasConsThreshold\r
431      * \r
432      * \r
433      * \r
434      * @return boolean\r
435      */\r
436     public boolean hasConsThreshold()\r
437     {\r
438         return this._has_consThreshold;\r
439     } //-- boolean hasConsThreshold() \r
440 \r
441     /**\r
442      * Method hasDisplayBoxes\r
443      * \r
444      * \r
445      * \r
446      * @return boolean\r
447      */\r
448     public boolean hasDisplayBoxes()\r
449     {\r
450         return this._has_displayBoxes;\r
451     } //-- boolean hasDisplayBoxes() \r
452 \r
453     /**\r
454      * Method hasDisplayText\r
455      * \r
456      * \r
457      * \r
458      * @return boolean\r
459      */\r
460     public boolean hasDisplayText()\r
461     {\r
462         return this._has_displayText;\r
463     } //-- boolean hasDisplayText() \r
464 \r
465     /**\r
466      * Method hasEnd\r
467      * \r
468      * \r
469      * \r
470      * @return boolean\r
471      */\r
472     public boolean hasEnd()\r
473     {\r
474         return this._has_end;\r
475     } //-- boolean hasEnd() \r
476 \r
477     /**\r
478      * Method hasOutlineColour\r
479      * \r
480      * \r
481      * \r
482      * @return boolean\r
483      */\r
484     public boolean hasOutlineColour()\r
485     {\r
486         return this._has_outlineColour;\r
487     } //-- boolean hasOutlineColour() \r
488 \r
489     /**\r
490      * Method hasPidThreshold\r
491      * \r
492      * \r
493      * \r
494      * @return boolean\r
495      */\r
496     public boolean hasPidThreshold()\r
497     {\r
498         return this._has_pidThreshold;\r
499     } //-- boolean hasPidThreshold() \r
500 \r
501     /**\r
502      * Method hasStart\r
503      * \r
504      * \r
505      * \r
506      * @return boolean\r
507      */\r
508     public boolean hasStart()\r
509     {\r
510         return this._has_start;\r
511     } //-- boolean hasStart() \r
512 \r
513     /**\r
514      * Method isValid\r
515      * \r
516      * \r
517      * \r
518      * @return boolean\r
519      */\r
520     public boolean isValid()\r
521     {\r
522         try {\r
523             validate();\r
524         }\r
525         catch (org.exolab.castor.xml.ValidationException vex) {\r
526             return false;\r
527         }\r
528         return true;\r
529     } //-- boolean isValid() \r
530 \r
531     /**\r
532      * Method marshal\r
533      * \r
534      * \r
535      * \r
536      * @param out\r
537      */\r
538     public void marshal(java.io.Writer out)\r
539         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
540     {\r
541         \r
542         Marshaller.marshal(this, out);\r
543     } //-- void marshal(java.io.Writer) \r
544 \r
545     /**\r
546      * Method marshal\r
547      * \r
548      * \r
549      * \r
550      * @param handler\r
551      */\r
552     public void marshal(org.xml.sax.ContentHandler handler)\r
553         throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
554     {\r
555         \r
556         Marshaller.marshal(this, handler);\r
557     } //-- void marshal(org.xml.sax.ContentHandler) \r
558 \r
559     /**\r
560      * Method removeAllSeq\r
561      * \r
562      */\r
563     public void removeAllSeq()\r
564     {\r
565         _seqList.removeAllElements();\r
566     } //-- void removeAllSeq() \r
567 \r
568     /**\r
569      * Method removeSeq\r
570      * \r
571      * \r
572      * \r
573      * @param index\r
574      * @return int\r
575      */\r
576     public int removeSeq(int index)\r
577     {\r
578         java.lang.Object obj = _seqList.elementAt(index);\r
579         _seqList.removeElementAt(index);\r
580         return ((java.lang.Integer)obj).intValue();\r
581     } //-- int removeSeq(int) \r
582 \r
583     /**\r
584      * Sets the value of field 'colour'.\r
585      * \r
586      * @param colour the value of field 'colour'.\r
587      */\r
588     public void setColour(java.lang.String colour)\r
589     {\r
590         this._colour = colour;\r
591     } //-- void setColour(java.lang.String) \r
592 \r
593     /**\r
594      * Sets the value of field 'colourText'.\r
595      * \r
596      * @param colourText the value of field 'colourText'.\r
597      */\r
598     public void setColourText(boolean colourText)\r
599     {\r
600         this._colourText = colourText;\r
601         this._has_colourText = true;\r
602     } //-- void setColourText(boolean) \r
603 \r
604     /**\r
605      * Sets the value of field 'consThreshold'.\r
606      * \r
607      * @param consThreshold the value of field 'consThreshold'.\r
608      */\r
609     public void setConsThreshold(int consThreshold)\r
610     {\r
611         this._consThreshold = consThreshold;\r
612         this._has_consThreshold = true;\r
613     } //-- void setConsThreshold(int) \r
614 \r
615     /**\r
616      * Sets the value of field 'displayBoxes'.\r
617      * \r
618      * @param displayBoxes the value of field 'displayBoxes'.\r
619      */\r
620     public void setDisplayBoxes(boolean displayBoxes)\r
621     {\r
622         this._displayBoxes = displayBoxes;\r
623         this._has_displayBoxes = true;\r
624     } //-- void setDisplayBoxes(boolean) \r
625 \r
626     /**\r
627      * Sets the value of field 'displayText'.\r
628      * \r
629      * @param displayText the value of field 'displayText'.\r
630      */\r
631     public void setDisplayText(boolean displayText)\r
632     {\r
633         this._displayText = displayText;\r
634         this._has_displayText = true;\r
635     } //-- void setDisplayText(boolean) \r
636 \r
637     /**\r
638      * Sets the value of field 'end'.\r
639      * \r
640      * @param end the value of field 'end'.\r
641      */\r
642     public void setEnd(int end)\r
643     {\r
644         this._end = end;\r
645         this._has_end = true;\r
646     } //-- void setEnd(int) \r
647 \r
648     /**\r
649      * Sets the value of field 'name'.\r
650      * \r
651      * @param name the value of field 'name'.\r
652      */\r
653     public void setName(java.lang.String name)\r
654     {\r
655         this._name = name;\r
656     } //-- void setName(java.lang.String) \r
657 \r
658     /**\r
659      * Sets the value of field 'outlineColour'.\r
660      * \r
661      * @param outlineColour the value of field 'outlineColour'.\r
662      */\r
663     public void setOutlineColour(int outlineColour)\r
664     {\r
665         this._outlineColour = outlineColour;\r
666         this._has_outlineColour = true;\r
667     } //-- void setOutlineColour(int) \r
668 \r
669     /**\r
670      * Sets the value of field 'pidThreshold'.\r
671      * \r
672      * @param pidThreshold the value of field 'pidThreshold'.\r
673      */\r
674     public void setPidThreshold(int pidThreshold)\r
675     {\r
676         this._pidThreshold = pidThreshold;\r
677         this._has_pidThreshold = true;\r
678     } //-- void setPidThreshold(int) \r
679 \r
680     /**\r
681      * Method setSeq\r
682      * \r
683      * \r
684      * \r
685      * @param index\r
686      * @param vSeq\r
687      */\r
688     public void setSeq(int index, int vSeq)\r
689         throws java.lang.IndexOutOfBoundsException\r
690     {\r
691         //-- check bounds for index\r
692         if ((index < 0) || (index > _seqList.size())) {\r
693             throw new IndexOutOfBoundsException();\r
694         }\r
695         _seqList.setElementAt(new java.lang.Integer(vSeq), index);\r
696     } //-- void setSeq(int, int) \r
697 \r
698     /**\r
699      * Method setSeq\r
700      * \r
701      * \r
702      * \r
703      * @param seqArray\r
704      */\r
705     public void setSeq(int[] seqArray)\r
706     {\r
707         //-- copy array\r
708         _seqList.removeAllElements();\r
709         for (int i = 0; i < seqArray.length; i++) {\r
710             _seqList.addElement(new java.lang.Integer(seqArray[i]));\r
711         }\r
712     } //-- void setSeq(int) \r
713 \r
714     /**\r
715      * Sets the value of field 'start'.\r
716      * \r
717      * @param start the value of field 'start'.\r
718      */\r
719     public void setStart(int start)\r
720     {\r
721         this._start = start;\r
722         this._has_start = true;\r
723     } //-- void setStart(int) \r
724 \r
725     /**\r
726      * Method unmarshal\r
727      * \r
728      * \r
729      * \r
730      * @param reader\r
731      * @return Object\r
732      */\r
733     public static java.lang.Object unmarshal(java.io.Reader reader)\r
734         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
735     {\r
736         return (jalview.schemabinding.version2.JGroup) Unmarshaller.unmarshal(jalview.schemabinding.version2.JGroup.class, reader);\r
737     } //-- java.lang.Object unmarshal(java.io.Reader) \r
738 \r
739     /**\r
740      * Method validate\r
741      * \r
742      */\r
743     public void validate()\r
744         throws org.exolab.castor.xml.ValidationException\r
745     {\r
746         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();\r
747         validator.validate(this);\r
748     } //-- void validate() \r
749 \r
750 }\r