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;
219 this._seqList = new java.util.Vector();
231 * @throws java.lang.IndexOutOfBoundsException if the index
232 * given is outside the bounds of the collection
235 final java.lang.String vSeq)
236 throws java.lang.IndexOutOfBoundsException {
237 this._seqList.addElement(vSeq);
245 * @throws java.lang.IndexOutOfBoundsException if the index
246 * given is outside the bounds of the collection
250 final java.lang.String vSeq)
251 throws java.lang.IndexOutOfBoundsException {
252 this._seqList.add(index, vSeq);
257 public void deleteColourText(
259 this._has_colourText= false;
264 public void deleteConsThreshold(
266 this._has_consThreshold= false;
271 public void deleteDisplayBoxes(
273 this._has_displayBoxes= false;
278 public void deleteDisplayText(
280 this._has_displayText= false;
285 public void deleteEnd(
287 this._has_end= false;
292 public void deleteIgnoreGapsinConsensus(
294 this._has_ignoreGapsinConsensus= false;
299 public void deleteNormaliseSequenceLogo(
301 this._has_normaliseSequenceLogo= false;
306 public void deleteOutlineColour(
308 this._has_outlineColour= false;
313 public void deletePidThreshold(
315 this._has_pidThreshold= false;
320 public void deleteShowConsensusHistogram(
322 this._has_showConsensusHistogram= false;
327 public void deleteShowSequenceLogo(
329 this._has_showSequenceLogo= false;
334 public void deleteShowUnconserved(
336 this._has_showUnconserved= false;
341 public void deleteStart(
343 this._has_start= false;
348 public void deleteTextCol1(
350 this._has_textCol1= false;
355 public void deleteTextCol2(
357 this._has_textCol2= false;
362 public void deleteTextColThreshold(
364 this._has_textColThreshold= false;
368 * Method enumerateSeq.
370 * @return an Enumeration over all java.lang.String elements
372 public java.util.Enumeration enumerateSeq(
374 return this._seqList.elements();
378 * Returns the value of field 'colour'.
380 * @return the value of field 'Colour'.
382 public java.lang.String getColour(
388 * Returns the value of field 'colourText'.
390 * @return the value of field 'ColourText'.
392 public boolean getColourText(
394 return this._colourText;
398 * Returns the value of field 'consThreshold'.
400 * @return the value of field 'ConsThreshold'.
402 public int getConsThreshold(
404 return this._consThreshold;
408 * Returns the value of field 'displayBoxes'.
410 * @return the value of field 'DisplayBoxes'.
412 public boolean getDisplayBoxes(
414 return this._displayBoxes;
418 * Returns the value of field 'displayText'.
420 * @return the value of field 'DisplayText'.
422 public boolean getDisplayText(
424 return this._displayText;
428 * Returns the value of field 'end'.
430 * @return the value of field 'End'.
438 * Returns the value of field 'id'. The field 'id' has the
439 * following description: Optional sequence group ID (only
440 * needs to be unique for this
444 * @return the value of field 'Id'.
446 public java.lang.String getId(
452 * Returns the value of field 'ignoreGapsinConsensus'.
454 * @return the value of field 'IgnoreGapsinConsensus'.
456 public boolean getIgnoreGapsinConsensus(
458 return this._ignoreGapsinConsensus;
462 * Returns the value of field 'name'.
464 * @return the value of field 'Name'.
466 public java.lang.String getName(
472 * Returns the value of field 'normaliseSequenceLogo'.
474 * @return the value of field 'NormaliseSequenceLogo'.
476 public boolean getNormaliseSequenceLogo(
478 return this._normaliseSequenceLogo;
482 * Returns the value of field 'outlineColour'.
484 * @return the value of field 'OutlineColour'.
486 public int getOutlineColour(
488 return this._outlineColour;
492 * Returns the value of field 'pidThreshold'.
494 * @return the value of field 'PidThreshold'.
496 public int getPidThreshold(
498 return this._pidThreshold;
505 * @throws java.lang.IndexOutOfBoundsException if the index
506 * given is outside the bounds of the collection
507 * @return the value of the java.lang.String at the given index
509 public java.lang.String getSeq(
511 throws java.lang.IndexOutOfBoundsException {
512 // check bounds for index
513 if (index < 0 || index >= this._seqList.size()) {
514 throw new IndexOutOfBoundsException("getSeq: Index value '" + index + "' not in range [0.." + (this._seqList.size() - 1) + "]");
517 return (java.lang.String) _seqList.get(index);
521 * Method getSeq.Returns the contents of the collection in an
522 * Array. <p>Note: Just in case the collection contents are
523 * changing in another thread, we pass a 0-length Array of the
524 * correct type into the API call. This way we <i>know</i>
525 * that the Array returned is of exactly the correct length.
527 * @return this collection as an Array
529 public java.lang.String[] getSeq(
531 java.lang.String[] array = new java.lang.String[0];
532 return (java.lang.String[]) this._seqList.toArray(array);
536 * Method getSeqCount.
538 * @return the size of this collection
540 public int getSeqCount(
542 return this._seqList.size();
546 * Returns the value of field 'showConsensusHistogram'.
548 * @return the value of field 'ShowConsensusHistogram'.
550 public boolean getShowConsensusHistogram(
552 return this._showConsensusHistogram;
556 * Returns the value of field 'showSequenceLogo'.
558 * @return the value of field 'ShowSequenceLogo'.
560 public boolean getShowSequenceLogo(
562 return this._showSequenceLogo;
566 * Returns the value of field 'showUnconserved'.
568 * @return the value of field 'ShowUnconserved'.
570 public boolean getShowUnconserved(
572 return this._showUnconserved;
576 * Returns the value of field 'start'.
578 * @return the value of field 'Start'.
586 * Returns the value of field 'textCol1'.
588 * @return the value of field 'TextCol1'.
590 public int getTextCol1(
592 return this._textCol1;
596 * Returns the value of field 'textCol2'.
598 * @return the value of field 'TextCol2'.
600 public int getTextCol2(
602 return this._textCol2;
606 * Returns the value of field 'textColThreshold'.
608 * @return the value of field 'TextColThreshold'.
610 public int getTextColThreshold(
612 return this._textColThreshold;
616 * Method hasColourText.
618 * @return true if at least one ColourText has been added
620 public boolean hasColourText(
622 return this._has_colourText;
626 * Method hasConsThreshold.
628 * @return true if at least one ConsThreshold has been added
630 public boolean hasConsThreshold(
632 return this._has_consThreshold;
636 * Method hasDisplayBoxes.
638 * @return true if at least one DisplayBoxes has been added
640 public boolean hasDisplayBoxes(
642 return this._has_displayBoxes;
646 * Method hasDisplayText.
648 * @return true if at least one DisplayText has been added
650 public boolean hasDisplayText(
652 return this._has_displayText;
658 * @return true if at least one End has been added
660 public boolean hasEnd(
662 return this._has_end;
666 * Method hasIgnoreGapsinConsensus.
668 * @return true if at least one IgnoreGapsinConsensus has been
671 public boolean hasIgnoreGapsinConsensus(
673 return this._has_ignoreGapsinConsensus;
677 * Method hasNormaliseSequenceLogo.
679 * @return true if at least one NormaliseSequenceLogo has been
682 public boolean hasNormaliseSequenceLogo(
684 return this._has_normaliseSequenceLogo;
688 * Method hasOutlineColour.
690 * @return true if at least one OutlineColour has been added
692 public boolean hasOutlineColour(
694 return this._has_outlineColour;
698 * Method hasPidThreshold.
700 * @return true if at least one PidThreshold has been added
702 public boolean hasPidThreshold(
704 return this._has_pidThreshold;
708 * Method hasShowConsensusHistogram.
710 * @return true if at least one ShowConsensusHistogram has been
713 public boolean hasShowConsensusHistogram(
715 return this._has_showConsensusHistogram;
719 * Method hasShowSequenceLogo.
721 * @return true if at least one ShowSequenceLogo has been added
723 public boolean hasShowSequenceLogo(
725 return this._has_showSequenceLogo;
729 * Method hasShowUnconserved.
731 * @return true if at least one ShowUnconserved has been added
733 public boolean hasShowUnconserved(
735 return this._has_showUnconserved;
741 * @return true if at least one Start has been added
743 public boolean hasStart(
745 return this._has_start;
749 * Method hasTextCol1.
751 * @return true if at least one TextCol1 has been added
753 public boolean hasTextCol1(
755 return this._has_textCol1;
759 * Method hasTextCol2.
761 * @return true if at least one TextCol2 has been added
763 public boolean hasTextCol2(
765 return this._has_textCol2;
769 * Method hasTextColThreshold.
771 * @return true if at least one TextColThreshold has been added
773 public boolean hasTextColThreshold(
775 return this._has_textColThreshold;
779 * Returns the value of field 'colourText'.
781 * @return the value of field 'ColourText'.
783 public boolean isColourText(
785 return this._colourText;
789 * Returns the value of field 'displayBoxes'.
791 * @return the value of field 'DisplayBoxes'.
793 public boolean isDisplayBoxes(
795 return this._displayBoxes;
799 * Returns the value of field 'displayText'.
801 * @return the value of field 'DisplayText'.
803 public boolean isDisplayText(
805 return this._displayText;
809 * Returns the value of field 'ignoreGapsinConsensus'.
811 * @return the value of field 'IgnoreGapsinConsensus'.
813 public boolean isIgnoreGapsinConsensus(
815 return this._ignoreGapsinConsensus;
819 * Returns the value of field 'normaliseSequenceLogo'.
821 * @return the value of field 'NormaliseSequenceLogo'.
823 public boolean isNormaliseSequenceLogo(
825 return this._normaliseSequenceLogo;
829 * Returns the value of field 'showConsensusHistogram'.
831 * @return the value of field 'ShowConsensusHistogram'.
833 public boolean isShowConsensusHistogram(
835 return this._showConsensusHistogram;
839 * Returns the value of field 'showSequenceLogo'.
841 * @return the value of field 'ShowSequenceLogo'.
843 public boolean isShowSequenceLogo(
845 return this._showSequenceLogo;
849 * Returns the value of field 'showUnconserved'.
851 * @return the value of field 'ShowUnconserved'.
853 public boolean isShowUnconserved(
855 return this._showUnconserved;
861 * @return true if this object is valid according to the schema
863 public boolean isValid(
867 } catch (org.exolab.castor.xml.ValidationException vex) {
877 * @throws org.exolab.castor.xml.MarshalException if object is
878 * null or if any SAXException is thrown during marshaling
879 * @throws org.exolab.castor.xml.ValidationException if this
880 * object is an invalid instance according to the schema
883 final java.io.Writer out)
884 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
885 Marshaller.marshal(this, out);
892 * @throws java.io.IOException if an IOException occurs during
894 * @throws org.exolab.castor.xml.ValidationException if this
895 * object is an invalid instance according to the schema
896 * @throws org.exolab.castor.xml.MarshalException if object is
897 * null or if any SAXException is thrown during marshaling
900 final org.xml.sax.ContentHandler handler)
901 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
902 Marshaller.marshal(this, handler);
907 public void removeAllSeq(
909 this._seqList.clear();
916 * @return true if the object was removed from the collection.
918 public boolean removeSeq(
919 final java.lang.String vSeq) {
920 boolean removed = _seqList.remove(vSeq);
925 * Method removeSeqAt.
928 * @return the element removed from the collection
930 public java.lang.String removeSeqAt(
932 java.lang.Object obj = this._seqList.remove(index);
933 return (java.lang.String) obj;
937 * Sets the value of field 'colour'.
939 * @param colour the value of field 'colour'.
941 public void setColour(
942 final java.lang.String colour) {
943 this._colour = colour;
947 * Sets the value of field 'colourText'.
949 * @param colourText the value of field 'colourText'.
951 public void setColourText(
952 final boolean colourText) {
953 this._colourText = colourText;
954 this._has_colourText = true;
958 * Sets the value of field 'consThreshold'.
960 * @param consThreshold the value of field 'consThreshold'.
962 public void setConsThreshold(
963 final int consThreshold) {
964 this._consThreshold = consThreshold;
965 this._has_consThreshold = true;
969 * Sets the value of field 'displayBoxes'.
971 * @param displayBoxes the value of field 'displayBoxes'.
973 public void setDisplayBoxes(
974 final boolean displayBoxes) {
975 this._displayBoxes = displayBoxes;
976 this._has_displayBoxes = true;
980 * Sets the value of field 'displayText'.
982 * @param displayText the value of field 'displayText'.
984 public void setDisplayText(
985 final boolean displayText) {
986 this._displayText = displayText;
987 this._has_displayText = true;
991 * Sets the value of field 'end'.
993 * @param end the value of field 'end'.
998 this._has_end = true;
1002 * Sets the value of field 'id'. The field 'id' has the
1003 * following description: Optional sequence group ID (only
1004 * needs to be unique for this
1008 * @param id the value of field 'id'.
1011 final java.lang.String id) {
1016 * Sets the value of field 'ignoreGapsinConsensus'.
1018 * @param ignoreGapsinConsensus the value of field
1019 * 'ignoreGapsinConsensus'.
1021 public void setIgnoreGapsinConsensus(
1022 final boolean ignoreGapsinConsensus) {
1023 this._ignoreGapsinConsensus = ignoreGapsinConsensus;
1024 this._has_ignoreGapsinConsensus = true;
1028 * Sets the value of field 'name'.
1030 * @param name the value of field 'name'.
1032 public void setName(
1033 final java.lang.String name) {
1038 * Sets the value of field 'normaliseSequenceLogo'.
1040 * @param normaliseSequenceLogo the value of field
1041 * 'normaliseSequenceLogo'.
1043 public void setNormaliseSequenceLogo(
1044 final boolean normaliseSequenceLogo) {
1045 this._normaliseSequenceLogo = normaliseSequenceLogo;
1046 this._has_normaliseSequenceLogo = true;
1050 * Sets the value of field 'outlineColour'.
1052 * @param outlineColour the value of field 'outlineColour'.
1054 public void setOutlineColour(
1055 final int outlineColour) {
1056 this._outlineColour = outlineColour;
1057 this._has_outlineColour = true;
1061 * Sets the value of field 'pidThreshold'.
1063 * @param pidThreshold the value of field 'pidThreshold'.
1065 public void setPidThreshold(
1066 final int pidThreshold) {
1067 this._pidThreshold = pidThreshold;
1068 this._has_pidThreshold = true;
1076 * @throws java.lang.IndexOutOfBoundsException if the index
1077 * given is outside the bounds of the collection
1081 final java.lang.String vSeq)
1082 throws java.lang.IndexOutOfBoundsException {
1083 // check bounds for index
1084 if (index < 0 || index >= this._seqList.size()) {
1085 throw new IndexOutOfBoundsException("setSeq: Index value '" + index + "' not in range [0.." + (this._seqList.size() - 1) + "]");
1088 this._seqList.set(index, vSeq);
1097 final java.lang.String[] vSeqArray) {
1101 for (int i = 0; i < vSeqArray.length; i++) {
1102 this._seqList.add(vSeqArray[i]);
1107 * Sets the value of field 'showConsensusHistogram'.
1109 * @param showConsensusHistogram the value of field
1110 * 'showConsensusHistogram'.
1112 public void setShowConsensusHistogram(
1113 final boolean showConsensusHistogram) {
1114 this._showConsensusHistogram = showConsensusHistogram;
1115 this._has_showConsensusHistogram = true;
1119 * Sets the value of field 'showSequenceLogo'.
1121 * @param showSequenceLogo the value of field 'showSequenceLogo'
1123 public void setShowSequenceLogo(
1124 final boolean showSequenceLogo) {
1125 this._showSequenceLogo = showSequenceLogo;
1126 this._has_showSequenceLogo = true;
1130 * Sets the value of field 'showUnconserved'.
1132 * @param showUnconserved the value of field 'showUnconserved'.
1134 public void setShowUnconserved(
1135 final boolean showUnconserved) {
1136 this._showUnconserved = showUnconserved;
1137 this._has_showUnconserved = true;
1141 * Sets the value of field 'start'.
1143 * @param start the value of field 'start'.
1145 public void setStart(
1147 this._start = start;
1148 this._has_start = true;
1152 * Sets the value of field 'textCol1'.
1154 * @param textCol1 the value of field 'textCol1'.
1156 public void setTextCol1(
1157 final int textCol1) {
1158 this._textCol1 = textCol1;
1159 this._has_textCol1 = true;
1163 * Sets the value of field 'textCol2'.
1165 * @param textCol2 the value of field 'textCol2'.
1167 public void setTextCol2(
1168 final int textCol2) {
1169 this._textCol2 = textCol2;
1170 this._has_textCol2 = true;
1174 * Sets the value of field 'textColThreshold'.
1176 * @param textColThreshold the value of field 'textColThreshold'
1178 public void setTextColThreshold(
1179 final int textColThreshold) {
1180 this._textColThreshold = textColThreshold;
1181 this._has_textColThreshold = true;
1188 * @throws org.exolab.castor.xml.MarshalException if object is
1189 * null or if any SAXException is thrown during marshaling
1190 * @throws org.exolab.castor.xml.ValidationException if this
1191 * object is an invalid instance according to the schema
1192 * @return the unmarshaled jalview.schemabinding.version2.JGroup
1194 public static jalview.schemabinding.version2.JGroup unmarshal(
1195 final java.io.Reader reader)
1196 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
1197 return (jalview.schemabinding.version2.JGroup) Unmarshaller.unmarshal(jalview.schemabinding.version2.JGroup.class, reader);
1203 * @throws org.exolab.castor.xml.ValidationException if this
1204 * object is an invalid instance according to the schema
1206 public void validate(
1208 throws org.exolab.castor.xml.ValidationException {
1209 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
1210 validator.validate(this);