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
177 final java.lang.String vSeq)
\r
178 throws java.lang.IndexOutOfBoundsException {
\r
179 this._seqList.addElement(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
192 final java.lang.String vSeq)
\r
193 throws java.lang.IndexOutOfBoundsException {
\r
194 this._seqList.add(index, 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 java.lang.String 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 java.lang.String at the given index
\r
382 public java.lang.String getSeq(
\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.String) _seqList.get(index);
\r
394 * Method getSeq.Returns the contents of the collection in an
\r
395 * Array. <p>Note: Just in case the collection contents are
\r
396 * changing in another thread, we pass a 0-length Array of the
\r
397 * correct type into the API call. This way we <i>know</i>
\r
398 * that the Array returned is of exactly the correct length.
\r
400 * @return this collection as an Array
\r
402 public java.lang.String[] getSeq(
\r
404 java.lang.String[] array = new java.lang.String[0];
\r
405 return (java.lang.String[]) this._seqList.toArray(array);
\r
409 * Method getSeqCount.
\r
411 * @return the size of this collection
\r
413 public int getSeqCount(
\r
415 return this._seqList.size();
\r
419 * Returns the value of field 'start'.
\r
421 * @return the value of field 'Start'.
\r
423 public int getStart(
\r
425 return this._start;
\r
429 * Returns the value of field 'textCol1'.
\r
431 * @return the value of field 'TextCol1'.
\r
433 public int getTextCol1(
\r
435 return this._textCol1;
\r
439 * Returns the value of field 'textCol2'.
\r
441 * @return the value of field 'TextCol2'.
\r
443 public int getTextCol2(
\r
445 return this._textCol2;
\r
449 * Returns the value of field 'textColThreshold'.
\r
451 * @return the value of field 'TextColThreshold'.
\r
453 public int getTextColThreshold(
\r
455 return this._textColThreshold;
\r
459 * Method hasColourText.
\r
461 * @return true if at least one ColourText has been added
\r
463 public boolean hasColourText(
\r
465 return this._has_colourText;
\r
469 * Method hasConsThreshold.
\r
471 * @return true if at least one ConsThreshold has been added
\r
473 public boolean hasConsThreshold(
\r
475 return this._has_consThreshold;
\r
479 * Method hasDisplayBoxes.
\r
481 * @return true if at least one DisplayBoxes has been added
\r
483 public boolean hasDisplayBoxes(
\r
485 return this._has_displayBoxes;
\r
489 * Method hasDisplayText.
\r
491 * @return true if at least one DisplayText has been added
\r
493 public boolean hasDisplayText(
\r
495 return this._has_displayText;
\r
501 * @return true if at least one End has been added
\r
503 public boolean hasEnd(
\r
505 return this._has_end;
\r
509 * Method hasOutlineColour.
\r
511 * @return true if at least one OutlineColour has been added
\r
513 public boolean hasOutlineColour(
\r
515 return this._has_outlineColour;
\r
519 * Method hasPidThreshold.
\r
521 * @return true if at least one PidThreshold has been added
\r
523 public boolean hasPidThreshold(
\r
525 return this._has_pidThreshold;
\r
531 * @return true if at least one Start has been added
\r
533 public boolean hasStart(
\r
535 return this._has_start;
\r
539 * Method hasTextCol1.
\r
541 * @return true if at least one TextCol1 has been added
\r
543 public boolean hasTextCol1(
\r
545 return this._has_textCol1;
\r
549 * Method hasTextCol2.
\r
551 * @return true if at least one TextCol2 has been added
\r
553 public boolean hasTextCol2(
\r
555 return this._has_textCol2;
\r
559 * Method hasTextColThreshold.
\r
561 * @return true if at least one TextColThreshold has been added
\r
563 public boolean hasTextColThreshold(
\r
565 return this._has_textColThreshold;
\r
569 * Returns the value of field 'colourText'.
\r
571 * @return the value of field 'ColourText'.
\r
573 public boolean isColourText(
\r
575 return this._colourText;
\r
579 * Returns the value of field 'displayBoxes'.
\r
581 * @return the value of field 'DisplayBoxes'.
\r
583 public boolean isDisplayBoxes(
\r
585 return this._displayBoxes;
\r
589 * Returns the value of field 'displayText'.
\r
591 * @return the value of field 'DisplayText'.
\r
593 public boolean isDisplayText(
\r
595 return this._displayText;
\r
601 * @return true if this object is valid according to the schema
\r
603 public boolean isValid(
\r
607 } catch (org.exolab.castor.xml.ValidationException vex) {
\r
617 * @throws org.exolab.castor.xml.MarshalException if object is
\r
618 * null or if any SAXException is thrown during marshaling
\r
619 * @throws org.exolab.castor.xml.ValidationException if this
\r
620 * object is an invalid instance according to the schema
\r
622 public void marshal(
\r
623 final java.io.Writer out)
\r
624 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
\r
625 Marshaller.marshal(this, out);
\r
632 * @throws java.io.IOException if an IOException occurs during
\r
634 * @throws org.exolab.castor.xml.ValidationException if this
\r
635 * object is an invalid instance according to the schema
\r
636 * @throws org.exolab.castor.xml.MarshalException if object is
\r
637 * null or if any SAXException is thrown during marshaling
\r
639 public void marshal(
\r
640 final org.xml.sax.ContentHandler handler)
\r
641 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
\r
642 Marshaller.marshal(this, handler);
\r
647 public void removeAllSeq(
\r
649 this._seqList.clear();
\r
653 * Method removeSeq.
\r
656 * @return true if the object was removed from the collection.
\r
658 public boolean removeSeq(
\r
659 final java.lang.String vSeq) {
\r
660 boolean removed = _seqList.remove(vSeq);
\r
665 * Method removeSeqAt.
\r
668 * @return the element removed from the collection
\r
670 public java.lang.String removeSeqAt(
\r
672 java.lang.Object obj = this._seqList.remove(index);
\r
673 return (java.lang.String) obj;
\r
677 * Sets the value of field 'colour'.
\r
679 * @param colour the value of field 'colour'.
\r
681 public void setColour(
\r
682 final java.lang.String colour) {
\r
683 this._colour = colour;
\r
687 * Sets the value of field 'colourText'.
\r
689 * @param colourText the value of field 'colourText'.
\r
691 public void setColourText(
\r
692 final boolean colourText) {
\r
693 this._colourText = colourText;
\r
694 this._has_colourText = true;
\r
698 * Sets the value of field 'consThreshold'.
\r
700 * @param consThreshold the value of field 'consThreshold'.
\r
702 public void setConsThreshold(
\r
703 final int consThreshold) {
\r
704 this._consThreshold = consThreshold;
\r
705 this._has_consThreshold = true;
\r
709 * Sets the value of field 'displayBoxes'.
\r
711 * @param displayBoxes the value of field 'displayBoxes'.
\r
713 public void setDisplayBoxes(
\r
714 final boolean displayBoxes) {
\r
715 this._displayBoxes = displayBoxes;
\r
716 this._has_displayBoxes = true;
\r
720 * Sets the value of field 'displayText'.
\r
722 * @param displayText the value of field 'displayText'.
\r
724 public void setDisplayText(
\r
725 final boolean displayText) {
\r
726 this._displayText = displayText;
\r
727 this._has_displayText = true;
\r
731 * Sets the value of field 'end'.
\r
733 * @param end the value of field 'end'.
\r
735 public void setEnd(
\r
738 this._has_end = true;
\r
742 * Sets the value of field 'name'.
\r
744 * @param name the value of field 'name'.
\r
746 public void setName(
\r
747 final java.lang.String name) {
\r
752 * Sets the value of field 'outlineColour'.
\r
754 * @param outlineColour the value of field 'outlineColour'.
\r
756 public void setOutlineColour(
\r
757 final int outlineColour) {
\r
758 this._outlineColour = outlineColour;
\r
759 this._has_outlineColour = true;
\r
763 * Sets the value of field 'pidThreshold'.
\r
765 * @param pidThreshold the value of field 'pidThreshold'.
\r
767 public void setPidThreshold(
\r
768 final int pidThreshold) {
\r
769 this._pidThreshold = pidThreshold;
\r
770 this._has_pidThreshold = true;
\r
778 * @throws java.lang.IndexOutOfBoundsException if the index
\r
779 * given is outside the bounds of the collection
\r
781 public void setSeq(
\r
783 final java.lang.String vSeq)
\r
784 throws java.lang.IndexOutOfBoundsException {
\r
785 // check bounds for index
\r
786 if (index < 0 || index >= this._seqList.size()) {
\r
787 throw new IndexOutOfBoundsException("setSeq: Index value '" + index + "' not in range [0.." + (this._seqList.size() - 1) + "]");
\r
790 this._seqList.set(index, vSeq);
\r
798 public void setSeq(
\r
799 final java.lang.String[] vSeqArray) {
\r
803 for (int i = 0; i < vSeqArray.length; i++) {
\r
804 this._seqList.add(vSeqArray[i]);
\r
809 * Sets the value of field 'start'.
\r
811 * @param start the value of field 'start'.
\r
813 public void setStart(
\r
815 this._start = start;
\r
816 this._has_start = true;
\r
820 * Sets the value of field 'textCol1'.
\r
822 * @param textCol1 the value of field 'textCol1'.
\r
824 public void setTextCol1(
\r
825 final int textCol1) {
\r
826 this._textCol1 = textCol1;
\r
827 this._has_textCol1 = true;
\r
831 * Sets the value of field 'textCol2'.
\r
833 * @param textCol2 the value of field 'textCol2'.
\r
835 public void setTextCol2(
\r
836 final int textCol2) {
\r
837 this._textCol2 = textCol2;
\r
838 this._has_textCol2 = true;
\r
842 * Sets the value of field 'textColThreshold'.
\r
844 * @param textColThreshold the value of field 'textColThreshold'
\r
846 public void setTextColThreshold(
\r
847 final int textColThreshold) {
\r
848 this._textColThreshold = textColThreshold;
\r
849 this._has_textColThreshold = true;
\r
853 * Method unmarshal.
\r
856 * @throws org.exolab.castor.xml.MarshalException if object is
\r
857 * null or if any SAXException is thrown during marshaling
\r
858 * @throws org.exolab.castor.xml.ValidationException if this
\r
859 * object is an invalid instance according to the schema
\r
860 * @return the unmarshaled jalview.schemabinding.version2.JGroup
\r
862 public static jalview.schemabinding.version2.JGroup unmarshal(
\r
863 final java.io.Reader reader)
\r
864 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
\r
865 return (jalview.schemabinding.version2.JGroup) Unmarshaller.unmarshal(jalview.schemabinding.version2.JGroup.class, reader);
\r
871 * @throws org.exolab.castor.xml.ValidationException if this
\r
872 * object is an invalid instance according to the schema
\r
874 public void validate(
\r
876 throws org.exolab.castor.xml.ValidationException {
\r
877 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
\r
878 validator.validate(this);
\r