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
206 private java.lang.String _id;
211 private java.util.Vector _seqList;
214 * Field _annotationColours.
216 private jalview.schemabinding.version2.AnnotationColours _annotationColours;
225 this._seqList = new java.util.Vector();
237 * @throws java.lang.IndexOutOfBoundsException if the index
238 * given is outside the bounds of the collection
241 final java.lang.String vSeq)
242 throws java.lang.IndexOutOfBoundsException {
243 this._seqList.addElement(vSeq);
251 * @throws java.lang.IndexOutOfBoundsException if the index
252 * given is outside the bounds of the collection
256 final java.lang.String vSeq)
257 throws java.lang.IndexOutOfBoundsException {
258 this._seqList.add(index, vSeq);
263 public void deleteColourText(
265 this._has_colourText= false;
270 public void deleteConsThreshold(
272 this._has_consThreshold= false;
277 public void deleteDisplayBoxes(
279 this._has_displayBoxes= false;
284 public void deleteDisplayText(
286 this._has_displayText= false;
291 public void deleteEnd(
293 this._has_end= false;
298 public void deleteIgnoreGapsinConsensus(
300 this._has_ignoreGapsinConsensus= false;
305 public void deleteNormaliseSequenceLogo(
307 this._has_normaliseSequenceLogo= false;
312 public void deleteOutlineColour(
314 this._has_outlineColour= false;
319 public void deletePidThreshold(
321 this._has_pidThreshold= false;
326 public void deleteShowConsensusHistogram(
328 this._has_showConsensusHistogram= false;
333 public void deleteShowSequenceLogo(
335 this._has_showSequenceLogo= false;
340 public void deleteShowUnconserved(
342 this._has_showUnconserved= false;
347 public void deleteStart(
349 this._has_start= false;
354 public void deleteTextCol1(
356 this._has_textCol1= false;
361 public void deleteTextCol2(
363 this._has_textCol2= false;
368 public void deleteTextColThreshold(
370 this._has_textColThreshold= false;
374 * Method enumerateSeq.
376 * @return an Enumeration over all java.lang.String elements
378 public java.util.Enumeration enumerateSeq(
380 return this._seqList.elements();
384 * Returns the value of field 'annotationColours'.
386 * @return the value of field 'AnnotationColours'.
388 public jalview.schemabinding.version2.AnnotationColours getAnnotationColours(
390 return this._annotationColours;
394 * Returns the value of field 'colour'.
396 * @return the value of field 'Colour'.
398 public java.lang.String getColour(
404 * Returns the value of field 'colourText'.
406 * @return the value of field 'ColourText'.
408 public boolean getColourText(
410 return this._colourText;
414 * Returns the value of field 'consThreshold'.
416 * @return the value of field 'ConsThreshold'.
418 public int getConsThreshold(
420 return this._consThreshold;
424 * Returns the value of field 'displayBoxes'.
426 * @return the value of field 'DisplayBoxes'.
428 public boolean getDisplayBoxes(
430 return this._displayBoxes;
434 * Returns the value of field 'displayText'.
436 * @return the value of field 'DisplayText'.
438 public boolean getDisplayText(
440 return this._displayText;
444 * Returns the value of field 'end'.
446 * @return the value of field 'End'.
454 * Returns the value of field 'id'. The field 'id' has the
455 * following description: Optional sequence group ID (only
461 * @return the value of field 'Id'.
463 public java.lang.String getId(
469 * Returns the value of field 'ignoreGapsinConsensus'.
471 * @return the value of field 'IgnoreGapsinConsensus'.
473 public boolean getIgnoreGapsinConsensus(
475 return this._ignoreGapsinConsensus;
479 * Returns the value of field 'name'.
481 * @return the value of field 'Name'.
483 public java.lang.String getName(
489 * Returns the value of field 'normaliseSequenceLogo'.
491 * @return the value of field 'NormaliseSequenceLogo'.
493 public boolean getNormaliseSequenceLogo(
495 return this._normaliseSequenceLogo;
499 * Returns the value of field 'outlineColour'.
501 * @return the value of field 'OutlineColour'.
503 public int getOutlineColour(
505 return this._outlineColour;
509 * Returns the value of field 'pidThreshold'.
511 * @return the value of field 'PidThreshold'.
513 public int getPidThreshold(
515 return this._pidThreshold;
522 * @throws java.lang.IndexOutOfBoundsException if the index
523 * given is outside the bounds of the collection
524 * @return the value of the java.lang.String at the given index
526 public java.lang.String getSeq(
528 throws java.lang.IndexOutOfBoundsException {
529 // check bounds for index
530 if (index < 0 || index >= this._seqList.size()) {
531 throw new IndexOutOfBoundsException("getSeq: Index value '" + index + "' not in range [0.." + (this._seqList.size() - 1) + "]");
534 return (java.lang.String) _seqList.get(index);
538 * Method getSeq.Returns the contents of the collection in an
539 * Array. <p>Note: Just in case the collection contents are
540 * changing in another thread, we pass a 0-length Array of the
541 * correct type into the API call. This way we <i>know</i>
542 * that the Array returned is of exactly the correct length.
544 * @return this collection as an Array
546 public java.lang.String[] getSeq(
548 java.lang.String[] array = new java.lang.String[0];
549 return (java.lang.String[]) this._seqList.toArray(array);
553 * Method getSeqCount.
555 * @return the size of this collection
557 public int getSeqCount(
559 return this._seqList.size();
563 * Returns the value of field 'showConsensusHistogram'.
565 * @return the value of field 'ShowConsensusHistogram'.
567 public boolean getShowConsensusHistogram(
569 return this._showConsensusHistogram;
573 * Returns the value of field 'showSequenceLogo'.
575 * @return the value of field 'ShowSequenceLogo'.
577 public boolean getShowSequenceLogo(
579 return this._showSequenceLogo;
583 * Returns the value of field 'showUnconserved'.
585 * @return the value of field 'ShowUnconserved'.
587 public boolean getShowUnconserved(
589 return this._showUnconserved;
593 * Returns the value of field 'start'.
595 * @return the value of field 'Start'.
603 * Returns the value of field 'textCol1'.
605 * @return the value of field 'TextCol1'.
607 public int getTextCol1(
609 return this._textCol1;
613 * Returns the value of field 'textCol2'.
615 * @return the value of field 'TextCol2'.
617 public int getTextCol2(
619 return this._textCol2;
623 * Returns the value of field 'textColThreshold'.
625 * @return the value of field 'TextColThreshold'.
627 public int getTextColThreshold(
629 return this._textColThreshold;
633 * Method hasColourText.
635 * @return true if at least one ColourText has been added
637 public boolean hasColourText(
639 return this._has_colourText;
643 * Method hasConsThreshold.
645 * @return true if at least one ConsThreshold has been added
647 public boolean hasConsThreshold(
649 return this._has_consThreshold;
653 * Method hasDisplayBoxes.
655 * @return true if at least one DisplayBoxes has been added
657 public boolean hasDisplayBoxes(
659 return this._has_displayBoxes;
663 * Method hasDisplayText.
665 * @return true if at least one DisplayText has been added
667 public boolean hasDisplayText(
669 return this._has_displayText;
675 * @return true if at least one End has been added
677 public boolean hasEnd(
679 return this._has_end;
683 * Method hasIgnoreGapsinConsensus.
685 * @return true if at least one IgnoreGapsinConsensus has been
688 public boolean hasIgnoreGapsinConsensus(
690 return this._has_ignoreGapsinConsensus;
694 * Method hasNormaliseSequenceLogo.
696 * @return true if at least one NormaliseSequenceLogo has been
699 public boolean hasNormaliseSequenceLogo(
701 return this._has_normaliseSequenceLogo;
705 * Method hasOutlineColour.
707 * @return true if at least one OutlineColour has been added
709 public boolean hasOutlineColour(
711 return this._has_outlineColour;
715 * Method hasPidThreshold.
717 * @return true if at least one PidThreshold has been added
719 public boolean hasPidThreshold(
721 return this._has_pidThreshold;
725 * Method hasShowConsensusHistogram.
727 * @return true if at least one ShowConsensusHistogram has been
730 public boolean hasShowConsensusHistogram(
732 return this._has_showConsensusHistogram;
736 * Method hasShowSequenceLogo.
738 * @return true if at least one ShowSequenceLogo has been added
740 public boolean hasShowSequenceLogo(
742 return this._has_showSequenceLogo;
746 * Method hasShowUnconserved.
748 * @return true if at least one ShowUnconserved has been added
750 public boolean hasShowUnconserved(
752 return this._has_showUnconserved;
758 * @return true if at least one Start has been added
760 public boolean hasStart(
762 return this._has_start;
766 * Method hasTextCol1.
768 * @return true if at least one TextCol1 has been added
770 public boolean hasTextCol1(
772 return this._has_textCol1;
776 * Method hasTextCol2.
778 * @return true if at least one TextCol2 has been added
780 public boolean hasTextCol2(
782 return this._has_textCol2;
786 * Method hasTextColThreshold.
788 * @return true if at least one TextColThreshold has been added
790 public boolean hasTextColThreshold(
792 return this._has_textColThreshold;
796 * Returns the value of field 'colourText'.
798 * @return the value of field 'ColourText'.
800 public boolean isColourText(
802 return this._colourText;
806 * Returns the value of field 'displayBoxes'.
808 * @return the value of field 'DisplayBoxes'.
810 public boolean isDisplayBoxes(
812 return this._displayBoxes;
816 * Returns the value of field 'displayText'.
818 * @return the value of field 'DisplayText'.
820 public boolean isDisplayText(
822 return this._displayText;
826 * Returns the value of field 'ignoreGapsinConsensus'.
828 * @return the value of field 'IgnoreGapsinConsensus'.
830 public boolean isIgnoreGapsinConsensus(
832 return this._ignoreGapsinConsensus;
836 * Returns the value of field 'normaliseSequenceLogo'.
838 * @return the value of field 'NormaliseSequenceLogo'.
840 public boolean isNormaliseSequenceLogo(
842 return this._normaliseSequenceLogo;
846 * Returns the value of field 'showConsensusHistogram'.
848 * @return the value of field 'ShowConsensusHistogram'.
850 public boolean isShowConsensusHistogram(
852 return this._showConsensusHistogram;
856 * Returns the value of field 'showSequenceLogo'.
858 * @return the value of field 'ShowSequenceLogo'.
860 public boolean isShowSequenceLogo(
862 return this._showSequenceLogo;
866 * Returns the value of field 'showUnconserved'.
868 * @return the value of field 'ShowUnconserved'.
870 public boolean isShowUnconserved(
872 return this._showUnconserved;
878 * @return true if this object is valid according to the schema
880 public boolean isValid(
884 } catch (org.exolab.castor.xml.ValidationException vex) {
894 * @throws org.exolab.castor.xml.MarshalException if object is
895 * null or if any SAXException is thrown during marshaling
896 * @throws org.exolab.castor.xml.ValidationException if this
897 * object is an invalid instance according to the schema
900 final java.io.Writer out)
901 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
902 Marshaller.marshal(this, out);
909 * @throws java.io.IOException if an IOException occurs during
911 * @throws org.exolab.castor.xml.ValidationException if this
912 * object is an invalid instance according to the schema
913 * @throws org.exolab.castor.xml.MarshalException if object is
914 * null or if any SAXException is thrown during marshaling
917 final org.xml.sax.ContentHandler handler)
918 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
919 Marshaller.marshal(this, handler);
924 public void removeAllSeq(
926 this._seqList.clear();
933 * @return true if the object was removed from the collection.
935 public boolean removeSeq(
936 final java.lang.String vSeq) {
937 boolean removed = _seqList.remove(vSeq);
942 * Method removeSeqAt.
945 * @return the element removed from the collection
947 public java.lang.String removeSeqAt(
949 java.lang.Object obj = this._seqList.remove(index);
950 return (java.lang.String) obj;
954 * Sets the value of field 'annotationColours'.
956 * @param annotationColours the value of field
957 * 'annotationColours'.
959 public void setAnnotationColours(
960 final jalview.schemabinding.version2.AnnotationColours annotationColours) {
961 this._annotationColours = annotationColours;
965 * Sets the value of field 'colour'.
967 * @param colour the value of field 'colour'.
969 public void setColour(
970 final java.lang.String colour) {
971 this._colour = colour;
975 * Sets the value of field 'colourText'.
977 * @param colourText the value of field 'colourText'.
979 public void setColourText(
980 final boolean colourText) {
981 this._colourText = colourText;
982 this._has_colourText = true;
986 * Sets the value of field 'consThreshold'.
988 * @param consThreshold the value of field 'consThreshold'.
990 public void setConsThreshold(
991 final int consThreshold) {
992 this._consThreshold = consThreshold;
993 this._has_consThreshold = true;
997 * Sets the value of field 'displayBoxes'.
999 * @param displayBoxes the value of field 'displayBoxes'.
1001 public void setDisplayBoxes(
1002 final boolean displayBoxes) {
1003 this._displayBoxes = displayBoxes;
1004 this._has_displayBoxes = true;
1008 * Sets the value of field 'displayText'.
1010 * @param displayText the value of field 'displayText'.
1012 public void setDisplayText(
1013 final boolean displayText) {
1014 this._displayText = displayText;
1015 this._has_displayText = true;
1019 * Sets the value of field 'end'.
1021 * @param end the value of field 'end'.
1026 this._has_end = true;
1030 * Sets the value of field 'id'. The field 'id' has the
1031 * following description: Optional sequence group ID (only
1037 * @param id the value of field 'id'.
1040 final java.lang.String id) {
1045 * Sets the value of field 'ignoreGapsinConsensus'.
1047 * @param ignoreGapsinConsensus the value of field
1048 * 'ignoreGapsinConsensus'.
1050 public void setIgnoreGapsinConsensus(
1051 final boolean ignoreGapsinConsensus) {
1052 this._ignoreGapsinConsensus = ignoreGapsinConsensus;
1053 this._has_ignoreGapsinConsensus = true;
1057 * Sets the value of field 'name'.
1059 * @param name the value of field 'name'.
1061 public void setName(
1062 final java.lang.String name) {
1067 * Sets the value of field 'normaliseSequenceLogo'.
1069 * @param normaliseSequenceLogo the value of field
1070 * 'normaliseSequenceLogo'.
1072 public void setNormaliseSequenceLogo(
1073 final boolean normaliseSequenceLogo) {
1074 this._normaliseSequenceLogo = normaliseSequenceLogo;
1075 this._has_normaliseSequenceLogo = true;
1079 * Sets the value of field 'outlineColour'.
1081 * @param outlineColour the value of field 'outlineColour'.
1083 public void setOutlineColour(
1084 final int outlineColour) {
1085 this._outlineColour = outlineColour;
1086 this._has_outlineColour = true;
1090 * Sets the value of field 'pidThreshold'.
1092 * @param pidThreshold the value of field 'pidThreshold'.
1094 public void setPidThreshold(
1095 final int pidThreshold) {
1096 this._pidThreshold = pidThreshold;
1097 this._has_pidThreshold = true;
1105 * @throws java.lang.IndexOutOfBoundsException if the index
1106 * given is outside the bounds of the collection
1110 final java.lang.String vSeq)
1111 throws java.lang.IndexOutOfBoundsException {
1112 // check bounds for index
1113 if (index < 0 || index >= this._seqList.size()) {
1114 throw new IndexOutOfBoundsException("setSeq: Index value '" + index + "' not in range [0.." + (this._seqList.size() - 1) + "]");
1117 this._seqList.set(index, vSeq);
1126 final java.lang.String[] vSeqArray) {
1130 for (int i = 0; i < vSeqArray.length; i++) {
1131 this._seqList.add(vSeqArray[i]);
1136 * Sets the value of field 'showConsensusHistogram'.
1138 * @param showConsensusHistogram the value of field
1139 * 'showConsensusHistogram'.
1141 public void setShowConsensusHistogram(
1142 final boolean showConsensusHistogram) {
1143 this._showConsensusHistogram = showConsensusHistogram;
1144 this._has_showConsensusHistogram = true;
1148 * Sets the value of field 'showSequenceLogo'.
1150 * @param showSequenceLogo the value of field 'showSequenceLogo'
1152 public void setShowSequenceLogo(
1153 final boolean showSequenceLogo) {
1154 this._showSequenceLogo = showSequenceLogo;
1155 this._has_showSequenceLogo = true;
1159 * Sets the value of field 'showUnconserved'.
1161 * @param showUnconserved the value of field 'showUnconserved'.
1163 public void setShowUnconserved(
1164 final boolean showUnconserved) {
1165 this._showUnconserved = showUnconserved;
1166 this._has_showUnconserved = true;
1170 * Sets the value of field 'start'.
1172 * @param start the value of field 'start'.
1174 public void setStart(
1176 this._start = start;
1177 this._has_start = true;
1181 * Sets the value of field 'textCol1'.
1183 * @param textCol1 the value of field 'textCol1'.
1185 public void setTextCol1(
1186 final int textCol1) {
1187 this._textCol1 = textCol1;
1188 this._has_textCol1 = true;
1192 * Sets the value of field 'textCol2'.
1194 * @param textCol2 the value of field 'textCol2'.
1196 public void setTextCol2(
1197 final int textCol2) {
1198 this._textCol2 = textCol2;
1199 this._has_textCol2 = true;
1203 * Sets the value of field 'textColThreshold'.
1205 * @param textColThreshold the value of field 'textColThreshold'
1207 public void setTextColThreshold(
1208 final int textColThreshold) {
1209 this._textColThreshold = textColThreshold;
1210 this._has_textColThreshold = true;
1217 * @throws org.exolab.castor.xml.MarshalException if object is
1218 * null or if any SAXException is thrown during marshaling
1219 * @throws org.exolab.castor.xml.ValidationException if this
1220 * object is an invalid instance according to the schema
1221 * @return the unmarshaled jalview.schemabinding.version2.JGroup
1223 public static jalview.schemabinding.version2.JGroup unmarshal(
1224 final java.io.Reader reader)
1225 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
1226 return (jalview.schemabinding.version2.JGroup) Unmarshaller.unmarshal(jalview.schemabinding.version2.JGroup.class, reader);
1232 * @throws org.exolab.castor.xml.ValidationException if this
1233 * object is an invalid instance according to the schema
1235 public void validate(
1237 throws org.exolab.castor.xml.ValidationException {
1238 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
1239 validator.validate(this);