2 * This class was automatically generated with
3 * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
8 package jalview.schemabinding.version2;
10 //---------------------------------/
11 //- Imported classes and packages -/
12 //---------------------------------/
14 import org.exolab.castor.xml.Marshaller;
15 import org.exolab.castor.xml.Unmarshaller;
20 * @version $Revision$ $Date$
22 public class JGroup implements java.io.Serializable {
25 //--------------------------/
26 //- Class/Member Variables -/
27 //--------------------------/
35 * keeps track of state for field: _start
37 private boolean _has_start;
45 * keeps track of state for field: _end
47 private boolean _has_end;
52 private java.lang.String _name;
57 private java.lang.String _colour;
60 * Field _consThreshold.
62 private int _consThreshold;
65 * keeps track of state for field: _consThreshold
67 private boolean _has_consThreshold;
70 * Field _pidThreshold.
72 private int _pidThreshold;
75 * keeps track of state for field: _pidThreshold
77 private boolean _has_pidThreshold;
80 * Field _outlineColour.
82 private int _outlineColour;
85 * keeps track of state for field: _outlineColour
87 private boolean _has_outlineColour;
90 * Field _displayBoxes.
92 private boolean _displayBoxes;
95 * keeps track of state for field: _displayBoxes
97 private boolean _has_displayBoxes;
100 * Field _displayText.
102 private boolean _displayText;
105 * keeps track of state for field: _displayText
107 private boolean _has_displayText;
112 private boolean _colourText;
115 * keeps track of state for field: _colourText
117 private boolean _has_colourText;
122 private int _textCol1;
125 * keeps track of state for field: _textCol1
127 private boolean _has_textCol1;
132 private int _textCol2;
135 * keeps track of state for field: _textCol2
137 private boolean _has_textCol2;
140 * Field _textColThreshold.
142 private int _textColThreshold;
145 * keeps track of state for field: _textColThreshold
147 private boolean _has_textColThreshold;
150 * Field _showUnconserved.
152 private boolean _showUnconserved;
155 * keeps track of state for field: _showUnconserved
157 private boolean _has_showUnconserved;
160 * Field _ignoreGapsinConsensus.
162 private boolean _ignoreGapsinConsensus = true;
165 * keeps track of state for field: _ignoreGapsinConsensus
167 private boolean _has_ignoreGapsinConsensus;
170 * Field _showConsensusHistogram.
172 private boolean _showConsensusHistogram = true;
175 * keeps track of state for field: _showConsensusHistogram
177 private boolean _has_showConsensusHistogram;
180 * Field _showSequenceLogo.
182 private boolean _showSequenceLogo = false;
185 * keeps track of state for field: _showSequenceLogo
187 private boolean _has_showSequenceLogo;
190 * Field _normaliseSequenceLogo.
192 private boolean _normaliseSequenceLogo = false;
195 * keeps track of state for field: _normaliseSequenceLogo
197 private boolean _has_normaliseSequenceLogo;
200 * Optional sequence group ID (only
201 * needs to be unique for this
205 private java.lang.String _id;
210 private java.util.Vector _seqList;
213 * Field _annotationColours.
215 private jalview.schemabinding.version2.AnnotationColours _annotationColours;
224 this._seqList = new java.util.Vector();
236 * @throws java.lang.IndexOutOfBoundsException if the index
237 * given is outside the bounds of the collection
240 final java.lang.String vSeq)
241 throws java.lang.IndexOutOfBoundsException {
242 this._seqList.addElement(vSeq);
250 * @throws java.lang.IndexOutOfBoundsException if the index
251 * given is outside the bounds of the collection
255 final java.lang.String vSeq)
256 throws java.lang.IndexOutOfBoundsException {
257 this._seqList.add(index, vSeq);
262 public void deleteColourText(
264 this._has_colourText= false;
269 public void deleteConsThreshold(
271 this._has_consThreshold= false;
276 public void deleteDisplayBoxes(
278 this._has_displayBoxes= false;
283 public void deleteDisplayText(
285 this._has_displayText= false;
290 public void deleteEnd(
292 this._has_end= false;
297 public void deleteIgnoreGapsinConsensus(
299 this._has_ignoreGapsinConsensus= false;
304 public void deleteNormaliseSequenceLogo(
306 this._has_normaliseSequenceLogo= false;
311 public void deleteOutlineColour(
313 this._has_outlineColour= false;
318 public void deletePidThreshold(
320 this._has_pidThreshold= false;
325 public void deleteShowConsensusHistogram(
327 this._has_showConsensusHistogram= false;
332 public void deleteShowSequenceLogo(
334 this._has_showSequenceLogo= false;
339 public void deleteShowUnconserved(
341 this._has_showUnconserved= false;
346 public void deleteStart(
348 this._has_start= false;
353 public void deleteTextCol1(
355 this._has_textCol1= false;
360 public void deleteTextCol2(
362 this._has_textCol2= false;
367 public void deleteTextColThreshold(
369 this._has_textColThreshold= false;
373 * Method enumerateSeq.
375 * @return an Enumeration over all java.lang.String elements
377 public java.util.Enumeration enumerateSeq(
379 return this._seqList.elements();
383 * Returns the value of field 'annotationColours'.
385 * @return the value of field 'AnnotationColours'.
387 public jalview.schemabinding.version2.AnnotationColours getAnnotationColours(
389 return this._annotationColours;
393 * Returns the value of field 'colour'.
395 * @return the value of field 'Colour'.
397 public java.lang.String getColour(
403 * Returns the value of field 'colourText'.
405 * @return the value of field 'ColourText'.
407 public boolean getColourText(
409 return this._colourText;
413 * Returns the value of field 'consThreshold'.
415 * @return the value of field 'ConsThreshold'.
417 public int getConsThreshold(
419 return this._consThreshold;
423 * Returns the value of field 'displayBoxes'.
425 * @return the value of field 'DisplayBoxes'.
427 public boolean getDisplayBoxes(
429 return this._displayBoxes;
433 * Returns the value of field 'displayText'.
435 * @return the value of field 'DisplayText'.
437 public boolean getDisplayText(
439 return this._displayText;
443 * Returns the value of field 'end'.
445 * @return the value of field 'End'.
453 * Returns the value of field 'id'. The field 'id' has the
454 * following description: Optional sequence group ID (only
455 * needs to be unique for this
459 * @return the value of field 'Id'.
461 public java.lang.String getId(
467 * Returns the value of field 'ignoreGapsinConsensus'.
469 * @return the value of field 'IgnoreGapsinConsensus'.
471 public boolean getIgnoreGapsinConsensus(
473 return this._ignoreGapsinConsensus;
477 * Returns the value of field 'name'.
479 * @return the value of field 'Name'.
481 public java.lang.String getName(
487 * Returns the value of field 'normaliseSequenceLogo'.
489 * @return the value of field 'NormaliseSequenceLogo'.
491 public boolean getNormaliseSequenceLogo(
493 return this._normaliseSequenceLogo;
497 * Returns the value of field 'outlineColour'.
499 * @return the value of field 'OutlineColour'.
501 public int getOutlineColour(
503 return this._outlineColour;
507 * Returns the value of field 'pidThreshold'.
509 * @return the value of field 'PidThreshold'.
511 public int getPidThreshold(
513 return this._pidThreshold;
520 * @throws java.lang.IndexOutOfBoundsException if the index
521 * given is outside the bounds of the collection
522 * @return the value of the java.lang.String at the given index
524 public java.lang.String getSeq(
526 throws java.lang.IndexOutOfBoundsException {
527 // check bounds for index
528 if (index < 0 || index >= this._seqList.size()) {
529 throw new IndexOutOfBoundsException("getSeq: Index value '" + index + "' not in range [0.." + (this._seqList.size() - 1) + "]");
532 return (java.lang.String) _seqList.get(index);
536 * Method getSeq.Returns the contents of the collection in an
537 * Array. <p>Note: Just in case the collection contents are
538 * changing in another thread, we pass a 0-length Array of the
539 * correct type into the API call. This way we <i>know</i>
540 * that the Array returned is of exactly the correct length.
542 * @return this collection as an Array
544 public java.lang.String[] getSeq(
546 java.lang.String[] array = new java.lang.String[0];
547 return (java.lang.String[]) this._seqList.toArray(array);
551 * Method getSeqCount.
553 * @return the size of this collection
555 public int getSeqCount(
557 return this._seqList.size();
561 * Returns the value of field 'showConsensusHistogram'.
563 * @return the value of field 'ShowConsensusHistogram'.
565 public boolean getShowConsensusHistogram(
567 return this._showConsensusHistogram;
571 * Returns the value of field 'showSequenceLogo'.
573 * @return the value of field 'ShowSequenceLogo'.
575 public boolean getShowSequenceLogo(
577 return this._showSequenceLogo;
581 * Returns the value of field 'showUnconserved'.
583 * @return the value of field 'ShowUnconserved'.
585 public boolean getShowUnconserved(
587 return this._showUnconserved;
591 * Returns the value of field 'start'.
593 * @return the value of field 'Start'.
601 * Returns the value of field 'textCol1'.
603 * @return the value of field 'TextCol1'.
605 public int getTextCol1(
607 return this._textCol1;
611 * Returns the value of field 'textCol2'.
613 * @return the value of field 'TextCol2'.
615 public int getTextCol2(
617 return this._textCol2;
621 * Returns the value of field 'textColThreshold'.
623 * @return the value of field 'TextColThreshold'.
625 public int getTextColThreshold(
627 return this._textColThreshold;
631 * Method hasColourText.
633 * @return true if at least one ColourText has been added
635 public boolean hasColourText(
637 return this._has_colourText;
641 * Method hasConsThreshold.
643 * @return true if at least one ConsThreshold has been added
645 public boolean hasConsThreshold(
647 return this._has_consThreshold;
651 * Method hasDisplayBoxes.
653 * @return true if at least one DisplayBoxes has been added
655 public boolean hasDisplayBoxes(
657 return this._has_displayBoxes;
661 * Method hasDisplayText.
663 * @return true if at least one DisplayText has been added
665 public boolean hasDisplayText(
667 return this._has_displayText;
673 * @return true if at least one End has been added
675 public boolean hasEnd(
677 return this._has_end;
681 * Method hasIgnoreGapsinConsensus.
683 * @return true if at least one IgnoreGapsinConsensus has been
686 public boolean hasIgnoreGapsinConsensus(
688 return this._has_ignoreGapsinConsensus;
692 * Method hasNormaliseSequenceLogo.
694 * @return true if at least one NormaliseSequenceLogo has been
697 public boolean hasNormaliseSequenceLogo(
699 return this._has_normaliseSequenceLogo;
703 * Method hasOutlineColour.
705 * @return true if at least one OutlineColour has been added
707 public boolean hasOutlineColour(
709 return this._has_outlineColour;
713 * Method hasPidThreshold.
715 * @return true if at least one PidThreshold has been added
717 public boolean hasPidThreshold(
719 return this._has_pidThreshold;
723 * Method hasShowConsensusHistogram.
725 * @return true if at least one ShowConsensusHistogram has been
728 public boolean hasShowConsensusHistogram(
730 return this._has_showConsensusHistogram;
734 * Method hasShowSequenceLogo.
736 * @return true if at least one ShowSequenceLogo has been added
738 public boolean hasShowSequenceLogo(
740 return this._has_showSequenceLogo;
744 * Method hasShowUnconserved.
746 * @return true if at least one ShowUnconserved has been added
748 public boolean hasShowUnconserved(
750 return this._has_showUnconserved;
756 * @return true if at least one Start has been added
758 public boolean hasStart(
760 return this._has_start;
764 * Method hasTextCol1.
766 * @return true if at least one TextCol1 has been added
768 public boolean hasTextCol1(
770 return this._has_textCol1;
774 * Method hasTextCol2.
776 * @return true if at least one TextCol2 has been added
778 public boolean hasTextCol2(
780 return this._has_textCol2;
784 * Method hasTextColThreshold.
786 * @return true if at least one TextColThreshold has been added
788 public boolean hasTextColThreshold(
790 return this._has_textColThreshold;
794 * Returns the value of field 'colourText'.
796 * @return the value of field 'ColourText'.
798 public boolean isColourText(
800 return this._colourText;
804 * Returns the value of field 'displayBoxes'.
806 * @return the value of field 'DisplayBoxes'.
808 public boolean isDisplayBoxes(
810 return this._displayBoxes;
814 * Returns the value of field 'displayText'.
816 * @return the value of field 'DisplayText'.
818 public boolean isDisplayText(
820 return this._displayText;
824 * Returns the value of field 'ignoreGapsinConsensus'.
826 * @return the value of field 'IgnoreGapsinConsensus'.
828 public boolean isIgnoreGapsinConsensus(
830 return this._ignoreGapsinConsensus;
834 * Returns the value of field 'normaliseSequenceLogo'.
836 * @return the value of field 'NormaliseSequenceLogo'.
838 public boolean isNormaliseSequenceLogo(
840 return this._normaliseSequenceLogo;
844 * Returns the value of field 'showConsensusHistogram'.
846 * @return the value of field 'ShowConsensusHistogram'.
848 public boolean isShowConsensusHistogram(
850 return this._showConsensusHistogram;
854 * Returns the value of field 'showSequenceLogo'.
856 * @return the value of field 'ShowSequenceLogo'.
858 public boolean isShowSequenceLogo(
860 return this._showSequenceLogo;
864 * Returns the value of field 'showUnconserved'.
866 * @return the value of field 'ShowUnconserved'.
868 public boolean isShowUnconserved(
870 return this._showUnconserved;
876 * @return true if this object is valid according to the schema
878 public boolean isValid(
882 } catch (org.exolab.castor.xml.ValidationException vex) {
892 * @throws org.exolab.castor.xml.MarshalException if object is
893 * null or if any SAXException is thrown during marshaling
894 * @throws org.exolab.castor.xml.ValidationException if this
895 * object is an invalid instance according to the schema
898 final java.io.Writer out)
899 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
900 Marshaller.marshal(this, out);
907 * @throws java.io.IOException if an IOException occurs during
909 * @throws org.exolab.castor.xml.ValidationException if this
910 * object is an invalid instance according to the schema
911 * @throws org.exolab.castor.xml.MarshalException if object is
912 * null or if any SAXException is thrown during marshaling
915 final org.xml.sax.ContentHandler handler)
916 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
917 Marshaller.marshal(this, handler);
922 public void removeAllSeq(
924 this._seqList.clear();
931 * @return true if the object was removed from the collection.
933 public boolean removeSeq(
934 final java.lang.String vSeq) {
935 boolean removed = _seqList.remove(vSeq);
940 * Method removeSeqAt.
943 * @return the element removed from the collection
945 public java.lang.String removeSeqAt(
947 java.lang.Object obj = this._seqList.remove(index);
948 return (java.lang.String) obj;
952 * Sets the value of field 'annotationColours'.
954 * @param annotationColours the value of field
955 * 'annotationColours'.
957 public void setAnnotationColours(
958 final jalview.schemabinding.version2.AnnotationColours annotationColours) {
959 this._annotationColours = annotationColours;
963 * Sets the value of field 'colour'.
965 * @param colour the value of field 'colour'.
967 public void setColour(
968 final java.lang.String colour) {
969 this._colour = colour;
973 * Sets the value of field 'colourText'.
975 * @param colourText the value of field 'colourText'.
977 public void setColourText(
978 final boolean colourText) {
979 this._colourText = colourText;
980 this._has_colourText = true;
984 * Sets the value of field 'consThreshold'.
986 * @param consThreshold the value of field 'consThreshold'.
988 public void setConsThreshold(
989 final int consThreshold) {
990 this._consThreshold = consThreshold;
991 this._has_consThreshold = true;
995 * Sets the value of field 'displayBoxes'.
997 * @param displayBoxes the value of field 'displayBoxes'.
999 public void setDisplayBoxes(
1000 final boolean displayBoxes) {
1001 this._displayBoxes = displayBoxes;
1002 this._has_displayBoxes = true;
1006 * Sets the value of field 'displayText'.
1008 * @param displayText the value of field 'displayText'.
1010 public void setDisplayText(
1011 final boolean displayText) {
1012 this._displayText = displayText;
1013 this._has_displayText = true;
1017 * Sets the value of field 'end'.
1019 * @param end the value of field 'end'.
1024 this._has_end = true;
1028 * Sets the value of field 'id'. The field 'id' has the
1029 * following description: Optional sequence group ID (only
1030 * needs to be unique for this
1034 * @param id the value of field 'id'.
1037 final java.lang.String id) {
1042 * Sets the value of field 'ignoreGapsinConsensus'.
1044 * @param ignoreGapsinConsensus the value of field
1045 * 'ignoreGapsinConsensus'.
1047 public void setIgnoreGapsinConsensus(
1048 final boolean ignoreGapsinConsensus) {
1049 this._ignoreGapsinConsensus = ignoreGapsinConsensus;
1050 this._has_ignoreGapsinConsensus = true;
1054 * Sets the value of field 'name'.
1056 * @param name the value of field 'name'.
1058 public void setName(
1059 final java.lang.String name) {
1064 * Sets the value of field 'normaliseSequenceLogo'.
1066 * @param normaliseSequenceLogo the value of field
1067 * 'normaliseSequenceLogo'.
1069 public void setNormaliseSequenceLogo(
1070 final boolean normaliseSequenceLogo) {
1071 this._normaliseSequenceLogo = normaliseSequenceLogo;
1072 this._has_normaliseSequenceLogo = true;
1076 * Sets the value of field 'outlineColour'.
1078 * @param outlineColour the value of field 'outlineColour'.
1080 public void setOutlineColour(
1081 final int outlineColour) {
1082 this._outlineColour = outlineColour;
1083 this._has_outlineColour = true;
1087 * Sets the value of field 'pidThreshold'.
1089 * @param pidThreshold the value of field 'pidThreshold'.
1091 public void setPidThreshold(
1092 final int pidThreshold) {
1093 this._pidThreshold = pidThreshold;
1094 this._has_pidThreshold = true;
1102 * @throws java.lang.IndexOutOfBoundsException if the index
1103 * given is outside the bounds of the collection
1107 final java.lang.String vSeq)
1108 throws java.lang.IndexOutOfBoundsException {
1109 // check bounds for index
1110 if (index < 0 || index >= this._seqList.size()) {
1111 throw new IndexOutOfBoundsException("setSeq: Index value '" + index + "' not in range [0.." + (this._seqList.size() - 1) + "]");
1114 this._seqList.set(index, vSeq);
1123 final java.lang.String[] vSeqArray) {
1127 for (int i = 0; i < vSeqArray.length; i++) {
1128 this._seqList.add(vSeqArray[i]);
1133 * Sets the value of field 'showConsensusHistogram'.
1135 * @param showConsensusHistogram the value of field
1136 * 'showConsensusHistogram'.
1138 public void setShowConsensusHistogram(
1139 final boolean showConsensusHistogram) {
1140 this._showConsensusHistogram = showConsensusHistogram;
1141 this._has_showConsensusHistogram = true;
1145 * Sets the value of field 'showSequenceLogo'.
1147 * @param showSequenceLogo the value of field 'showSequenceLogo'
1149 public void setShowSequenceLogo(
1150 final boolean showSequenceLogo) {
1151 this._showSequenceLogo = showSequenceLogo;
1152 this._has_showSequenceLogo = true;
1156 * Sets the value of field 'showUnconserved'.
1158 * @param showUnconserved the value of field 'showUnconserved'.
1160 public void setShowUnconserved(
1161 final boolean showUnconserved) {
1162 this._showUnconserved = showUnconserved;
1163 this._has_showUnconserved = true;
1167 * Sets the value of field 'start'.
1169 * @param start the value of field 'start'.
1171 public void setStart(
1173 this._start = start;
1174 this._has_start = true;
1178 * Sets the value of field 'textCol1'.
1180 * @param textCol1 the value of field 'textCol1'.
1182 public void setTextCol1(
1183 final int textCol1) {
1184 this._textCol1 = textCol1;
1185 this._has_textCol1 = true;
1189 * Sets the value of field 'textCol2'.
1191 * @param textCol2 the value of field 'textCol2'.
1193 public void setTextCol2(
1194 final int textCol2) {
1195 this._textCol2 = textCol2;
1196 this._has_textCol2 = true;
1200 * Sets the value of field 'textColThreshold'.
1202 * @param textColThreshold the value of field 'textColThreshold'
1204 public void setTextColThreshold(
1205 final int textColThreshold) {
1206 this._textColThreshold = textColThreshold;
1207 this._has_textColThreshold = true;
1214 * @throws org.exolab.castor.xml.MarshalException if object is
1215 * null or if any SAXException is thrown during marshaling
1216 * @throws org.exolab.castor.xml.ValidationException if this
1217 * object is an invalid instance according to the schema
1218 * @return the unmarshaled jalview.schemabinding.version2.JGroup
1220 public static jalview.schemabinding.version2.JGroup unmarshal(
1221 final java.io.Reader reader)
1222 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
1223 return (jalview.schemabinding.version2.JGroup) Unmarshaller.unmarshal(jalview.schemabinding.version2.JGroup.class, reader);
1229 * @throws org.exolab.castor.xml.ValidationException if this
1230 * object is an invalid instance according to the schema
1232 public void validate(
1234 throws org.exolab.castor.xml.ValidationException {
1235 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
1236 validator.validate(this);