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