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 needs to be unique for this alignment)
203 private java.lang.String _id;
208 private java.util.Vector _seqList;
217 this._seqList = new java.util.Vector();
228 * @throws java.lang.IndexOutOfBoundsException
229 * if the index given is outside the bounds of the collection
231 public void addSeq(final java.lang.String vSeq)
232 throws java.lang.IndexOutOfBoundsException
234 this._seqList.addElement(vSeq);
242 * @throws java.lang.IndexOutOfBoundsException
243 * if the index given is outside the bounds of the collection
245 public void addSeq(final int index, final java.lang.String vSeq)
246 throws java.lang.IndexOutOfBoundsException
248 this._seqList.add(index, vSeq);
253 public void deleteColourText()
255 this._has_colourText = false;
260 public void deleteConsThreshold()
262 this._has_consThreshold = false;
267 public void deleteDisplayBoxes()
269 this._has_displayBoxes = false;
274 public void deleteDisplayText()
276 this._has_displayText = false;
281 public void deleteEnd()
283 this._has_end = false;
288 public void deleteIgnoreGapsinConsensus()
290 this._has_ignoreGapsinConsensus = false;
295 public void deleteNormaliseSequenceLogo()
297 this._has_normaliseSequenceLogo = false;
302 public void deleteOutlineColour()
304 this._has_outlineColour = false;
309 public void deletePidThreshold()
311 this._has_pidThreshold = false;
316 public void deleteShowConsensusHistogram()
318 this._has_showConsensusHistogram = false;
323 public void deleteShowSequenceLogo()
325 this._has_showSequenceLogo = false;
330 public void deleteShowUnconserved()
332 this._has_showUnconserved = false;
337 public void deleteStart()
339 this._has_start = false;
344 public void deleteTextCol1()
346 this._has_textCol1 = false;
351 public void deleteTextCol2()
353 this._has_textCol2 = false;
358 public void deleteTextColThreshold()
360 this._has_textColThreshold = false;
364 * Method enumerateSeq.
366 * @return an Enumeration over all java.lang.String elements
368 public java.util.Enumeration enumerateSeq()
370 return this._seqList.elements();
374 * Returns the value of field 'colour'.
376 * @return the value of field 'Colour'.
378 public java.lang.String getColour()
384 * Returns the value of field 'colourText'.
386 * @return the value of field 'ColourText'.
388 public boolean getColourText()
390 return this._colourText;
394 * Returns the value of field 'consThreshold'.
396 * @return the value of field 'ConsThreshold'.
398 public int getConsThreshold()
400 return this._consThreshold;
404 * Returns the value of field 'displayBoxes'.
406 * @return the value of field 'DisplayBoxes'.
408 public boolean getDisplayBoxes()
410 return this._displayBoxes;
414 * Returns the value of field 'displayText'.
416 * @return the value of field 'DisplayText'.
418 public boolean getDisplayText()
420 return this._displayText;
424 * Returns the value of field 'end'.
426 * @return the value of field 'End'.
434 * Returns the value of field 'id'. The field 'id' has the following
435 * description: Optional sequence group ID (only needs to be unique for this
439 * @return the value of field 'Id'.
441 public java.lang.String getId()
447 * Returns the value of field 'ignoreGapsinConsensus'.
449 * @return the value of field 'IgnoreGapsinConsensus'.
451 public boolean getIgnoreGapsinConsensus()
453 return this._ignoreGapsinConsensus;
457 * Returns the value of field 'name'.
459 * @return the value of field 'Name'.
461 public java.lang.String getName()
467 * Returns the value of field 'normaliseSequenceLogo'.
469 * @return the value of field 'NormaliseSequenceLogo'.
471 public boolean getNormaliseSequenceLogo()
473 return this._normaliseSequenceLogo;
477 * Returns the value of field 'outlineColour'.
479 * @return the value of field 'OutlineColour'.
481 public int getOutlineColour()
483 return this._outlineColour;
487 * Returns the value of field 'pidThreshold'.
489 * @return the value of field 'PidThreshold'.
491 public int getPidThreshold()
493 return this._pidThreshold;
500 * @throws java.lang.IndexOutOfBoundsException
501 * if the index given is outside the bounds of the collection
502 * @return the value of the java.lang.String at the given index
504 public java.lang.String getSeq(final int index)
505 throws java.lang.IndexOutOfBoundsException
507 // check bounds for index
508 if (index < 0 || index >= this._seqList.size())
510 throw new IndexOutOfBoundsException("getSeq: Index value '" + index
511 + "' not in range [0.." + (this._seqList.size() - 1) + "]");
514 return (java.lang.String) _seqList.get(index);
518 * Method getSeq.Returns the contents of the collection in an Array.
520 * Note: Just in case the collection contents are changing in another thread,
521 * we pass a 0-length Array of the correct type into the API call. This way we
522 * <i>know</i> that the Array returned is of exactly the correct length.
524 * @return this collection as an Array
526 public java.lang.String[] getSeq()
528 java.lang.String[] array = new java.lang.String[0];
529 return (java.lang.String[]) this._seqList.toArray(array);
533 * Method getSeqCount.
535 * @return the size of this collection
537 public int getSeqCount()
539 return this._seqList.size();
543 * Returns the value of field 'showConsensusHistogram'.
545 * @return the value of field 'ShowConsensusHistogram'.
547 public boolean getShowConsensusHistogram()
549 return this._showConsensusHistogram;
553 * Returns the value of field 'showSequenceLogo'.
555 * @return the value of field 'ShowSequenceLogo'.
557 public boolean getShowSequenceLogo()
559 return this._showSequenceLogo;
563 * Returns the value of field 'showUnconserved'.
565 * @return the value of field 'ShowUnconserved'.
567 public boolean getShowUnconserved()
569 return this._showUnconserved;
573 * Returns the value of field 'start'.
575 * @return the value of field 'Start'.
577 public int getStart()
583 * Returns the value of field 'textCol1'.
585 * @return the value of field 'TextCol1'.
587 public int getTextCol1()
589 return this._textCol1;
593 * Returns the value of field 'textCol2'.
595 * @return the value of field 'TextCol2'.
597 public int getTextCol2()
599 return this._textCol2;
603 * Returns the value of field 'textColThreshold'.
605 * @return the value of field 'TextColThreshold'.
607 public int getTextColThreshold()
609 return this._textColThreshold;
613 * Method hasColourText.
615 * @return true if at least one ColourText has been added
617 public boolean hasColourText()
619 return this._has_colourText;
623 * Method hasConsThreshold.
625 * @return true if at least one ConsThreshold has been added
627 public boolean hasConsThreshold()
629 return this._has_consThreshold;
633 * Method hasDisplayBoxes.
635 * @return true if at least one DisplayBoxes has been added
637 public boolean hasDisplayBoxes()
639 return this._has_displayBoxes;
643 * Method hasDisplayText.
645 * @return true if at least one DisplayText has been added
647 public boolean hasDisplayText()
649 return this._has_displayText;
655 * @return true if at least one End has been added
657 public boolean hasEnd()
659 return this._has_end;
663 * Method hasIgnoreGapsinConsensus.
665 * @return true if at least one IgnoreGapsinConsensus has been added
667 public boolean hasIgnoreGapsinConsensus()
669 return this._has_ignoreGapsinConsensus;
673 * Method hasNormaliseSequenceLogo.
675 * @return true if at least one NormaliseSequenceLogo has been added
677 public boolean hasNormaliseSequenceLogo()
679 return this._has_normaliseSequenceLogo;
683 * Method hasOutlineColour.
685 * @return true if at least one OutlineColour has been added
687 public boolean hasOutlineColour()
689 return this._has_outlineColour;
693 * Method hasPidThreshold.
695 * @return true if at least one PidThreshold has been added
697 public boolean hasPidThreshold()
699 return this._has_pidThreshold;
703 * Method hasShowConsensusHistogram.
705 * @return true if at least one ShowConsensusHistogram has been added
707 public boolean hasShowConsensusHistogram()
709 return this._has_showConsensusHistogram;
713 * Method hasShowSequenceLogo.
715 * @return true if at least one ShowSequenceLogo has been added
717 public boolean hasShowSequenceLogo()
719 return this._has_showSequenceLogo;
723 * Method hasShowUnconserved.
725 * @return true if at least one ShowUnconserved has been added
727 public boolean hasShowUnconserved()
729 return this._has_showUnconserved;
735 * @return true if at least one Start has been added
737 public boolean hasStart()
739 return this._has_start;
743 * Method hasTextCol1.
745 * @return true if at least one TextCol1 has been added
747 public boolean hasTextCol1()
749 return this._has_textCol1;
753 * Method hasTextCol2.
755 * @return true if at least one TextCol2 has been added
757 public boolean hasTextCol2()
759 return this._has_textCol2;
763 * Method hasTextColThreshold.
765 * @return true if at least one TextColThreshold has been added
767 public boolean hasTextColThreshold()
769 return this._has_textColThreshold;
773 * Returns the value of field 'colourText'.
775 * @return the value of field 'ColourText'.
777 public boolean isColourText()
779 return this._colourText;
783 * Returns the value of field 'displayBoxes'.
785 * @return the value of field 'DisplayBoxes'.
787 public boolean isDisplayBoxes()
789 return this._displayBoxes;
793 * Returns the value of field 'displayText'.
795 * @return the value of field 'DisplayText'.
797 public boolean isDisplayText()
799 return this._displayText;
803 * Returns the value of field 'ignoreGapsinConsensus'.
805 * @return the value of field 'IgnoreGapsinConsensus'.
807 public boolean isIgnoreGapsinConsensus()
809 return this._ignoreGapsinConsensus;
813 * Returns the value of field 'normaliseSequenceLogo'.
815 * @return the value of field 'NormaliseSequenceLogo'.
817 public boolean isNormaliseSequenceLogo()
819 return this._normaliseSequenceLogo;
823 * Returns the value of field 'showConsensusHistogram'.
825 * @return the value of field 'ShowConsensusHistogram'.
827 public boolean isShowConsensusHistogram()
829 return this._showConsensusHistogram;
833 * Returns the value of field 'showSequenceLogo'.
835 * @return the value of field 'ShowSequenceLogo'.
837 public boolean isShowSequenceLogo()
839 return this._showSequenceLogo;
843 * Returns the value of field 'showUnconserved'.
845 * @return the value of field 'ShowUnconserved'.
847 public boolean isShowUnconserved()
849 return this._showUnconserved;
855 * @return true if this object is valid according to the schema
857 public boolean isValid()
862 } catch (org.exolab.castor.xml.ValidationException vex)
873 * @throws org.exolab.castor.xml.MarshalException
874 * if object is null or if any SAXException is thrown during
876 * @throws org.exolab.castor.xml.ValidationException
877 * if this object is an invalid instance according to the schema
879 public void marshal(final java.io.Writer out)
880 throws org.exolab.castor.xml.MarshalException,
881 org.exolab.castor.xml.ValidationException
883 Marshaller.marshal(this, out);
890 * @throws java.io.IOException
891 * if an IOException occurs during marshaling
892 * @throws org.exolab.castor.xml.ValidationException
893 * if this object is an invalid instance according to the schema
894 * @throws org.exolab.castor.xml.MarshalException
895 * if object is null or if any SAXException is thrown during
898 public void marshal(final org.xml.sax.ContentHandler handler)
899 throws java.io.IOException,
900 org.exolab.castor.xml.MarshalException,
901 org.exolab.castor.xml.ValidationException
903 Marshaller.marshal(this, handler);
908 public void removeAllSeq()
910 this._seqList.clear();
917 * @return true if the object was removed from the collection.
919 public boolean removeSeq(final java.lang.String vSeq)
921 boolean removed = _seqList.remove(vSeq);
926 * Method removeSeqAt.
929 * @return the element removed from the collection
931 public java.lang.String removeSeqAt(final int index)
933 java.lang.Object obj = this._seqList.remove(index);
934 return (java.lang.String) obj;
938 * Sets the value of field 'colour'.
941 * the value of field 'colour'.
943 public void setColour(final java.lang.String colour)
945 this._colour = colour;
949 * Sets the value of field 'colourText'.
952 * the value of field 'colourText'.
954 public void setColourText(final boolean colourText)
956 this._colourText = colourText;
957 this._has_colourText = true;
961 * Sets the value of field 'consThreshold'.
963 * @param consThreshold
964 * the value of field 'consThreshold'.
966 public void setConsThreshold(final int consThreshold)
968 this._consThreshold = consThreshold;
969 this._has_consThreshold = true;
973 * Sets the value of field 'displayBoxes'.
975 * @param displayBoxes
976 * the value of field 'displayBoxes'.
978 public void setDisplayBoxes(final boolean displayBoxes)
980 this._displayBoxes = displayBoxes;
981 this._has_displayBoxes = true;
985 * Sets the value of field 'displayText'.
988 * the value of field 'displayText'.
990 public void setDisplayText(final boolean displayText)
992 this._displayText = displayText;
993 this._has_displayText = true;
997 * Sets the value of field 'end'.
1000 * the value of field 'end'.
1002 public void setEnd(final int end)
1005 this._has_end = true;
1009 * Sets the value of field 'id'. The field 'id' has the following description:
1010 * Optional sequence group ID (only needs to be unique for this alignment)
1014 * the value of field 'id'.
1016 public void setId(final java.lang.String id)
1022 * Sets the value of field 'ignoreGapsinConsensus'.
1024 * @param ignoreGapsinConsensus
1025 * the value of field 'ignoreGapsinConsensus'.
1027 public void setIgnoreGapsinConsensus(final boolean ignoreGapsinConsensus)
1029 this._ignoreGapsinConsensus = ignoreGapsinConsensus;
1030 this._has_ignoreGapsinConsensus = true;
1034 * Sets the value of field 'name'.
1037 * the value of field 'name'.
1039 public void setName(final java.lang.String name)
1045 * Sets the value of field 'normaliseSequenceLogo'.
1047 * @param normaliseSequenceLogo
1048 * the value of field 'normaliseSequenceLogo'.
1050 public void setNormaliseSequenceLogo(final boolean normaliseSequenceLogo)
1052 this._normaliseSequenceLogo = normaliseSequenceLogo;
1053 this._has_normaliseSequenceLogo = true;
1057 * Sets the value of field 'outlineColour'.
1059 * @param outlineColour
1060 * the value of field 'outlineColour'.
1062 public void setOutlineColour(final int outlineColour)
1064 this._outlineColour = outlineColour;
1065 this._has_outlineColour = true;
1069 * Sets the value of field 'pidThreshold'.
1071 * @param pidThreshold
1072 * the value of field 'pidThreshold'.
1074 public void setPidThreshold(final int pidThreshold)
1076 this._pidThreshold = pidThreshold;
1077 this._has_pidThreshold = true;
1085 * @throws java.lang.IndexOutOfBoundsException
1086 * if the index given is outside the bounds of the collection
1088 public void setSeq(final int index, final java.lang.String vSeq)
1089 throws java.lang.IndexOutOfBoundsException
1091 // check bounds for index
1092 if (index < 0 || index >= this._seqList.size())
1094 throw new IndexOutOfBoundsException("setSeq: Index value '" + index
1095 + "' not in range [0.." + (this._seqList.size() - 1) + "]");
1098 this._seqList.set(index, vSeq);
1106 public void setSeq(final java.lang.String[] vSeqArray)
1111 for (int i = 0; i < vSeqArray.length; i++)
1113 this._seqList.add(vSeqArray[i]);
1118 * Sets the value of field 'showConsensusHistogram'.
1120 * @param showConsensusHistogram
1121 * the value of field 'showConsensusHistogram'.
1123 public void setShowConsensusHistogram(final boolean showConsensusHistogram)
1125 this._showConsensusHistogram = showConsensusHistogram;
1126 this._has_showConsensusHistogram = true;
1130 * Sets the value of field 'showSequenceLogo'.
1132 * @param showSequenceLogo
1133 * the value of field 'showSequenceLogo'
1135 public void setShowSequenceLogo(final boolean showSequenceLogo)
1137 this._showSequenceLogo = showSequenceLogo;
1138 this._has_showSequenceLogo = true;
1142 * Sets the value of field 'showUnconserved'.
1144 * @param showUnconserved
1145 * the value of field 'showUnconserved'.
1147 public void setShowUnconserved(final boolean showUnconserved)
1149 this._showUnconserved = showUnconserved;
1150 this._has_showUnconserved = true;
1154 * Sets the value of field 'start'.
1157 * the value of field 'start'.
1159 public void setStart(final int start)
1161 this._start = start;
1162 this._has_start = true;
1166 * Sets the value of field 'textCol1'.
1169 * the value of field 'textCol1'.
1171 public void setTextCol1(final int textCol1)
1173 this._textCol1 = textCol1;
1174 this._has_textCol1 = true;
1178 * Sets the value of field 'textCol2'.
1181 * the value of field 'textCol2'.
1183 public void setTextCol2(final int textCol2)
1185 this._textCol2 = textCol2;
1186 this._has_textCol2 = true;
1190 * Sets the value of field 'textColThreshold'.
1192 * @param textColThreshold
1193 * the value of field 'textColThreshold'
1195 public void setTextColThreshold(final int textColThreshold)
1197 this._textColThreshold = textColThreshold;
1198 this._has_textColThreshold = true;
1205 * @throws org.exolab.castor.xml.MarshalException
1206 * if object is null or if any SAXException is thrown during
1208 * @throws org.exolab.castor.xml.ValidationException
1209 * if this object is an invalid instance according to the schema
1210 * @return the unmarshaled jalview.schemabinding.version2.JGroup
1212 public static jalview.schemabinding.version2.JGroup unmarshal(
1213 final java.io.Reader reader)
1214 throws org.exolab.castor.xml.MarshalException,
1215 org.exolab.castor.xml.ValidationException
1217 return (jalview.schemabinding.version2.JGroup) Unmarshaller.unmarshal(
1218 jalview.schemabinding.version2.JGroup.class, reader);
1224 * @throws org.exolab.castor.xml.ValidationException
1225 * if this object is an invalid instance according to the schema
1227 public void validate() throws org.exolab.castor.xml.ValidationException
1229 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
1230 validator.validate(this);