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