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
150 * Field _showUnconserved.
\r
152 private boolean _showUnconserved;
\r
155 * keeps track of state for field: _showUnconserved
\r
157 private boolean _has_showUnconserved;
\r
162 private java.util.Vector _seqList;
\r
165 //----------------/
\r
166 //- Constructors -/
\r
167 //----------------/
\r
171 this._seqList = new java.util.Vector();
\r
183 * @throws java.lang.IndexOutOfBoundsException if the index
\r
184 * given is outside the bounds of the collection
\r
186 public void addSeq(
\r
187 final java.lang.String vSeq)
\r
188 throws java.lang.IndexOutOfBoundsException {
\r
189 this._seqList.addElement(vSeq);
\r
197 * @throws java.lang.IndexOutOfBoundsException if the index
\r
198 * given is outside the bounds of the collection
\r
200 public void addSeq(
\r
202 final java.lang.String vSeq)
\r
203 throws java.lang.IndexOutOfBoundsException {
\r
204 this._seqList.add(index, vSeq);
\r
209 public void deleteColourText(
\r
211 this._has_colourText= false;
\r
216 public void deleteConsThreshold(
\r
218 this._has_consThreshold= false;
\r
223 public void deleteDisplayBoxes(
\r
225 this._has_displayBoxes= false;
\r
230 public void deleteDisplayText(
\r
232 this._has_displayText= false;
\r
237 public void deleteEnd(
\r
239 this._has_end= false;
\r
244 public void deleteOutlineColour(
\r
246 this._has_outlineColour= false;
\r
251 public void deletePidThreshold(
\r
253 this._has_pidThreshold= false;
\r
258 public void deleteShowUnconserved(
\r
260 this._has_showUnconserved= false;
\r
265 public void deleteStart(
\r
267 this._has_start= false;
\r
272 public void deleteTextCol1(
\r
274 this._has_textCol1= false;
\r
279 public void deleteTextCol2(
\r
281 this._has_textCol2= false;
\r
286 public void deleteTextColThreshold(
\r
288 this._has_textColThreshold= false;
\r
292 * Method enumerateSeq.
\r
294 * @return an Enumeration over all java.lang.String elements
\r
296 public java.util.Enumeration enumerateSeq(
\r
298 return this._seqList.elements();
\r
302 * Returns the value of field 'colour'.
\r
304 * @return the value of field 'Colour'.
\r
306 public java.lang.String getColour(
\r
308 return this._colour;
\r
312 * Returns the value of field 'colourText'.
\r
314 * @return the value of field 'ColourText'.
\r
316 public boolean getColourText(
\r
318 return this._colourText;
\r
322 * Returns the value of field 'consThreshold'.
\r
324 * @return the value of field 'ConsThreshold'.
\r
326 public int getConsThreshold(
\r
328 return this._consThreshold;
\r
332 * Returns the value of field 'displayBoxes'.
\r
334 * @return the value of field 'DisplayBoxes'.
\r
336 public boolean getDisplayBoxes(
\r
338 return this._displayBoxes;
\r
342 * Returns the value of field 'displayText'.
\r
344 * @return the value of field 'DisplayText'.
\r
346 public boolean getDisplayText(
\r
348 return this._displayText;
\r
352 * Returns the value of field 'end'.
\r
354 * @return the value of field 'End'.
\r
362 * Returns the value of field 'name'.
\r
364 * @return the value of field 'Name'.
\r
366 public java.lang.String getName(
\r
372 * Returns the value of field 'outlineColour'.
\r
374 * @return the value of field 'OutlineColour'.
\r
376 public int getOutlineColour(
\r
378 return this._outlineColour;
\r
382 * Returns the value of field 'pidThreshold'.
\r
384 * @return the value of field 'PidThreshold'.
\r
386 public int getPidThreshold(
\r
388 return this._pidThreshold;
\r
395 * @throws java.lang.IndexOutOfBoundsException if the index
\r
396 * given is outside the bounds of the collection
\r
397 * @return the value of the java.lang.String at the given index
\r
399 public java.lang.String getSeq(
\r
401 throws java.lang.IndexOutOfBoundsException {
\r
402 // check bounds for index
\r
403 if (index < 0 || index >= this._seqList.size()) {
\r
404 throw new IndexOutOfBoundsException("getSeq: Index value '" + index + "' not in range [0.." + (this._seqList.size() - 1) + "]");
\r
407 return (java.lang.String) _seqList.get(index);
\r
411 * Method getSeq.Returns the contents of the collection in an
\r
412 * Array. <p>Note: Just in case the collection contents are
\r
413 * changing in another thread, we pass a 0-length Array of the
\r
414 * correct type into the API call. This way we <i>know</i>
\r
415 * that the Array returned is of exactly the correct length.
\r
417 * @return this collection as an Array
\r
419 public java.lang.String[] getSeq(
\r
421 java.lang.String[] array = new java.lang.String[0];
\r
422 return (java.lang.String[]) this._seqList.toArray(array);
\r
426 * Method getSeqCount.
\r
428 * @return the size of this collection
\r
430 public int getSeqCount(
\r
432 return this._seqList.size();
\r
436 * Returns the value of field 'showUnconserved'.
\r
438 * @return the value of field 'ShowUnconserved'.
\r
440 public boolean getShowUnconserved(
\r
442 return this._showUnconserved;
\r
446 * Returns the value of field 'start'.
\r
448 * @return the value of field 'Start'.
\r
450 public int getStart(
\r
452 return this._start;
\r
456 * Returns the value of field 'textCol1'.
\r
458 * @return the value of field 'TextCol1'.
\r
460 public int getTextCol1(
\r
462 return this._textCol1;
\r
466 * Returns the value of field 'textCol2'.
\r
468 * @return the value of field 'TextCol2'.
\r
470 public int getTextCol2(
\r
472 return this._textCol2;
\r
476 * Returns the value of field 'textColThreshold'.
\r
478 * @return the value of field 'TextColThreshold'.
\r
480 public int getTextColThreshold(
\r
482 return this._textColThreshold;
\r
486 * Method hasColourText.
\r
488 * @return true if at least one ColourText has been added
\r
490 public boolean hasColourText(
\r
492 return this._has_colourText;
\r
496 * Method hasConsThreshold.
\r
498 * @return true if at least one ConsThreshold has been added
\r
500 public boolean hasConsThreshold(
\r
502 return this._has_consThreshold;
\r
506 * Method hasDisplayBoxes.
\r
508 * @return true if at least one DisplayBoxes has been added
\r
510 public boolean hasDisplayBoxes(
\r
512 return this._has_displayBoxes;
\r
516 * Method hasDisplayText.
\r
518 * @return true if at least one DisplayText has been added
\r
520 public boolean hasDisplayText(
\r
522 return this._has_displayText;
\r
528 * @return true if at least one End has been added
\r
530 public boolean hasEnd(
\r
532 return this._has_end;
\r
536 * Method hasOutlineColour.
\r
538 * @return true if at least one OutlineColour has been added
\r
540 public boolean hasOutlineColour(
\r
542 return this._has_outlineColour;
\r
546 * Method hasPidThreshold.
\r
548 * @return true if at least one PidThreshold has been added
\r
550 public boolean hasPidThreshold(
\r
552 return this._has_pidThreshold;
\r
556 * Method hasShowUnconserved.
\r
558 * @return true if at least one ShowUnconserved has been added
\r
560 public boolean hasShowUnconserved(
\r
562 return this._has_showUnconserved;
\r
568 * @return true if at least one Start has been added
\r
570 public boolean hasStart(
\r
572 return this._has_start;
\r
576 * Method hasTextCol1.
\r
578 * @return true if at least one TextCol1 has been added
\r
580 public boolean hasTextCol1(
\r
582 return this._has_textCol1;
\r
586 * Method hasTextCol2.
\r
588 * @return true if at least one TextCol2 has been added
\r
590 public boolean hasTextCol2(
\r
592 return this._has_textCol2;
\r
596 * Method hasTextColThreshold.
\r
598 * @return true if at least one TextColThreshold has been added
\r
600 public boolean hasTextColThreshold(
\r
602 return this._has_textColThreshold;
\r
606 * Returns the value of field 'colourText'.
\r
608 * @return the value of field 'ColourText'.
\r
610 public boolean isColourText(
\r
612 return this._colourText;
\r
616 * Returns the value of field 'displayBoxes'.
\r
618 * @return the value of field 'DisplayBoxes'.
\r
620 public boolean isDisplayBoxes(
\r
622 return this._displayBoxes;
\r
626 * Returns the value of field 'displayText'.
\r
628 * @return the value of field 'DisplayText'.
\r
630 public boolean isDisplayText(
\r
632 return this._displayText;
\r
636 * Returns the value of field 'showUnconserved'.
\r
638 * @return the value of field 'ShowUnconserved'.
\r
640 public boolean isShowUnconserved(
\r
642 return this._showUnconserved;
\r
648 * @return true if this object is valid according to the schema
\r
650 public boolean isValid(
\r
654 } catch (org.exolab.castor.xml.ValidationException vex) {
\r
664 * @throws org.exolab.castor.xml.MarshalException if object is
\r
665 * null or if any SAXException is thrown during marshaling
\r
666 * @throws org.exolab.castor.xml.ValidationException if this
\r
667 * object is an invalid instance according to the schema
\r
669 public void marshal(
\r
670 final java.io.Writer out)
\r
671 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
\r
672 Marshaller.marshal(this, out);
\r
679 * @throws java.io.IOException if an IOException occurs during
\r
681 * @throws org.exolab.castor.xml.ValidationException if this
\r
682 * object is an invalid instance according to the schema
\r
683 * @throws org.exolab.castor.xml.MarshalException if object is
\r
684 * null or if any SAXException is thrown during marshaling
\r
686 public void marshal(
\r
687 final org.xml.sax.ContentHandler handler)
\r
688 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
\r
689 Marshaller.marshal(this, handler);
\r
694 public void removeAllSeq(
\r
696 this._seqList.clear();
\r
700 * Method removeSeq.
\r
703 * @return true if the object was removed from the collection.
\r
705 public boolean removeSeq(
\r
706 final java.lang.String vSeq) {
\r
707 boolean removed = _seqList.remove(vSeq);
\r
712 * Method removeSeqAt.
\r
715 * @return the element removed from the collection
\r
717 public java.lang.String removeSeqAt(
\r
719 java.lang.Object obj = this._seqList.remove(index);
\r
720 return (java.lang.String) obj;
\r
724 * Sets the value of field 'colour'.
\r
726 * @param colour the value of field 'colour'.
\r
728 public void setColour(
\r
729 final java.lang.String colour) {
\r
730 this._colour = colour;
\r
734 * Sets the value of field 'colourText'.
\r
736 * @param colourText the value of field 'colourText'.
\r
738 public void setColourText(
\r
739 final boolean colourText) {
\r
740 this._colourText = colourText;
\r
741 this._has_colourText = true;
\r
745 * Sets the value of field 'consThreshold'.
\r
747 * @param consThreshold the value of field 'consThreshold'.
\r
749 public void setConsThreshold(
\r
750 final int consThreshold) {
\r
751 this._consThreshold = consThreshold;
\r
752 this._has_consThreshold = true;
\r
756 * Sets the value of field 'displayBoxes'.
\r
758 * @param displayBoxes the value of field 'displayBoxes'.
\r
760 public void setDisplayBoxes(
\r
761 final boolean displayBoxes) {
\r
762 this._displayBoxes = displayBoxes;
\r
763 this._has_displayBoxes = true;
\r
767 * Sets the value of field 'displayText'.
\r
769 * @param displayText the value of field 'displayText'.
\r
771 public void setDisplayText(
\r
772 final boolean displayText) {
\r
773 this._displayText = displayText;
\r
774 this._has_displayText = true;
\r
778 * Sets the value of field 'end'.
\r
780 * @param end the value of field 'end'.
\r
782 public void setEnd(
\r
785 this._has_end = true;
\r
789 * Sets the value of field 'name'.
\r
791 * @param name the value of field 'name'.
\r
793 public void setName(
\r
794 final java.lang.String name) {
\r
799 * Sets the value of field 'outlineColour'.
\r
801 * @param outlineColour the value of field 'outlineColour'.
\r
803 public void setOutlineColour(
\r
804 final int outlineColour) {
\r
805 this._outlineColour = outlineColour;
\r
806 this._has_outlineColour = true;
\r
810 * Sets the value of field 'pidThreshold'.
\r
812 * @param pidThreshold the value of field 'pidThreshold'.
\r
814 public void setPidThreshold(
\r
815 final int pidThreshold) {
\r
816 this._pidThreshold = pidThreshold;
\r
817 this._has_pidThreshold = true;
\r
825 * @throws java.lang.IndexOutOfBoundsException if the index
\r
826 * given is outside the bounds of the collection
\r
828 public void setSeq(
\r
830 final java.lang.String vSeq)
\r
831 throws java.lang.IndexOutOfBoundsException {
\r
832 // check bounds for index
\r
833 if (index < 0 || index >= this._seqList.size()) {
\r
834 throw new IndexOutOfBoundsException("setSeq: Index value '" + index + "' not in range [0.." + (this._seqList.size() - 1) + "]");
\r
837 this._seqList.set(index, vSeq);
\r
845 public void setSeq(
\r
846 final java.lang.String[] vSeqArray) {
\r
850 for (int i = 0; i < vSeqArray.length; i++) {
\r
851 this._seqList.add(vSeqArray[i]);
\r
856 * Sets the value of field 'showUnconserved'.
\r
858 * @param showUnconserved the value of field 'showUnconserved'.
\r
860 public void setShowUnconserved(
\r
861 final boolean showUnconserved) {
\r
862 this._showUnconserved = showUnconserved;
\r
863 this._has_showUnconserved = true;
\r
867 * Sets the value of field 'start'.
\r
869 * @param start the value of field 'start'.
\r
871 public void setStart(
\r
873 this._start = start;
\r
874 this._has_start = true;
\r
878 * Sets the value of field 'textCol1'.
\r
880 * @param textCol1 the value of field 'textCol1'.
\r
882 public void setTextCol1(
\r
883 final int textCol1) {
\r
884 this._textCol1 = textCol1;
\r
885 this._has_textCol1 = true;
\r
889 * Sets the value of field 'textCol2'.
\r
891 * @param textCol2 the value of field 'textCol2'.
\r
893 public void setTextCol2(
\r
894 final int textCol2) {
\r
895 this._textCol2 = textCol2;
\r
896 this._has_textCol2 = true;
\r
900 * Sets the value of field 'textColThreshold'.
\r
902 * @param textColThreshold the value of field 'textColThreshold'
\r
904 public void setTextColThreshold(
\r
905 final int textColThreshold) {
\r
906 this._textColThreshold = textColThreshold;
\r
907 this._has_textColThreshold = true;
\r
911 * Method unmarshal.
\r
914 * @throws org.exolab.castor.xml.MarshalException if object is
\r
915 * null or if any SAXException is thrown during marshaling
\r
916 * @throws org.exolab.castor.xml.ValidationException if this
\r
917 * object is an invalid instance according to the schema
\r
918 * @return the unmarshaled jalview.schemabinding.version2.JGroup
\r
920 public static jalview.schemabinding.version2.JGroup unmarshal(
\r
921 final java.io.Reader reader)
\r
922 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
\r
923 return (jalview.schemabinding.version2.JGroup) Unmarshaller.unmarshal(jalview.schemabinding.version2.JGroup.class, reader);
\r
929 * @throws org.exolab.castor.xml.ValidationException if this
\r
930 * object is an invalid instance according to the schema
\r
932 public void validate(
\r
934 throws org.exolab.castor.xml.ValidationException {
\r
935 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
\r
936 validator.validate(this);
\r