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 * Optional sequence group ID (only needs to be unique for this
194 private java.lang.String _id;
199 private java.util.Vector _seqList;
208 this._seqList = new java.util.Vector();
220 * @throws java.lang.IndexOutOfBoundsException if the index
221 * given is outside the bounds of the collection
224 final java.lang.String vSeq)
225 throws java.lang.IndexOutOfBoundsException {
226 this._seqList.addElement(vSeq);
234 * @throws java.lang.IndexOutOfBoundsException if the index
235 * given is outside the bounds of the collection
239 final java.lang.String vSeq)
240 throws java.lang.IndexOutOfBoundsException {
241 this._seqList.add(index, vSeq);
246 public void deleteColourText(
248 this._has_colourText= false;
253 public void deleteConsThreshold(
255 this._has_consThreshold= false;
260 public void deleteDisplayBoxes(
262 this._has_displayBoxes= false;
267 public void deleteDisplayText(
269 this._has_displayText= false;
274 public void deleteEnd(
276 this._has_end= false;
281 public void deleteIgnoreGapsinConsensus(
283 this._has_ignoreGapsinConsensus= false;
288 public void deleteOutlineColour(
290 this._has_outlineColour= false;
295 public void deletePidThreshold(
297 this._has_pidThreshold= false;
302 public void deleteShowConsensusHistogram(
304 this._has_showConsensusHistogram= false;
309 public void deleteShowSequenceLogo(
311 this._has_showSequenceLogo= false;
316 public void deleteShowUnconserved(
318 this._has_showUnconserved= false;
323 public void deleteStart(
325 this._has_start= false;
330 public void deleteTextCol1(
332 this._has_textCol1= false;
337 public void deleteTextCol2(
339 this._has_textCol2= false;
344 public void deleteTextColThreshold(
346 this._has_textColThreshold= false;
350 * Method enumerateSeq.
352 * @return an Enumeration over all java.lang.String elements
354 public java.util.Enumeration enumerateSeq(
356 return this._seqList.elements();
360 * Returns the value of field 'colour'.
362 * @return the value of field 'Colour'.
364 public java.lang.String getColour(
370 * Returns the value of field 'colourText'.
372 * @return the value of field 'ColourText'.
374 public boolean getColourText(
376 return this._colourText;
380 * Returns the value of field 'consThreshold'.
382 * @return the value of field 'ConsThreshold'.
384 public int getConsThreshold(
386 return this._consThreshold;
390 * Returns the value of field 'displayBoxes'.
392 * @return the value of field 'DisplayBoxes'.
394 public boolean getDisplayBoxes(
396 return this._displayBoxes;
400 * Returns the value of field 'displayText'.
402 * @return the value of field 'DisplayText'.
404 public boolean getDisplayText(
406 return this._displayText;
410 * Returns the value of field 'end'.
412 * @return the value of field 'End'.
420 * Returns the value of field 'id'. The field 'id' has the
421 * following description: Optional sequence group ID (only
422 * needs to be unique for this alignment)
425 * @return the value of field 'Id'.
427 public java.lang.String getId(
433 * Returns the value of field 'ignoreGapsinConsensus'.
435 * @return the value of field 'IgnoreGapsinConsensus'.
437 public boolean getIgnoreGapsinConsensus(
439 return this._ignoreGapsinConsensus;
443 * Returns the value of field 'name'.
445 * @return the value of field 'Name'.
447 public java.lang.String getName(
453 * Returns the value of field 'outlineColour'.
455 * @return the value of field 'OutlineColour'.
457 public int getOutlineColour(
459 return this._outlineColour;
463 * Returns the value of field 'pidThreshold'.
465 * @return the value of field 'PidThreshold'.
467 public int getPidThreshold(
469 return this._pidThreshold;
476 * @throws java.lang.IndexOutOfBoundsException if the index
477 * given is outside the bounds of the collection
478 * @return the value of the java.lang.String at the given index
480 public java.lang.String getSeq(
482 throws java.lang.IndexOutOfBoundsException {
483 // check bounds for index
484 if (index < 0 || index >= this._seqList.size()) {
485 throw new IndexOutOfBoundsException("getSeq: Index value '" + index + "' not in range [0.." + (this._seqList.size() - 1) + "]");
488 return (java.lang.String) _seqList.get(index);
492 * Method getSeq.Returns the contents of the collection in an
493 * Array. <p>Note: Just in case the collection contents are
494 * changing in another thread, we pass a 0-length Array of the
495 * correct type into the API call. This way we <i>know</i>
496 * that the Array returned is of exactly the correct length.
498 * @return this collection as an Array
500 public java.lang.String[] getSeq(
502 java.lang.String[] array = new java.lang.String[0];
503 return (java.lang.String[]) this._seqList.toArray(array);
507 * Method getSeqCount.
509 * @return the size of this collection
511 public int getSeqCount(
513 return this._seqList.size();
517 * Returns the value of field 'showConsensusHistogram'.
519 * @return the value of field 'ShowConsensusHistogram'.
521 public boolean getShowConsensusHistogram(
523 return this._showConsensusHistogram;
527 * Returns the value of field 'showSequenceLogo'.
529 * @return the value of field 'ShowSequenceLogo'.
531 public boolean getShowSequenceLogo(
533 return this._showSequenceLogo;
537 * Returns the value of field 'showUnconserved'.
539 * @return the value of field 'ShowUnconserved'.
541 public boolean getShowUnconserved(
543 return this._showUnconserved;
547 * Returns the value of field 'start'.
549 * @return the value of field 'Start'.
557 * Returns the value of field 'textCol1'.
559 * @return the value of field 'TextCol1'.
561 public int getTextCol1(
563 return this._textCol1;
567 * Returns the value of field 'textCol2'.
569 * @return the value of field 'TextCol2'.
571 public int getTextCol2(
573 return this._textCol2;
577 * Returns the value of field 'textColThreshold'.
579 * @return the value of field 'TextColThreshold'.
581 public int getTextColThreshold(
583 return this._textColThreshold;
587 * Method hasColourText.
589 * @return true if at least one ColourText has been added
591 public boolean hasColourText(
593 return this._has_colourText;
597 * Method hasConsThreshold.
599 * @return true if at least one ConsThreshold has been added
601 public boolean hasConsThreshold(
603 return this._has_consThreshold;
607 * Method hasDisplayBoxes.
609 * @return true if at least one DisplayBoxes has been added
611 public boolean hasDisplayBoxes(
613 return this._has_displayBoxes;
617 * Method hasDisplayText.
619 * @return true if at least one DisplayText has been added
621 public boolean hasDisplayText(
623 return this._has_displayText;
629 * @return true if at least one End has been added
631 public boolean hasEnd(
633 return this._has_end;
637 * Method hasIgnoreGapsinConsensus.
639 * @return true if at least one IgnoreGapsinConsensus has been
642 public boolean hasIgnoreGapsinConsensus(
644 return this._has_ignoreGapsinConsensus;
648 * Method hasOutlineColour.
650 * @return true if at least one OutlineColour has been added
652 public boolean hasOutlineColour(
654 return this._has_outlineColour;
658 * Method hasPidThreshold.
660 * @return true if at least one PidThreshold has been added
662 public boolean hasPidThreshold(
664 return this._has_pidThreshold;
668 * Method hasShowConsensusHistogram.
670 * @return true if at least one ShowConsensusHistogram has been
673 public boolean hasShowConsensusHistogram(
675 return this._has_showConsensusHistogram;
679 * Method hasShowSequenceLogo.
681 * @return true if at least one ShowSequenceLogo has been added
683 public boolean hasShowSequenceLogo(
685 return this._has_showSequenceLogo;
689 * Method hasShowUnconserved.
691 * @return true if at least one ShowUnconserved has been added
693 public boolean hasShowUnconserved(
695 return this._has_showUnconserved;
701 * @return true if at least one Start has been added
703 public boolean hasStart(
705 return this._has_start;
709 * Method hasTextCol1.
711 * @return true if at least one TextCol1 has been added
713 public boolean hasTextCol1(
715 return this._has_textCol1;
719 * Method hasTextCol2.
721 * @return true if at least one TextCol2 has been added
723 public boolean hasTextCol2(
725 return this._has_textCol2;
729 * Method hasTextColThreshold.
731 * @return true if at least one TextColThreshold has been added
733 public boolean hasTextColThreshold(
735 return this._has_textColThreshold;
739 * Returns the value of field 'colourText'.
741 * @return the value of field 'ColourText'.
743 public boolean isColourText(
745 return this._colourText;
749 * Returns the value of field 'displayBoxes'.
751 * @return the value of field 'DisplayBoxes'.
753 public boolean isDisplayBoxes(
755 return this._displayBoxes;
759 * Returns the value of field 'displayText'.
761 * @return the value of field 'DisplayText'.
763 public boolean isDisplayText(
765 return this._displayText;
769 * Returns the value of field 'ignoreGapsinConsensus'.
771 * @return the value of field 'IgnoreGapsinConsensus'.
773 public boolean isIgnoreGapsinConsensus(
775 return this._ignoreGapsinConsensus;
779 * Returns the value of field 'showConsensusHistogram'.
781 * @return the value of field 'ShowConsensusHistogram'.
783 public boolean isShowConsensusHistogram(
785 return this._showConsensusHistogram;
789 * Returns the value of field 'showSequenceLogo'.
791 * @return the value of field 'ShowSequenceLogo'.
793 public boolean isShowSequenceLogo(
795 return this._showSequenceLogo;
799 * Returns the value of field 'showUnconserved'.
801 * @return the value of field 'ShowUnconserved'.
803 public boolean isShowUnconserved(
805 return this._showUnconserved;
811 * @return true if this object is valid according to the schema
813 public boolean isValid(
817 } catch (org.exolab.castor.xml.ValidationException vex) {
827 * @throws org.exolab.castor.xml.MarshalException if object is
828 * null or if any SAXException is thrown during marshaling
829 * @throws org.exolab.castor.xml.ValidationException if this
830 * object is an invalid instance according to the schema
833 final java.io.Writer out)
834 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
835 Marshaller.marshal(this, out);
842 * @throws java.io.IOException if an IOException occurs during
844 * @throws org.exolab.castor.xml.ValidationException if this
845 * object is an invalid instance according to the schema
846 * @throws org.exolab.castor.xml.MarshalException if object is
847 * null or if any SAXException is thrown during marshaling
850 final org.xml.sax.ContentHandler handler)
851 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
852 Marshaller.marshal(this, handler);
857 public void removeAllSeq(
859 this._seqList.clear();
866 * @return true if the object was removed from the collection.
868 public boolean removeSeq(
869 final java.lang.String vSeq) {
870 boolean removed = _seqList.remove(vSeq);
875 * Method removeSeqAt.
878 * @return the element removed from the collection
880 public java.lang.String removeSeqAt(
882 java.lang.Object obj = this._seqList.remove(index);
883 return (java.lang.String) obj;
887 * Sets the value of field 'colour'.
889 * @param colour the value of field 'colour'.
891 public void setColour(
892 final java.lang.String colour) {
893 this._colour = colour;
897 * Sets the value of field 'colourText'.
899 * @param colourText the value of field 'colourText'.
901 public void setColourText(
902 final boolean colourText) {
903 this._colourText = colourText;
904 this._has_colourText = true;
908 * Sets the value of field 'consThreshold'.
910 * @param consThreshold the value of field 'consThreshold'.
912 public void setConsThreshold(
913 final int consThreshold) {
914 this._consThreshold = consThreshold;
915 this._has_consThreshold = true;
919 * Sets the value of field 'displayBoxes'.
921 * @param displayBoxes the value of field 'displayBoxes'.
923 public void setDisplayBoxes(
924 final boolean displayBoxes) {
925 this._displayBoxes = displayBoxes;
926 this._has_displayBoxes = true;
930 * Sets the value of field 'displayText'.
932 * @param displayText the value of field 'displayText'.
934 public void setDisplayText(
935 final boolean displayText) {
936 this._displayText = displayText;
937 this._has_displayText = true;
941 * Sets the value of field 'end'.
943 * @param end the value of field 'end'.
948 this._has_end = true;
952 * Sets the value of field 'id'. The field 'id' has the
953 * following description: Optional sequence group ID (only
954 * needs to be unique for this alignment)
957 * @param id the value of field 'id'.
960 final java.lang.String id) {
965 * Sets the value of field 'ignoreGapsinConsensus'.
967 * @param ignoreGapsinConsensus the value of field
968 * 'ignoreGapsinConsensus'.
970 public void setIgnoreGapsinConsensus(
971 final boolean ignoreGapsinConsensus) {
972 this._ignoreGapsinConsensus = ignoreGapsinConsensus;
973 this._has_ignoreGapsinConsensus = true;
977 * Sets the value of field 'name'.
979 * @param name the value of field 'name'.
982 final java.lang.String name) {
987 * Sets the value of field 'outlineColour'.
989 * @param outlineColour the value of field 'outlineColour'.
991 public void setOutlineColour(
992 final int outlineColour) {
993 this._outlineColour = outlineColour;
994 this._has_outlineColour = true;
998 * Sets the value of field 'pidThreshold'.
1000 * @param pidThreshold the value of field 'pidThreshold'.
1002 public void setPidThreshold(
1003 final int pidThreshold) {
1004 this._pidThreshold = pidThreshold;
1005 this._has_pidThreshold = true;
1013 * @throws java.lang.IndexOutOfBoundsException if the index
1014 * given is outside the bounds of the collection
1018 final java.lang.String vSeq)
1019 throws java.lang.IndexOutOfBoundsException {
1020 // check bounds for index
1021 if (index < 0 || index >= this._seqList.size()) {
1022 throw new IndexOutOfBoundsException("setSeq: Index value '" + index + "' not in range [0.." + (this._seqList.size() - 1) + "]");
1025 this._seqList.set(index, vSeq);
1034 final java.lang.String[] vSeqArray) {
1038 for (int i = 0; i < vSeqArray.length; i++) {
1039 this._seqList.add(vSeqArray[i]);
1044 * Sets the value of field 'showConsensusHistogram'.
1046 * @param showConsensusHistogram the value of field
1047 * 'showConsensusHistogram'.
1049 public void setShowConsensusHistogram(
1050 final boolean showConsensusHistogram) {
1051 this._showConsensusHistogram = showConsensusHistogram;
1052 this._has_showConsensusHistogram = true;
1056 * Sets the value of field 'showSequenceLogo'.
1058 * @param showSequenceLogo the value of field 'showSequenceLogo'
1060 public void setShowSequenceLogo(
1061 final boolean showSequenceLogo) {
1062 this._showSequenceLogo = showSequenceLogo;
1063 this._has_showSequenceLogo = true;
1067 * Sets the value of field 'showUnconserved'.
1069 * @param showUnconserved the value of field 'showUnconserved'.
1071 public void setShowUnconserved(
1072 final boolean showUnconserved) {
1073 this._showUnconserved = showUnconserved;
1074 this._has_showUnconserved = true;
1078 * Sets the value of field 'start'.
1080 * @param start the value of field 'start'.
1082 public void setStart(
1084 this._start = start;
1085 this._has_start = true;
1089 * Sets the value of field 'textCol1'.
1091 * @param textCol1 the value of field 'textCol1'.
1093 public void setTextCol1(
1094 final int textCol1) {
1095 this._textCol1 = textCol1;
1096 this._has_textCol1 = true;
1100 * Sets the value of field 'textCol2'.
1102 * @param textCol2 the value of field 'textCol2'.
1104 public void setTextCol2(
1105 final int textCol2) {
1106 this._textCol2 = textCol2;
1107 this._has_textCol2 = true;
1111 * Sets the value of field 'textColThreshold'.
1113 * @param textColThreshold the value of field 'textColThreshold'
1115 public void setTextColThreshold(
1116 final int textColThreshold) {
1117 this._textColThreshold = textColThreshold;
1118 this._has_textColThreshold = true;
1125 * @throws org.exolab.castor.xml.MarshalException if object is
1126 * null or if any SAXException is thrown during marshaling
1127 * @throws org.exolab.castor.xml.ValidationException if this
1128 * object is an invalid instance according to the schema
1129 * @return the unmarshaled jalview.schemabinding.version2.JGroup
1131 public static jalview.schemabinding.version2.JGroup unmarshal(
1132 final java.io.Reader reader)
1133 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
1134 return (jalview.schemabinding.version2.JGroup) Unmarshaller.unmarshal(jalview.schemabinding.version2.JGroup.class, reader);
1140 * @throws org.exolab.castor.xml.ValidationException if this
1141 * object is an invalid instance according to the schema
1143 public void validate(
1145 throws org.exolab.castor.xml.ValidationException {
1146 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
1147 validator.validate(this);