2 * This class was automatically generated with
\r
3 * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
\r
8 package jalview.schemabinding.version2;
\r
10 //---------------------------------/
\r
11 //- Imported classes and packages -/
\r
12 //---------------------------------/
\r
14 import org.exolab.castor.xml.Marshaller;
\r
15 import org.exolab.castor.xml.Unmarshaller;
\r
20 * @version $Revision$ $Date$
\r
22 public class JGroup implements java.io.Serializable {
\r
25 //--------------------------/
\r
26 //- Class/Member Variables -/
\r
27 //--------------------------/
\r
35 * keeps track of state for field: _start
\r
37 private boolean _has_start;
\r
45 * keeps track of state for field: _end
\r
47 private boolean _has_end;
\r
52 private java.lang.String _name;
\r
57 private java.lang.String _colour;
\r
60 * Field _consThreshold.
\r
62 private int _consThreshold;
\r
65 * keeps track of state for field: _consThreshold
\r
67 private boolean _has_consThreshold;
\r
70 * Field _pidThreshold.
\r
72 private int _pidThreshold;
\r
75 * keeps track of state for field: _pidThreshold
\r
77 private boolean _has_pidThreshold;
\r
80 * Field _outlineColour.
\r
82 private int _outlineColour;
\r
85 * keeps track of state for field: _outlineColour
\r
87 private boolean _has_outlineColour;
\r
90 * Field _displayBoxes.
\r
92 private boolean _displayBoxes;
\r
95 * keeps track of state for field: _displayBoxes
\r
97 private boolean _has_displayBoxes;
\r
100 * Field _displayText.
\r
102 private boolean _displayText;
\r
105 * keeps track of state for field: _displayText
\r
107 private boolean _has_displayText;
\r
110 * Field _colourText.
\r
112 private boolean _colourText;
\r
115 * keeps track of state for field: _colourText
\r
117 private boolean _has_colourText;
\r
122 private int _textCol1;
\r
125 * keeps track of state for field: _textCol1
\r
127 private boolean _has_textCol1;
\r
132 private int _textCol2;
\r
135 * keeps track of state for field: _textCol2
\r
137 private boolean _has_textCol2;
\r
140 * Field _textColThreshold.
\r
142 private int _textColThreshold;
\r
145 * keeps track of state for field: _textColThreshold
\r
147 private boolean _has_textColThreshold;
\r
152 private java.util.Vector _seqList;
\r
155 //----------------/
\r
156 //- Constructors -/
\r
157 //----------------/
\r
161 this._seqList = new java.util.Vector();
\r
173 * @throws java.lang.IndexOutOfBoundsException if the index
\r
174 * given is outside the bounds of the collection
\r
176 public void addSeq(
\r
178 throws java.lang.IndexOutOfBoundsException {
\r
179 this._seqList.addElement(new java.lang.Integer(vSeq));
\r
187 * @throws java.lang.IndexOutOfBoundsException if the index
\r
188 * given is outside the bounds of the collection
\r
190 public void addSeq(
\r
193 throws java.lang.IndexOutOfBoundsException {
\r
194 this._seqList.add(index, new java.lang.Integer(vSeq));
\r
199 public void deleteColourText(
\r
201 this._has_colourText= false;
\r
206 public void deleteConsThreshold(
\r
208 this._has_consThreshold= false;
\r
213 public void deleteDisplayBoxes(
\r
215 this._has_displayBoxes= false;
\r
220 public void deleteDisplayText(
\r
222 this._has_displayText= false;
\r
227 public void deleteEnd(
\r
229 this._has_end= false;
\r
234 public void deleteOutlineColour(
\r
236 this._has_outlineColour= false;
\r
241 public void deletePidThreshold(
\r
243 this._has_pidThreshold= false;
\r
248 public void deleteStart(
\r
250 this._has_start= false;
\r
255 public void deleteTextCol1(
\r
257 this._has_textCol1= false;
\r
262 public void deleteTextCol2(
\r
264 this._has_textCol2= false;
\r
269 public void deleteTextColThreshold(
\r
271 this._has_textColThreshold= false;
\r
275 * Method enumerateSeq.
\r
277 * @return an Enumeration over all int elements
\r
279 public java.util.Enumeration enumerateSeq(
\r
281 return this._seqList.elements();
\r
285 * Returns the value of field 'colour'.
\r
287 * @return the value of field 'Colour'.
\r
289 public java.lang.String getColour(
\r
291 return this._colour;
\r
295 * Returns the value of field 'colourText'.
\r
297 * @return the value of field 'ColourText'.
\r
299 public boolean getColourText(
\r
301 return this._colourText;
\r
305 * Returns the value of field 'consThreshold'.
\r
307 * @return the value of field 'ConsThreshold'.
\r
309 public int getConsThreshold(
\r
311 return this._consThreshold;
\r
315 * Returns the value of field 'displayBoxes'.
\r
317 * @return the value of field 'DisplayBoxes'.
\r
319 public boolean getDisplayBoxes(
\r
321 return this._displayBoxes;
\r
325 * Returns the value of field 'displayText'.
\r
327 * @return the value of field 'DisplayText'.
\r
329 public boolean getDisplayText(
\r
331 return this._displayText;
\r
335 * Returns the value of field 'end'.
\r
337 * @return the value of field 'End'.
\r
345 * Returns the value of field 'name'.
\r
347 * @return the value of field 'Name'.
\r
349 public java.lang.String getName(
\r
355 * Returns the value of field 'outlineColour'.
\r
357 * @return the value of field 'OutlineColour'.
\r
359 public int getOutlineColour(
\r
361 return this._outlineColour;
\r
365 * Returns the value of field 'pidThreshold'.
\r
367 * @return the value of field 'PidThreshold'.
\r
369 public int getPidThreshold(
\r
371 return this._pidThreshold;
\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
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
390 return ((java.lang.Integer) _seqList.get(index)).intValue();
\r
394 * Method getSeq.Returns the contents of the collection in an
\r
397 * @return this collection as an Array
\r
399 public int[] getSeq(
\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
411 * Method getSeqCount.
\r
413 * @return the size of this collection
\r
415 public int getSeqCount(
\r
417 return this._seqList.size();
\r
421 * Returns the value of field 'start'.
\r
423 * @return the value of field 'Start'.
\r
425 public int getStart(
\r
427 return this._start;
\r
431 * Returns the value of field 'textCol1'.
\r
433 * @return the value of field 'TextCol1'.
\r
435 public int getTextCol1(
\r
437 return this._textCol1;
\r
441 * Returns the value of field 'textCol2'.
\r
443 * @return the value of field 'TextCol2'.
\r
445 public int getTextCol2(
\r
447 return this._textCol2;
\r
451 * Returns the value of field 'textColThreshold'.
\r
453 * @return the value of field 'TextColThreshold'.
\r
455 public int getTextColThreshold(
\r
457 return this._textColThreshold;
\r
461 * Method hasColourText.
\r
463 * @return true if at least one ColourText has been added
\r
465 public boolean hasColourText(
\r
467 return this._has_colourText;
\r
471 * Method hasConsThreshold.
\r
473 * @return true if at least one ConsThreshold has been added
\r
475 public boolean hasConsThreshold(
\r
477 return this._has_consThreshold;
\r
481 * Method hasDisplayBoxes.
\r
483 * @return true if at least one DisplayBoxes has been added
\r
485 public boolean hasDisplayBoxes(
\r
487 return this._has_displayBoxes;
\r
491 * Method hasDisplayText.
\r
493 * @return true if at least one DisplayText has been added
\r
495 public boolean hasDisplayText(
\r
497 return this._has_displayText;
\r
503 * @return true if at least one End has been added
\r
505 public boolean hasEnd(
\r
507 return this._has_end;
\r
511 * Method hasOutlineColour.
\r
513 * @return true if at least one OutlineColour has been added
\r
515 public boolean hasOutlineColour(
\r
517 return this._has_outlineColour;
\r
521 * Method hasPidThreshold.
\r
523 * @return true if at least one PidThreshold has been added
\r
525 public boolean hasPidThreshold(
\r
527 return this._has_pidThreshold;
\r
533 * @return true if at least one Start has been added
\r
535 public boolean hasStart(
\r
537 return this._has_start;
\r
541 * Method hasTextCol1.
\r
543 * @return true if at least one TextCol1 has been added
\r
545 public boolean hasTextCol1(
\r
547 return this._has_textCol1;
\r
551 * Method hasTextCol2.
\r
553 * @return true if at least one TextCol2 has been added
\r
555 public boolean hasTextCol2(
\r
557 return this._has_textCol2;
\r
561 * Method hasTextColThreshold.
\r
563 * @return true if at least one TextColThreshold has been added
\r
565 public boolean hasTextColThreshold(
\r
567 return this._has_textColThreshold;
\r
571 * Returns the value of field 'colourText'.
\r
573 * @return the value of field 'ColourText'.
\r
575 public boolean isColourText(
\r
577 return this._colourText;
\r
581 * Returns the value of field 'displayBoxes'.
\r
583 * @return the value of field 'DisplayBoxes'.
\r
585 public boolean isDisplayBoxes(
\r
587 return this._displayBoxes;
\r
591 * Returns the value of field 'displayText'.
\r
593 * @return the value of field 'DisplayText'.
\r
595 public boolean isDisplayText(
\r
597 return this._displayText;
\r
603 * @return true if this object is valid according to the schema
\r
605 public boolean isValid(
\r
609 } catch (org.exolab.castor.xml.ValidationException vex) {
\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
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
634 * @throws java.io.IOException if an IOException occurs during
\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
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
649 public void removeAllSeq(
\r
651 this._seqList.clear();
\r
655 * Method removeSeq.
\r
658 * @return true if the object was removed from the collection.
\r
660 public boolean removeSeq(
\r
662 boolean removed = _seqList.remove(new java.lang.Integer(vSeq));
\r
667 * Method removeSeqAt.
\r
670 * @return the element removed from the collection
\r
672 public int removeSeqAt(
\r
674 java.lang.Object obj = this._seqList.remove(index);
\r
675 return ((java.lang.Integer) obj).intValue();
\r
679 * Sets the value of field 'colour'.
\r
681 * @param colour the value of field 'colour'.
\r
683 public void setColour(
\r
684 final java.lang.String colour) {
\r
685 this._colour = colour;
\r
689 * Sets the value of field 'colourText'.
\r
691 * @param colourText the value of field 'colourText'.
\r
693 public void setColourText(
\r
694 final boolean colourText) {
\r
695 this._colourText = colourText;
\r
696 this._has_colourText = true;
\r
700 * Sets the value of field 'consThreshold'.
\r
702 * @param consThreshold the value of field 'consThreshold'.
\r
704 public void setConsThreshold(
\r
705 final int consThreshold) {
\r
706 this._consThreshold = consThreshold;
\r
707 this._has_consThreshold = true;
\r
711 * Sets the value of field 'displayBoxes'.
\r
713 * @param displayBoxes the value of field 'displayBoxes'.
\r
715 public void setDisplayBoxes(
\r
716 final boolean displayBoxes) {
\r
717 this._displayBoxes = displayBoxes;
\r
718 this._has_displayBoxes = true;
\r
722 * Sets the value of field 'displayText'.
\r
724 * @param displayText the value of field 'displayText'.
\r
726 public void setDisplayText(
\r
727 final boolean displayText) {
\r
728 this._displayText = displayText;
\r
729 this._has_displayText = true;
\r
733 * Sets the value of field 'end'.
\r
735 * @param end the value of field 'end'.
\r
737 public void setEnd(
\r
740 this._has_end = true;
\r
744 * Sets the value of field 'name'.
\r
746 * @param name the value of field 'name'.
\r
748 public void setName(
\r
749 final java.lang.String name) {
\r
754 * Sets the value of field 'outlineColour'.
\r
756 * @param outlineColour the value of field 'outlineColour'.
\r
758 public void setOutlineColour(
\r
759 final int outlineColour) {
\r
760 this._outlineColour = outlineColour;
\r
761 this._has_outlineColour = true;
\r
765 * Sets the value of field 'pidThreshold'.
\r
767 * @param pidThreshold the value of field 'pidThreshold'.
\r
769 public void setPidThreshold(
\r
770 final int pidThreshold) {
\r
771 this._pidThreshold = pidThreshold;
\r
772 this._has_pidThreshold = true;
\r
780 * @throws java.lang.IndexOutOfBoundsException if the index
\r
781 * given is outside the bounds of the collection
\r
783 public void setSeq(
\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
792 this._seqList.set(index, new java.lang.Integer(vSeq));
\r
800 public void setSeq(
\r
801 final int[] vSeqArray) {
\r
805 for (int i = 0; i < vSeqArray.length; i++) {
\r
806 this._seqList.add(new java.lang.Integer(vSeqArray[i]));
\r
811 * Sets the value of field 'start'.
\r
813 * @param start the value of field 'start'.
\r
815 public void setStart(
\r
817 this._start = start;
\r
818 this._has_start = true;
\r
822 * Sets the value of field 'textCol1'.
\r
824 * @param textCol1 the value of field 'textCol1'.
\r
826 public void setTextCol1(
\r
827 final int textCol1) {
\r
828 this._textCol1 = textCol1;
\r
829 this._has_textCol1 = true;
\r
833 * Sets the value of field 'textCol2'.
\r
835 * @param textCol2 the value of field 'textCol2'.
\r
837 public void setTextCol2(
\r
838 final int textCol2) {
\r
839 this._textCol2 = textCol2;
\r
840 this._has_textCol2 = true;
\r
844 * Sets the value of field 'textColThreshold'.
\r
846 * @param textColThreshold the value of field 'textColThreshold'
\r
848 public void setTextColThreshold(
\r
849 final int textColThreshold) {
\r
850 this._textColThreshold = textColThreshold;
\r
851 this._has_textColThreshold = true;
\r
855 * Method unmarshal.
\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
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
873 * @throws org.exolab.castor.xml.ValidationException if this
\r
874 * object is an invalid instance according to the schema
\r
876 public void validate(
\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