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;
211 * Field _annotationColours.
213 private jalview.schemabinding.version2.AnnotationColours _annotationColours;
222 this._seqList = new java.util.Vector();
233 * @throws java.lang.IndexOutOfBoundsException
234 * if the index given is outside the bounds of the collection
236 public void addSeq(final java.lang.String vSeq)
237 throws java.lang.IndexOutOfBoundsException
239 this._seqList.addElement(vSeq);
247 * @throws java.lang.IndexOutOfBoundsException
248 * if the index given is outside the bounds of the collection
250 public void addSeq(final int index, final java.lang.String vSeq)
251 throws java.lang.IndexOutOfBoundsException
253 this._seqList.add(index, vSeq);
258 public void deleteColourText()
260 this._has_colourText = false;
265 public void deleteConsThreshold()
267 this._has_consThreshold = false;
272 public void deleteDisplayBoxes()
274 this._has_displayBoxes = false;
279 public void deleteDisplayText()
281 this._has_displayText = false;
286 public void deleteEnd()
288 this._has_end = false;
293 public void deleteIgnoreGapsinConsensus()
295 this._has_ignoreGapsinConsensus = false;
300 public void deleteNormaliseSequenceLogo()
302 this._has_normaliseSequenceLogo = false;
307 public void deleteOutlineColour()
309 this._has_outlineColour = false;
314 public void deletePidThreshold()
316 this._has_pidThreshold = false;
321 public void deleteShowConsensusHistogram()
323 this._has_showConsensusHistogram = false;
328 public void deleteShowSequenceLogo()
330 this._has_showSequenceLogo = false;
335 public void deleteShowUnconserved()
337 this._has_showUnconserved = false;
342 public void deleteStart()
344 this._has_start = false;
349 public void deleteTextCol1()
351 this._has_textCol1 = false;
356 public void deleteTextCol2()
358 this._has_textCol2 = false;
363 public void deleteTextColThreshold()
365 this._has_textColThreshold = false;
369 * Method enumerateSeq.
371 * @return an Enumeration over all java.lang.String elements
373 public java.util.Enumeration enumerateSeq()
375 return this._seqList.elements();
379 * Returns the value of field 'annotationColours'.
381 * @return the value of field 'AnnotationColours'.
383 public jalview.schemabinding.version2.AnnotationColours getAnnotationColours()
385 return this._annotationColours;
389 * Returns the value of field 'colour'.
391 * @return the value of field 'Colour'.
393 public java.lang.String getColour()
399 * Returns the value of field 'colourText'.
401 * @return the value of field 'ColourText'.
403 public boolean getColourText()
405 return this._colourText;
409 * Returns the value of field 'consThreshold'.
411 * @return the value of field 'ConsThreshold'.
413 public int getConsThreshold()
415 return this._consThreshold;
419 * Returns the value of field 'displayBoxes'.
421 * @return the value of field 'DisplayBoxes'.
423 public boolean getDisplayBoxes()
425 return this._displayBoxes;
429 * Returns the value of field 'displayText'.
431 * @return the value of field 'DisplayText'.
433 public boolean getDisplayText()
435 return this._displayText;
439 * Returns the value of field 'end'.
441 * @return the value of field 'End'.
449 * Returns the value of field 'id'. The field 'id' has the following
450 * description: Optional sequence group ID (only needs to be unique for this
454 * @return the value of field 'Id'.
456 public java.lang.String getId()
462 * Returns the value of field 'ignoreGapsinConsensus'.
464 * @return the value of field 'IgnoreGapsinConsensus'.
466 public boolean getIgnoreGapsinConsensus()
468 return this._ignoreGapsinConsensus;
472 * Returns the value of field 'name'.
474 * @return the value of field 'Name'.
476 public java.lang.String getName()
482 * Returns the value of field 'normaliseSequenceLogo'.
484 * @return the value of field 'NormaliseSequenceLogo'.
486 public boolean getNormaliseSequenceLogo()
488 return this._normaliseSequenceLogo;
492 * Returns the value of field 'outlineColour'.
494 * @return the value of field 'OutlineColour'.
496 public int getOutlineColour()
498 return this._outlineColour;
502 * Returns the value of field 'pidThreshold'.
504 * @return the value of field 'PidThreshold'.
506 public int getPidThreshold()
508 return this._pidThreshold;
515 * @throws java.lang.IndexOutOfBoundsException
516 * if the index given is outside the bounds of the collection
517 * @return the value of the java.lang.String at the given index
519 public java.lang.String getSeq(final int index)
520 throws java.lang.IndexOutOfBoundsException
522 // check bounds for index
523 if (index < 0 || index >= this._seqList.size())
525 throw new IndexOutOfBoundsException("getSeq: Index value '" + index
526 + "' not in range [0.." + (this._seqList.size() - 1) + "]");
529 return (java.lang.String) _seqList.get(index);
533 * Method getSeq.Returns the contents of the collection in an Array.
535 * Note: Just in case the collection contents are changing in another thread,
536 * we pass a 0-length Array of the correct type into the API call. This way we
537 * <i>know</i> that the Array returned is of exactly the correct length.
539 * @return this collection as an Array
541 public java.lang.String[] getSeq()
543 java.lang.String[] array = new java.lang.String[0];
544 return (java.lang.String[]) this._seqList.toArray(array);
548 * Method getSeqCount.
550 * @return the size of this collection
552 public int getSeqCount()
554 return this._seqList.size();
558 * Returns the value of field 'showConsensusHistogram'.
560 * @return the value of field 'ShowConsensusHistogram'.
562 public boolean getShowConsensusHistogram()
564 return this._showConsensusHistogram;
568 * Returns the value of field 'showSequenceLogo'.
570 * @return the value of field 'ShowSequenceLogo'.
572 public boolean getShowSequenceLogo()
574 return this._showSequenceLogo;
578 * Returns the value of field 'showUnconserved'.
580 * @return the value of field 'ShowUnconserved'.
582 public boolean getShowUnconserved()
584 return this._showUnconserved;
588 * Returns the value of field 'start'.
590 * @return the value of field 'Start'.
592 public int getStart()
598 * Returns the value of field 'textCol1'.
600 * @return the value of field 'TextCol1'.
602 public int getTextCol1()
604 return this._textCol1;
608 * Returns the value of field 'textCol2'.
610 * @return the value of field 'TextCol2'.
612 public int getTextCol2()
614 return this._textCol2;
618 * Returns the value of field 'textColThreshold'.
620 * @return the value of field 'TextColThreshold'.
622 public int getTextColThreshold()
624 return this._textColThreshold;
628 * Method hasColourText.
630 * @return true if at least one ColourText has been added
632 public boolean hasColourText()
634 return this._has_colourText;
638 * Method hasConsThreshold.
640 * @return true if at least one ConsThreshold has been added
642 public boolean hasConsThreshold()
644 return this._has_consThreshold;
648 * Method hasDisplayBoxes.
650 * @return true if at least one DisplayBoxes has been added
652 public boolean hasDisplayBoxes()
654 return this._has_displayBoxes;
658 * Method hasDisplayText.
660 * @return true if at least one DisplayText has been added
662 public boolean hasDisplayText()
664 return this._has_displayText;
670 * @return true if at least one End has been added
672 public boolean hasEnd()
674 return this._has_end;
678 * Method hasIgnoreGapsinConsensus.
680 * @return true if at least one IgnoreGapsinConsensus has been added
682 public boolean hasIgnoreGapsinConsensus()
684 return this._has_ignoreGapsinConsensus;
688 * Method hasNormaliseSequenceLogo.
690 * @return true if at least one NormaliseSequenceLogo has been added
692 public boolean hasNormaliseSequenceLogo()
694 return this._has_normaliseSequenceLogo;
698 * Method hasOutlineColour.
700 * @return true if at least one OutlineColour has been added
702 public boolean hasOutlineColour()
704 return this._has_outlineColour;
708 * Method hasPidThreshold.
710 * @return true if at least one PidThreshold has been added
712 public boolean hasPidThreshold()
714 return this._has_pidThreshold;
718 * Method hasShowConsensusHistogram.
720 * @return true if at least one ShowConsensusHistogram has been added
722 public boolean hasShowConsensusHistogram()
724 return this._has_showConsensusHistogram;
728 * Method hasShowSequenceLogo.
730 * @return true if at least one ShowSequenceLogo has been added
732 public boolean hasShowSequenceLogo()
734 return this._has_showSequenceLogo;
738 * Method hasShowUnconserved.
740 * @return true if at least one ShowUnconserved has been added
742 public boolean hasShowUnconserved()
744 return this._has_showUnconserved;
750 * @return true if at least one Start has been added
752 public boolean hasStart()
754 return this._has_start;
758 * Method hasTextCol1.
760 * @return true if at least one TextCol1 has been added
762 public boolean hasTextCol1()
764 return this._has_textCol1;
768 * Method hasTextCol2.
770 * @return true if at least one TextCol2 has been added
772 public boolean hasTextCol2()
774 return this._has_textCol2;
778 * Method hasTextColThreshold.
780 * @return true if at least one TextColThreshold has been added
782 public boolean hasTextColThreshold()
784 return this._has_textColThreshold;
788 * Returns the value of field 'colourText'.
790 * @return the value of field 'ColourText'.
792 public boolean isColourText()
794 return this._colourText;
798 * Returns the value of field 'displayBoxes'.
800 * @return the value of field 'DisplayBoxes'.
802 public boolean isDisplayBoxes()
804 return this._displayBoxes;
808 * Returns the value of field 'displayText'.
810 * @return the value of field 'DisplayText'.
812 public boolean isDisplayText()
814 return this._displayText;
818 * Returns the value of field 'ignoreGapsinConsensus'.
820 * @return the value of field 'IgnoreGapsinConsensus'.
822 public boolean isIgnoreGapsinConsensus()
824 return this._ignoreGapsinConsensus;
828 * Returns the value of field 'normaliseSequenceLogo'.
830 * @return the value of field 'NormaliseSequenceLogo'.
832 public boolean isNormaliseSequenceLogo()
834 return this._normaliseSequenceLogo;
838 * Returns the value of field 'showConsensusHistogram'.
840 * @return the value of field 'ShowConsensusHistogram'.
842 public boolean isShowConsensusHistogram()
844 return this._showConsensusHistogram;
848 * Returns the value of field 'showSequenceLogo'.
850 * @return the value of field 'ShowSequenceLogo'.
852 public boolean isShowSequenceLogo()
854 return this._showSequenceLogo;
858 * Returns the value of field 'showUnconserved'.
860 * @return the value of field 'ShowUnconserved'.
862 public boolean isShowUnconserved()
864 return this._showUnconserved;
870 * @return true if this object is valid according to the schema
872 public boolean isValid()
877 } catch (org.exolab.castor.xml.ValidationException vex)
888 * @throws org.exolab.castor.xml.MarshalException
889 * if object is null or if any SAXException is thrown during
891 * @throws org.exolab.castor.xml.ValidationException
892 * if this object is an invalid instance according to the schema
894 public void marshal(final java.io.Writer out)
895 throws org.exolab.castor.xml.MarshalException,
896 org.exolab.castor.xml.ValidationException
898 Marshaller.marshal(this, out);
905 * @throws java.io.IOException
906 * if an IOException occurs during marshaling
907 * @throws org.exolab.castor.xml.ValidationException
908 * if this object is an invalid instance according to the schema
909 * @throws org.exolab.castor.xml.MarshalException
910 * if object is null or if any SAXException is thrown during
913 public void marshal(final org.xml.sax.ContentHandler handler)
914 throws java.io.IOException,
915 org.exolab.castor.xml.MarshalException,
916 org.exolab.castor.xml.ValidationException
918 Marshaller.marshal(this, handler);
923 public void removeAllSeq()
925 this._seqList.clear();
932 * @return true if the object was removed from the collection.
934 public boolean removeSeq(final java.lang.String vSeq)
936 boolean removed = _seqList.remove(vSeq);
941 * Method removeSeqAt.
944 * @return the element removed from the collection
946 public java.lang.String removeSeqAt(final int index)
948 java.lang.Object obj = this._seqList.remove(index);
949 return (java.lang.String) obj;
953 * Sets the value of field 'annotationColours'.
955 * @param annotationColours
956 * the value of field 'annotationColours'.
958 public void setAnnotationColours(
959 final jalview.schemabinding.version2.AnnotationColours annotationColours)
961 this._annotationColours = annotationColours;
965 * Sets the value of field 'colour'.
968 * the value of field 'colour'.
970 public void setColour(final java.lang.String colour)
972 this._colour = colour;
976 * Sets the value of field 'colourText'.
979 * the value of field 'colourText'.
981 public void setColourText(final boolean colourText)
983 this._colourText = colourText;
984 this._has_colourText = true;
988 * Sets the value of field 'consThreshold'.
990 * @param consThreshold
991 * the value of field 'consThreshold'.
993 public void setConsThreshold(final int consThreshold)
995 this._consThreshold = consThreshold;
996 this._has_consThreshold = true;
1000 * Sets the value of field 'displayBoxes'.
1002 * @param displayBoxes
1003 * the value of field 'displayBoxes'.
1005 public void setDisplayBoxes(final boolean displayBoxes)
1007 this._displayBoxes = displayBoxes;
1008 this._has_displayBoxes = true;
1012 * Sets the value of field 'displayText'.
1014 * @param displayText
1015 * the value of field 'displayText'.
1017 public void setDisplayText(final boolean displayText)
1019 this._displayText = displayText;
1020 this._has_displayText = true;
1024 * Sets the value of field 'end'.
1027 * the value of field 'end'.
1029 public void setEnd(final int end)
1032 this._has_end = true;
1036 * Sets the value of field 'id'. The field 'id' has the following description:
1037 * Optional sequence group ID (only needs to be unique for this alignment)
1041 * the value of field 'id'.
1043 public void setId(final java.lang.String id)
1049 * Sets the value of field 'ignoreGapsinConsensus'.
1051 * @param ignoreGapsinConsensus
1052 * the value of field 'ignoreGapsinConsensus'.
1054 public void setIgnoreGapsinConsensus(final boolean ignoreGapsinConsensus)
1056 this._ignoreGapsinConsensus = ignoreGapsinConsensus;
1057 this._has_ignoreGapsinConsensus = true;
1061 * Sets the value of field 'name'.
1064 * the value of field 'name'.
1066 public void setName(final java.lang.String name)
1072 * Sets the value of field 'normaliseSequenceLogo'.
1074 * @param normaliseSequenceLogo
1075 * the value of field 'normaliseSequenceLogo'.
1077 public void setNormaliseSequenceLogo(final boolean normaliseSequenceLogo)
1079 this._normaliseSequenceLogo = normaliseSequenceLogo;
1080 this._has_normaliseSequenceLogo = true;
1084 * Sets the value of field 'outlineColour'.
1086 * @param outlineColour
1087 * the value of field 'outlineColour'.
1089 public void setOutlineColour(final int outlineColour)
1091 this._outlineColour = outlineColour;
1092 this._has_outlineColour = true;
1096 * Sets the value of field 'pidThreshold'.
1098 * @param pidThreshold
1099 * the value of field 'pidThreshold'.
1101 public void setPidThreshold(final int pidThreshold)
1103 this._pidThreshold = pidThreshold;
1104 this._has_pidThreshold = true;
1112 * @throws java.lang.IndexOutOfBoundsException
1113 * if the index given is outside the bounds of the collection
1115 public void setSeq(final int index, final java.lang.String vSeq)
1116 throws java.lang.IndexOutOfBoundsException
1118 // check bounds for index
1119 if (index < 0 || index >= this._seqList.size())
1121 throw new IndexOutOfBoundsException("setSeq: Index value '" + index
1122 + "' not in range [0.." + (this._seqList.size() - 1) + "]");
1125 this._seqList.set(index, vSeq);
1133 public void setSeq(final java.lang.String[] vSeqArray)
1138 for (int i = 0; i < vSeqArray.length; i++)
1140 this._seqList.add(vSeqArray[i]);
1145 * Sets the value of field 'showConsensusHistogram'.
1147 * @param showConsensusHistogram
1148 * the value of field 'showConsensusHistogram'.
1150 public void setShowConsensusHistogram(final boolean showConsensusHistogram)
1152 this._showConsensusHistogram = showConsensusHistogram;
1153 this._has_showConsensusHistogram = true;
1157 * Sets the value of field 'showSequenceLogo'.
1159 * @param showSequenceLogo
1160 * the value of field 'showSequenceLogo'
1162 public void setShowSequenceLogo(final boolean showSequenceLogo)
1164 this._showSequenceLogo = showSequenceLogo;
1165 this._has_showSequenceLogo = true;
1169 * Sets the value of field 'showUnconserved'.
1171 * @param showUnconserved
1172 * the value of field 'showUnconserved'.
1174 public void setShowUnconserved(final boolean showUnconserved)
1176 this._showUnconserved = showUnconserved;
1177 this._has_showUnconserved = true;
1181 * Sets the value of field 'start'.
1184 * the value of field 'start'.
1186 public void setStart(final int start)
1188 this._start = start;
1189 this._has_start = true;
1193 * Sets the value of field 'textCol1'.
1196 * the value of field 'textCol1'.
1198 public void setTextCol1(final int textCol1)
1200 this._textCol1 = textCol1;
1201 this._has_textCol1 = true;
1205 * Sets the value of field 'textCol2'.
1208 * the value of field 'textCol2'.
1210 public void setTextCol2(final int textCol2)
1212 this._textCol2 = textCol2;
1213 this._has_textCol2 = true;
1217 * Sets the value of field 'textColThreshold'.
1219 * @param textColThreshold
1220 * the value of field 'textColThreshold'
1222 public void setTextColThreshold(final int textColThreshold)
1224 this._textColThreshold = textColThreshold;
1225 this._has_textColThreshold = true;
1232 * @throws org.exolab.castor.xml.MarshalException
1233 * if object is null or if any SAXException is thrown during
1235 * @throws org.exolab.castor.xml.ValidationException
1236 * if this object is an invalid instance according to the schema
1237 * @return the unmarshaled jalview.schemabinding.version2.JGroup
1239 public static jalview.schemabinding.version2.JGroup unmarshal(
1240 final java.io.Reader reader)
1241 throws org.exolab.castor.xml.MarshalException,
1242 org.exolab.castor.xml.ValidationException
1244 return (jalview.schemabinding.version2.JGroup) Unmarshaller.unmarshal(
1245 jalview.schemabinding.version2.JGroup.class, reader);
1251 * @throws org.exolab.castor.xml.ValidationException
1252 * if this object is an invalid instance according to the schema
1254 public void validate() throws org.exolab.castor.xml.ValidationException
1256 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
1257 validator.validate(this);