1 /*******************************************************************************
2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
3 * Copyright (C) 2014 The Jalview Authors
5 * This file is part of Jalview.
7 * Jalview is free software: you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
11 * Jalview is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty
13 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 * PURPOSE. See the GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License along with Jalview.
17 * If not, see <http://www.gnu.org/licenses/>.
18 * The Jalview Authors are detailed in the 'AUTHORS' file.
19 ******************************************************************************/
21 * This class was automatically generated with
22 * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
27 package jalview.schemabinding.version2;
29 //---------------------------------/
30 //- Imported classes and packages -/
31 //---------------------------------/
33 import org.exolab.castor.xml.Marshaller;
34 import org.exolab.castor.xml.Unmarshaller;
39 * @version $Revision$ $Date$
41 public class JGroup implements java.io.Serializable
44 // --------------------------/
45 // - Class/Member Variables -/
46 // --------------------------/
54 * keeps track of state for field: _start
56 private boolean _has_start;
64 * keeps track of state for field: _end
66 private boolean _has_end;
71 private java.lang.String _name;
76 private java.lang.String _colour;
79 * Field _consThreshold.
81 private int _consThreshold;
84 * keeps track of state for field: _consThreshold
86 private boolean _has_consThreshold;
89 * Field _pidThreshold.
91 private int _pidThreshold;
94 * keeps track of state for field: _pidThreshold
96 private boolean _has_pidThreshold;
99 * Field _outlineColour.
101 private int _outlineColour;
104 * keeps track of state for field: _outlineColour
106 private boolean _has_outlineColour;
109 * Field _displayBoxes.
111 private boolean _displayBoxes;
114 * keeps track of state for field: _displayBoxes
116 private boolean _has_displayBoxes;
119 * Field _displayText.
121 private boolean _displayText;
124 * keeps track of state for field: _displayText
126 private boolean _has_displayText;
131 private boolean _colourText;
134 * keeps track of state for field: _colourText
136 private boolean _has_colourText;
141 private int _textCol1;
144 * keeps track of state for field: _textCol1
146 private boolean _has_textCol1;
151 private int _textCol2;
154 * keeps track of state for field: _textCol2
156 private boolean _has_textCol2;
159 * Field _textColThreshold.
161 private int _textColThreshold;
164 * keeps track of state for field: _textColThreshold
166 private boolean _has_textColThreshold;
169 * Field _showUnconserved.
171 private boolean _showUnconserved;
174 * keeps track of state for field: _showUnconserved
176 private boolean _has_showUnconserved;
179 * Field _ignoreGapsinConsensus.
181 private boolean _ignoreGapsinConsensus = true;
184 * keeps track of state for field: _ignoreGapsinConsensus
186 private boolean _has_ignoreGapsinConsensus;
189 * Field _showConsensusHistogram.
191 private boolean _showConsensusHistogram = true;
194 * keeps track of state for field: _showConsensusHistogram
196 private boolean _has_showConsensusHistogram;
199 * Field _showSequenceLogo.
201 private boolean _showSequenceLogo = false;
204 * keeps track of state for field: _showSequenceLogo
206 private boolean _has_showSequenceLogo;
209 * Field _normaliseSequenceLogo.
211 private boolean _normaliseSequenceLogo = false;
214 * keeps track of state for field: _normaliseSequenceLogo
216 private boolean _has_normaliseSequenceLogo;
219 * Optional sequence group ID (only needs to be unique for this alignment)
222 private java.lang.String _id;
227 private java.util.Vector _seqList;
236 this._seqList = new java.util.Vector();
247 * @throws java.lang.IndexOutOfBoundsException
248 * if the index given is outside the bounds of the collection
250 public void addSeq(final java.lang.String vSeq)
251 throws java.lang.IndexOutOfBoundsException
253 this._seqList.addElement(vSeq);
261 * @throws java.lang.IndexOutOfBoundsException
262 * if the index given is outside the bounds of the collection
264 public void addSeq(final int index, final java.lang.String vSeq)
265 throws java.lang.IndexOutOfBoundsException
267 this._seqList.add(index, vSeq);
272 public void deleteColourText()
274 this._has_colourText = false;
279 public void deleteConsThreshold()
281 this._has_consThreshold = false;
286 public void deleteDisplayBoxes()
288 this._has_displayBoxes = false;
293 public void deleteDisplayText()
295 this._has_displayText = false;
300 public void deleteEnd()
302 this._has_end = false;
307 public void deleteIgnoreGapsinConsensus()
309 this._has_ignoreGapsinConsensus = false;
314 public void deleteNormaliseSequenceLogo()
316 this._has_normaliseSequenceLogo = false;
321 public void deleteOutlineColour()
323 this._has_outlineColour = false;
328 public void deletePidThreshold()
330 this._has_pidThreshold = false;
335 public void deleteShowConsensusHistogram()
337 this._has_showConsensusHistogram = false;
342 public void deleteShowSequenceLogo()
344 this._has_showSequenceLogo = false;
349 public void deleteShowUnconserved()
351 this._has_showUnconserved = false;
356 public void deleteStart()
358 this._has_start = false;
363 public void deleteTextCol1()
365 this._has_textCol1 = false;
370 public void deleteTextCol2()
372 this._has_textCol2 = false;
377 public void deleteTextColThreshold()
379 this._has_textColThreshold = false;
383 * Method enumerateSeq.
385 * @return an Enumeration over all java.lang.String elements
387 public java.util.Enumeration enumerateSeq()
389 return this._seqList.elements();
393 * Returns the value of field 'colour'.
395 * @return the value of field 'Colour'.
397 public java.lang.String getColour()
403 * Returns the value of field 'colourText'.
405 * @return the value of field 'ColourText'.
407 public boolean getColourText()
409 return this._colourText;
413 * Returns the value of field 'consThreshold'.
415 * @return the value of field 'ConsThreshold'.
417 public int getConsThreshold()
419 return this._consThreshold;
423 * Returns the value of field 'displayBoxes'.
425 * @return the value of field 'DisplayBoxes'.
427 public boolean getDisplayBoxes()
429 return this._displayBoxes;
433 * Returns the value of field 'displayText'.
435 * @return the value of field 'DisplayText'.
437 public boolean getDisplayText()
439 return this._displayText;
443 * Returns the value of field 'end'.
445 * @return the value of field 'End'.
453 * Returns the value of field 'id'. The field 'id' has the following
454 * description: Optional sequence group ID (only needs to be unique for this
458 * @return the value of field 'Id'.
460 public java.lang.String getId()
466 * Returns the value of field 'ignoreGapsinConsensus'.
468 * @return the value of field 'IgnoreGapsinConsensus'.
470 public boolean getIgnoreGapsinConsensus()
472 return this._ignoreGapsinConsensus;
476 * Returns the value of field 'name'.
478 * @return the value of field 'Name'.
480 public java.lang.String getName()
486 * Returns the value of field 'normaliseSequenceLogo'.
488 * @return the value of field 'NormaliseSequenceLogo'.
490 public boolean getNormaliseSequenceLogo()
492 return this._normaliseSequenceLogo;
496 * Returns the value of field 'outlineColour'.
498 * @return the value of field 'OutlineColour'.
500 public int getOutlineColour()
502 return this._outlineColour;
506 * Returns the value of field 'pidThreshold'.
508 * @return the value of field 'PidThreshold'.
510 public int getPidThreshold()
512 return this._pidThreshold;
519 * @throws java.lang.IndexOutOfBoundsException
520 * if the index given is outside the bounds of the collection
521 * @return the value of the java.lang.String at the given index
523 public java.lang.String getSeq(final int index)
524 throws java.lang.IndexOutOfBoundsException
526 // check bounds for index
527 if (index < 0 || index >= this._seqList.size())
529 throw new IndexOutOfBoundsException("getSeq: Index value '" + index
530 + "' not in range [0.." + (this._seqList.size() - 1) + "]");
533 return (java.lang.String) _seqList.get(index);
537 * Method getSeq.Returns the contents of the collection in an Array.
539 * Note: Just in case the collection contents are changing in another thread,
540 * we pass a 0-length Array of the correct type into the API call. This way we
541 * <i>know</i> that the Array returned is of exactly the correct length.
543 * @return this collection as an Array
545 public java.lang.String[] getSeq()
547 java.lang.String[] array = new java.lang.String[0];
548 return (java.lang.String[]) this._seqList.toArray(array);
552 * Method getSeqCount.
554 * @return the size of this collection
556 public int getSeqCount()
558 return this._seqList.size();
562 * Returns the value of field 'showConsensusHistogram'.
564 * @return the value of field 'ShowConsensusHistogram'.
566 public boolean getShowConsensusHistogram()
568 return this._showConsensusHistogram;
572 * Returns the value of field 'showSequenceLogo'.
574 * @return the value of field 'ShowSequenceLogo'.
576 public boolean getShowSequenceLogo()
578 return this._showSequenceLogo;
582 * Returns the value of field 'showUnconserved'.
584 * @return the value of field 'ShowUnconserved'.
586 public boolean getShowUnconserved()
588 return this._showUnconserved;
592 * Returns the value of field 'start'.
594 * @return the value of field 'Start'.
596 public int getStart()
602 * Returns the value of field 'textCol1'.
604 * @return the value of field 'TextCol1'.
606 public int getTextCol1()
608 return this._textCol1;
612 * Returns the value of field 'textCol2'.
614 * @return the value of field 'TextCol2'.
616 public int getTextCol2()
618 return this._textCol2;
622 * Returns the value of field 'textColThreshold'.
624 * @return the value of field 'TextColThreshold'.
626 public int getTextColThreshold()
628 return this._textColThreshold;
632 * Method hasColourText.
634 * @return true if at least one ColourText has been added
636 public boolean hasColourText()
638 return this._has_colourText;
642 * Method hasConsThreshold.
644 * @return true if at least one ConsThreshold has been added
646 public boolean hasConsThreshold()
648 return this._has_consThreshold;
652 * Method hasDisplayBoxes.
654 * @return true if at least one DisplayBoxes has been added
656 public boolean hasDisplayBoxes()
658 return this._has_displayBoxes;
662 * Method hasDisplayText.
664 * @return true if at least one DisplayText has been added
666 public boolean hasDisplayText()
668 return this._has_displayText;
674 * @return true if at least one End has been added
676 public boolean hasEnd()
678 return this._has_end;
682 * Method hasIgnoreGapsinConsensus.
684 * @return true if at least one IgnoreGapsinConsensus has been added
686 public boolean hasIgnoreGapsinConsensus()
688 return this._has_ignoreGapsinConsensus;
692 * Method hasNormaliseSequenceLogo.
694 * @return true if at least one NormaliseSequenceLogo has been added
696 public boolean hasNormaliseSequenceLogo()
698 return this._has_normaliseSequenceLogo;
702 * Method hasOutlineColour.
704 * @return true if at least one OutlineColour has been added
706 public boolean hasOutlineColour()
708 return this._has_outlineColour;
712 * Method hasPidThreshold.
714 * @return true if at least one PidThreshold has been added
716 public boolean hasPidThreshold()
718 return this._has_pidThreshold;
722 * Method hasShowConsensusHistogram.
724 * @return true if at least one ShowConsensusHistogram has been added
726 public boolean hasShowConsensusHistogram()
728 return this._has_showConsensusHistogram;
732 * Method hasShowSequenceLogo.
734 * @return true if at least one ShowSequenceLogo has been added
736 public boolean hasShowSequenceLogo()
738 return this._has_showSequenceLogo;
742 * Method hasShowUnconserved.
744 * @return true if at least one ShowUnconserved has been added
746 public boolean hasShowUnconserved()
748 return this._has_showUnconserved;
754 * @return true if at least one Start has been added
756 public boolean hasStart()
758 return this._has_start;
762 * Method hasTextCol1.
764 * @return true if at least one TextCol1 has been added
766 public boolean hasTextCol1()
768 return this._has_textCol1;
772 * Method hasTextCol2.
774 * @return true if at least one TextCol2 has been added
776 public boolean hasTextCol2()
778 return this._has_textCol2;
782 * Method hasTextColThreshold.
784 * @return true if at least one TextColThreshold has been added
786 public boolean hasTextColThreshold()
788 return this._has_textColThreshold;
792 * Returns the value of field 'colourText'.
794 * @return the value of field 'ColourText'.
796 public boolean isColourText()
798 return this._colourText;
802 * Returns the value of field 'displayBoxes'.
804 * @return the value of field 'DisplayBoxes'.
806 public boolean isDisplayBoxes()
808 return this._displayBoxes;
812 * Returns the value of field 'displayText'.
814 * @return the value of field 'DisplayText'.
816 public boolean isDisplayText()
818 return this._displayText;
822 * Returns the value of field 'ignoreGapsinConsensus'.
824 * @return the value of field 'IgnoreGapsinConsensus'.
826 public boolean isIgnoreGapsinConsensus()
828 return this._ignoreGapsinConsensus;
832 * Returns the value of field 'normaliseSequenceLogo'.
834 * @return the value of field 'NormaliseSequenceLogo'.
836 public boolean isNormaliseSequenceLogo()
838 return this._normaliseSequenceLogo;
842 * Returns the value of field 'showConsensusHistogram'.
844 * @return the value of field 'ShowConsensusHistogram'.
846 public boolean isShowConsensusHistogram()
848 return this._showConsensusHistogram;
852 * Returns the value of field 'showSequenceLogo'.
854 * @return the value of field 'ShowSequenceLogo'.
856 public boolean isShowSequenceLogo()
858 return this._showSequenceLogo;
862 * Returns the value of field 'showUnconserved'.
864 * @return the value of field 'ShowUnconserved'.
866 public boolean isShowUnconserved()
868 return this._showUnconserved;
874 * @return true if this object is valid according to the schema
876 public boolean isValid()
881 } catch (org.exolab.castor.xml.ValidationException vex)
892 * @throws org.exolab.castor.xml.MarshalException
893 * if object is null or if any SAXException is thrown during
895 * @throws org.exolab.castor.xml.ValidationException
896 * if this object is an invalid instance according to the schema
898 public void marshal(final java.io.Writer out)
899 throws org.exolab.castor.xml.MarshalException,
900 org.exolab.castor.xml.ValidationException
902 Marshaller.marshal(this, out);
909 * @throws java.io.IOException
910 * if an IOException occurs during marshaling
911 * @throws org.exolab.castor.xml.ValidationException
912 * if this object is an invalid instance according to the schema
913 * @throws org.exolab.castor.xml.MarshalException
914 * if object is null or if any SAXException is thrown during
917 public void marshal(final org.xml.sax.ContentHandler handler)
918 throws java.io.IOException,
919 org.exolab.castor.xml.MarshalException,
920 org.exolab.castor.xml.ValidationException
922 Marshaller.marshal(this, handler);
927 public void removeAllSeq()
929 this._seqList.clear();
936 * @return true if the object was removed from the collection.
938 public boolean removeSeq(final java.lang.String vSeq)
940 boolean removed = _seqList.remove(vSeq);
945 * Method removeSeqAt.
948 * @return the element removed from the collection
950 public java.lang.String removeSeqAt(final int index)
952 java.lang.Object obj = this._seqList.remove(index);
953 return (java.lang.String) obj;
957 * Sets the value of field 'colour'.
960 * the value of field 'colour'.
962 public void setColour(final java.lang.String colour)
964 this._colour = colour;
968 * Sets the value of field 'colourText'.
971 * the value of field 'colourText'.
973 public void setColourText(final boolean colourText)
975 this._colourText = colourText;
976 this._has_colourText = true;
980 * Sets the value of field 'consThreshold'.
982 * @param consThreshold
983 * the value of field 'consThreshold'.
985 public void setConsThreshold(final int consThreshold)
987 this._consThreshold = consThreshold;
988 this._has_consThreshold = true;
992 * Sets the value of field 'displayBoxes'.
994 * @param displayBoxes
995 * the value of field 'displayBoxes'.
997 public void setDisplayBoxes(final boolean displayBoxes)
999 this._displayBoxes = displayBoxes;
1000 this._has_displayBoxes = true;
1004 * Sets the value of field 'displayText'.
1006 * @param displayText
1007 * the value of field 'displayText'.
1009 public void setDisplayText(final boolean displayText)
1011 this._displayText = displayText;
1012 this._has_displayText = true;
1016 * Sets the value of field 'end'.
1019 * the value of field 'end'.
1021 public void setEnd(final int end)
1024 this._has_end = true;
1028 * Sets the value of field 'id'. The field 'id' has the following description:
1029 * Optional sequence group ID (only needs to be unique for this alignment)
1033 * the value of field 'id'.
1035 public void setId(final java.lang.String id)
1041 * Sets the value of field 'ignoreGapsinConsensus'.
1043 * @param ignoreGapsinConsensus
1044 * the value of field 'ignoreGapsinConsensus'.
1046 public void setIgnoreGapsinConsensus(final boolean ignoreGapsinConsensus)
1048 this._ignoreGapsinConsensus = ignoreGapsinConsensus;
1049 this._has_ignoreGapsinConsensus = true;
1053 * Sets the value of field 'name'.
1056 * the value of field 'name'.
1058 public void setName(final java.lang.String name)
1064 * Sets the value of field 'normaliseSequenceLogo'.
1066 * @param normaliseSequenceLogo
1067 * the value of field 'normaliseSequenceLogo'.
1069 public void setNormaliseSequenceLogo(final boolean normaliseSequenceLogo)
1071 this._normaliseSequenceLogo = normaliseSequenceLogo;
1072 this._has_normaliseSequenceLogo = true;
1076 * Sets the value of field 'outlineColour'.
1078 * @param outlineColour
1079 * the value of field 'outlineColour'.
1081 public void setOutlineColour(final int outlineColour)
1083 this._outlineColour = outlineColour;
1084 this._has_outlineColour = true;
1088 * Sets the value of field 'pidThreshold'.
1090 * @param pidThreshold
1091 * the value of field 'pidThreshold'.
1093 public void setPidThreshold(final int pidThreshold)
1095 this._pidThreshold = pidThreshold;
1096 this._has_pidThreshold = true;
1104 * @throws java.lang.IndexOutOfBoundsException
1105 * if the index given is outside the bounds of the collection
1107 public void setSeq(final int index, final java.lang.String vSeq)
1108 throws java.lang.IndexOutOfBoundsException
1110 // check bounds for index
1111 if (index < 0 || index >= this._seqList.size())
1113 throw new IndexOutOfBoundsException("setSeq: Index value '" + index
1114 + "' not in range [0.." + (this._seqList.size() - 1) + "]");
1117 this._seqList.set(index, vSeq);
1125 public void setSeq(final java.lang.String[] vSeqArray)
1130 for (int i = 0; i < vSeqArray.length; i++)
1132 this._seqList.add(vSeqArray[i]);
1137 * Sets the value of field 'showConsensusHistogram'.
1139 * @param showConsensusHistogram
1140 * the value of field 'showConsensusHistogram'.
1142 public void setShowConsensusHistogram(final boolean showConsensusHistogram)
1144 this._showConsensusHistogram = showConsensusHistogram;
1145 this._has_showConsensusHistogram = true;
1149 * Sets the value of field 'showSequenceLogo'.
1151 * @param showSequenceLogo
1152 * the value of field 'showSequenceLogo'
1154 public void setShowSequenceLogo(final boolean showSequenceLogo)
1156 this._showSequenceLogo = showSequenceLogo;
1157 this._has_showSequenceLogo = true;
1161 * Sets the value of field 'showUnconserved'.
1163 * @param showUnconserved
1164 * the value of field 'showUnconserved'.
1166 public void setShowUnconserved(final boolean showUnconserved)
1168 this._showUnconserved = showUnconserved;
1169 this._has_showUnconserved = true;
1173 * Sets the value of field 'start'.
1176 * the value of field 'start'.
1178 public void setStart(final int start)
1180 this._start = start;
1181 this._has_start = true;
1185 * Sets the value of field 'textCol1'.
1188 * the value of field 'textCol1'.
1190 public void setTextCol1(final int textCol1)
1192 this._textCol1 = textCol1;
1193 this._has_textCol1 = true;
1197 * Sets the value of field 'textCol2'.
1200 * the value of field 'textCol2'.
1202 public void setTextCol2(final int textCol2)
1204 this._textCol2 = textCol2;
1205 this._has_textCol2 = true;
1209 * Sets the value of field 'textColThreshold'.
1211 * @param textColThreshold
1212 * the value of field 'textColThreshold'
1214 public void setTextColThreshold(final int textColThreshold)
1216 this._textColThreshold = textColThreshold;
1217 this._has_textColThreshold = true;
1224 * @throws org.exolab.castor.xml.MarshalException
1225 * if object is null or if any SAXException is thrown during
1227 * @throws org.exolab.castor.xml.ValidationException
1228 * if this object is an invalid instance according to the schema
1229 * @return the unmarshaled jalview.schemabinding.version2.JGroup
1231 public static jalview.schemabinding.version2.JGroup unmarshal(
1232 final java.io.Reader reader)
1233 throws org.exolab.castor.xml.MarshalException,
1234 org.exolab.castor.xml.ValidationException
1236 return (jalview.schemabinding.version2.JGroup) Unmarshaller.unmarshal(
1237 jalview.schemabinding.version2.JGroup.class, reader);
1243 * @throws org.exolab.castor.xml.ValidationException
1244 * if this object is an invalid instance according to the schema
1246 public void validate() throws org.exolab.castor.xml.ValidationException
1248 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
1249 validator.validate(this);