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;
230 * Field _annotationColours.
232 private jalview.schemabinding.version2.AnnotationColours _annotationColours;
241 this._seqList = new java.util.Vector();
252 * @throws java.lang.IndexOutOfBoundsException
253 * if the index given is outside the bounds of the collection
255 public void addSeq(final java.lang.String vSeq)
256 throws java.lang.IndexOutOfBoundsException
258 this._seqList.addElement(vSeq);
266 * @throws java.lang.IndexOutOfBoundsException
267 * if the index given is outside the bounds of the collection
269 public void addSeq(final int index, final java.lang.String vSeq)
270 throws java.lang.IndexOutOfBoundsException
272 this._seqList.add(index, vSeq);
277 public void deleteColourText()
279 this._has_colourText = false;
284 public void deleteConsThreshold()
286 this._has_consThreshold = false;
291 public void deleteDisplayBoxes()
293 this._has_displayBoxes = false;
298 public void deleteDisplayText()
300 this._has_displayText = false;
305 public void deleteEnd()
307 this._has_end = false;
312 public void deleteIgnoreGapsinConsensus()
314 this._has_ignoreGapsinConsensus = false;
319 public void deleteNormaliseSequenceLogo()
321 this._has_normaliseSequenceLogo = false;
326 public void deleteOutlineColour()
328 this._has_outlineColour = false;
333 public void deletePidThreshold()
335 this._has_pidThreshold = false;
340 public void deleteShowConsensusHistogram()
342 this._has_showConsensusHistogram = false;
347 public void deleteShowSequenceLogo()
349 this._has_showSequenceLogo = false;
354 public void deleteShowUnconserved()
356 this._has_showUnconserved = false;
361 public void deleteStart()
363 this._has_start = false;
368 public void deleteTextCol1()
370 this._has_textCol1 = false;
375 public void deleteTextCol2()
377 this._has_textCol2 = false;
382 public void deleteTextColThreshold()
384 this._has_textColThreshold = false;
388 * Method enumerateSeq.
390 * @return an Enumeration over all java.lang.String elements
392 public java.util.Enumeration enumerateSeq()
394 return this._seqList.elements();
398 * Returns the value of field 'annotationColours'.
400 * @return the value of field 'AnnotationColours'.
402 public jalview.schemabinding.version2.AnnotationColours getAnnotationColours()
404 return this._annotationColours;
408 * Returns the value of field 'colour'.
410 * @return the value of field 'Colour'.
412 public java.lang.String getColour()
418 * Returns the value of field 'colourText'.
420 * @return the value of field 'ColourText'.
422 public boolean getColourText()
424 return this._colourText;
428 * Returns the value of field 'consThreshold'.
430 * @return the value of field 'ConsThreshold'.
432 public int getConsThreshold()
434 return this._consThreshold;
438 * Returns the value of field 'displayBoxes'.
440 * @return the value of field 'DisplayBoxes'.
442 public boolean getDisplayBoxes()
444 return this._displayBoxes;
448 * Returns the value of field 'displayText'.
450 * @return the value of field 'DisplayText'.
452 public boolean getDisplayText()
454 return this._displayText;
458 * Returns the value of field 'end'.
460 * @return the value of field 'End'.
468 * Returns the value of field 'id'. The field 'id' has the following
469 * description: Optional sequence group ID (only needs to be unique for this
473 * @return the value of field 'Id'.
475 public java.lang.String getId()
481 * Returns the value of field 'ignoreGapsinConsensus'.
483 * @return the value of field 'IgnoreGapsinConsensus'.
485 public boolean getIgnoreGapsinConsensus()
487 return this._ignoreGapsinConsensus;
491 * Returns the value of field 'name'.
493 * @return the value of field 'Name'.
495 public java.lang.String getName()
501 * Returns the value of field 'normaliseSequenceLogo'.
503 * @return the value of field 'NormaliseSequenceLogo'.
505 public boolean getNormaliseSequenceLogo()
507 return this._normaliseSequenceLogo;
511 * Returns the value of field 'outlineColour'.
513 * @return the value of field 'OutlineColour'.
515 public int getOutlineColour()
517 return this._outlineColour;
521 * Returns the value of field 'pidThreshold'.
523 * @return the value of field 'PidThreshold'.
525 public int getPidThreshold()
527 return this._pidThreshold;
534 * @throws java.lang.IndexOutOfBoundsException
535 * if the index given is outside the bounds of the collection
536 * @return the value of the java.lang.String at the given index
538 public java.lang.String getSeq(final int index)
539 throws java.lang.IndexOutOfBoundsException
541 // check bounds for index
542 if (index < 0 || index >= this._seqList.size())
544 throw new IndexOutOfBoundsException("getSeq: Index value '" + index
545 + "' not in range [0.." + (this._seqList.size() - 1) + "]");
548 return (java.lang.String) _seqList.get(index);
552 * Method getSeq.Returns the contents of the collection in an Array.
554 * Note: Just in case the collection contents are changing in another thread,
555 * we pass a 0-length Array of the correct type into the API call. This way we
556 * <i>know</i> that the Array returned is of exactly the correct length.
558 * @return this collection as an Array
560 public java.lang.String[] getSeq()
562 java.lang.String[] array = new java.lang.String[0];
563 return (java.lang.String[]) this._seqList.toArray(array);
567 * Method getSeqCount.
569 * @return the size of this collection
571 public int getSeqCount()
573 return this._seqList.size();
577 * Returns the value of field 'showConsensusHistogram'.
579 * @return the value of field 'ShowConsensusHistogram'.
581 public boolean getShowConsensusHistogram()
583 return this._showConsensusHistogram;
587 * Returns the value of field 'showSequenceLogo'.
589 * @return the value of field 'ShowSequenceLogo'.
591 public boolean getShowSequenceLogo()
593 return this._showSequenceLogo;
597 * Returns the value of field 'showUnconserved'.
599 * @return the value of field 'ShowUnconserved'.
601 public boolean getShowUnconserved()
603 return this._showUnconserved;
607 * Returns the value of field 'start'.
609 * @return the value of field 'Start'.
611 public int getStart()
617 * Returns the value of field 'textCol1'.
619 * @return the value of field 'TextCol1'.
621 public int getTextCol1()
623 return this._textCol1;
627 * Returns the value of field 'textCol2'.
629 * @return the value of field 'TextCol2'.
631 public int getTextCol2()
633 return this._textCol2;
637 * Returns the value of field 'textColThreshold'.
639 * @return the value of field 'TextColThreshold'.
641 public int getTextColThreshold()
643 return this._textColThreshold;
647 * Method hasColourText.
649 * @return true if at least one ColourText has been added
651 public boolean hasColourText()
653 return this._has_colourText;
657 * Method hasConsThreshold.
659 * @return true if at least one ConsThreshold has been added
661 public boolean hasConsThreshold()
663 return this._has_consThreshold;
667 * Method hasDisplayBoxes.
669 * @return true if at least one DisplayBoxes has been added
671 public boolean hasDisplayBoxes()
673 return this._has_displayBoxes;
677 * Method hasDisplayText.
679 * @return true if at least one DisplayText has been added
681 public boolean hasDisplayText()
683 return this._has_displayText;
689 * @return true if at least one End has been added
691 public boolean hasEnd()
693 return this._has_end;
697 * Method hasIgnoreGapsinConsensus.
699 * @return true if at least one IgnoreGapsinConsensus has been added
701 public boolean hasIgnoreGapsinConsensus()
703 return this._has_ignoreGapsinConsensus;
707 * Method hasNormaliseSequenceLogo.
709 * @return true if at least one NormaliseSequenceLogo has been added
711 public boolean hasNormaliseSequenceLogo()
713 return this._has_normaliseSequenceLogo;
717 * Method hasOutlineColour.
719 * @return true if at least one OutlineColour has been added
721 public boolean hasOutlineColour()
723 return this._has_outlineColour;
727 * Method hasPidThreshold.
729 * @return true if at least one PidThreshold has been added
731 public boolean hasPidThreshold()
733 return this._has_pidThreshold;
737 * Method hasShowConsensusHistogram.
739 * @return true if at least one ShowConsensusHistogram has been added
741 public boolean hasShowConsensusHistogram()
743 return this._has_showConsensusHistogram;
747 * Method hasShowSequenceLogo.
749 * @return true if at least one ShowSequenceLogo has been added
751 public boolean hasShowSequenceLogo()
753 return this._has_showSequenceLogo;
757 * Method hasShowUnconserved.
759 * @return true if at least one ShowUnconserved has been added
761 public boolean hasShowUnconserved()
763 return this._has_showUnconserved;
769 * @return true if at least one Start has been added
771 public boolean hasStart()
773 return this._has_start;
777 * Method hasTextCol1.
779 * @return true if at least one TextCol1 has been added
781 public boolean hasTextCol1()
783 return this._has_textCol1;
787 * Method hasTextCol2.
789 * @return true if at least one TextCol2 has been added
791 public boolean hasTextCol2()
793 return this._has_textCol2;
797 * Method hasTextColThreshold.
799 * @return true if at least one TextColThreshold has been added
801 public boolean hasTextColThreshold()
803 return this._has_textColThreshold;
807 * Returns the value of field 'colourText'.
809 * @return the value of field 'ColourText'.
811 public boolean isColourText()
813 return this._colourText;
817 * Returns the value of field 'displayBoxes'.
819 * @return the value of field 'DisplayBoxes'.
821 public boolean isDisplayBoxes()
823 return this._displayBoxes;
827 * Returns the value of field 'displayText'.
829 * @return the value of field 'DisplayText'.
831 public boolean isDisplayText()
833 return this._displayText;
837 * Returns the value of field 'ignoreGapsinConsensus'.
839 * @return the value of field 'IgnoreGapsinConsensus'.
841 public boolean isIgnoreGapsinConsensus()
843 return this._ignoreGapsinConsensus;
847 * Returns the value of field 'normaliseSequenceLogo'.
849 * @return the value of field 'NormaliseSequenceLogo'.
851 public boolean isNormaliseSequenceLogo()
853 return this._normaliseSequenceLogo;
857 * Returns the value of field 'showConsensusHistogram'.
859 * @return the value of field 'ShowConsensusHistogram'.
861 public boolean isShowConsensusHistogram()
863 return this._showConsensusHistogram;
867 * Returns the value of field 'showSequenceLogo'.
869 * @return the value of field 'ShowSequenceLogo'.
871 public boolean isShowSequenceLogo()
873 return this._showSequenceLogo;
877 * Returns the value of field 'showUnconserved'.
879 * @return the value of field 'ShowUnconserved'.
881 public boolean isShowUnconserved()
883 return this._showUnconserved;
889 * @return true if this object is valid according to the schema
891 public boolean isValid()
896 } catch (org.exolab.castor.xml.ValidationException vex)
907 * @throws org.exolab.castor.xml.MarshalException
908 * if object is null or if any SAXException is thrown during
910 * @throws org.exolab.castor.xml.ValidationException
911 * if this object is an invalid instance according to the schema
913 public void marshal(final java.io.Writer out)
914 throws org.exolab.castor.xml.MarshalException,
915 org.exolab.castor.xml.ValidationException
917 Marshaller.marshal(this, out);
924 * @throws java.io.IOException
925 * if an IOException occurs during marshaling
926 * @throws org.exolab.castor.xml.ValidationException
927 * if this object is an invalid instance according to the schema
928 * @throws org.exolab.castor.xml.MarshalException
929 * if object is null or if any SAXException is thrown during
932 public void marshal(final org.xml.sax.ContentHandler handler)
933 throws java.io.IOException,
934 org.exolab.castor.xml.MarshalException,
935 org.exolab.castor.xml.ValidationException
937 Marshaller.marshal(this, handler);
942 public void removeAllSeq()
944 this._seqList.clear();
951 * @return true if the object was removed from the collection.
953 public boolean removeSeq(final java.lang.String vSeq)
955 boolean removed = _seqList.remove(vSeq);
960 * Method removeSeqAt.
963 * @return the element removed from the collection
965 public java.lang.String removeSeqAt(final int index)
967 java.lang.Object obj = this._seqList.remove(index);
968 return (java.lang.String) obj;
972 * Sets the value of field 'annotationColours'.
974 * @param annotationColours
975 * the value of field 'annotationColours'.
977 public void setAnnotationColours(
978 final jalview.schemabinding.version2.AnnotationColours annotationColours)
980 this._annotationColours = annotationColours;
984 * Sets the value of field 'colour'.
987 * the value of field 'colour'.
989 public void setColour(final java.lang.String colour)
991 this._colour = colour;
995 * Sets the value of field 'colourText'.
998 * the value of field 'colourText'.
1000 public void setColourText(final boolean colourText)
1002 this._colourText = colourText;
1003 this._has_colourText = true;
1007 * Sets the value of field 'consThreshold'.
1009 * @param consThreshold
1010 * the value of field 'consThreshold'.
1012 public void setConsThreshold(final int consThreshold)
1014 this._consThreshold = consThreshold;
1015 this._has_consThreshold = true;
1019 * Sets the value of field 'displayBoxes'.
1021 * @param displayBoxes
1022 * the value of field 'displayBoxes'.
1024 public void setDisplayBoxes(final boolean displayBoxes)
1026 this._displayBoxes = displayBoxes;
1027 this._has_displayBoxes = true;
1031 * Sets the value of field 'displayText'.
1033 * @param displayText
1034 * the value of field 'displayText'.
1036 public void setDisplayText(final boolean displayText)
1038 this._displayText = displayText;
1039 this._has_displayText = true;
1043 * Sets the value of field 'end'.
1046 * the value of field 'end'.
1048 public void setEnd(final int end)
1051 this._has_end = true;
1055 * Sets the value of field 'id'. The field 'id' has the following description:
1056 * Optional sequence group ID (only needs to be unique for this alignment)
1060 * the value of field 'id'.
1062 public void setId(final java.lang.String id)
1068 * Sets the value of field 'ignoreGapsinConsensus'.
1070 * @param ignoreGapsinConsensus
1071 * the value of field 'ignoreGapsinConsensus'.
1073 public void setIgnoreGapsinConsensus(final boolean ignoreGapsinConsensus)
1075 this._ignoreGapsinConsensus = ignoreGapsinConsensus;
1076 this._has_ignoreGapsinConsensus = true;
1080 * Sets the value of field 'name'.
1083 * the value of field 'name'.
1085 public void setName(final java.lang.String name)
1091 * Sets the value of field 'normaliseSequenceLogo'.
1093 * @param normaliseSequenceLogo
1094 * the value of field 'normaliseSequenceLogo'.
1096 public void setNormaliseSequenceLogo(final boolean normaliseSequenceLogo)
1098 this._normaliseSequenceLogo = normaliseSequenceLogo;
1099 this._has_normaliseSequenceLogo = true;
1103 * Sets the value of field 'outlineColour'.
1105 * @param outlineColour
1106 * the value of field 'outlineColour'.
1108 public void setOutlineColour(final int outlineColour)
1110 this._outlineColour = outlineColour;
1111 this._has_outlineColour = true;
1115 * Sets the value of field 'pidThreshold'.
1117 * @param pidThreshold
1118 * the value of field 'pidThreshold'.
1120 public void setPidThreshold(final int pidThreshold)
1122 this._pidThreshold = pidThreshold;
1123 this._has_pidThreshold = true;
1131 * @throws java.lang.IndexOutOfBoundsException
1132 * if the index given is outside the bounds of the collection
1134 public void setSeq(final int index, final java.lang.String vSeq)
1135 throws java.lang.IndexOutOfBoundsException
1137 // check bounds for index
1138 if (index < 0 || index >= this._seqList.size())
1140 throw new IndexOutOfBoundsException("setSeq: Index value '" + index
1141 + "' not in range [0.." + (this._seqList.size() - 1) + "]");
1144 this._seqList.set(index, vSeq);
1152 public void setSeq(final java.lang.String[] vSeqArray)
1157 for (int i = 0; i < vSeqArray.length; i++)
1159 this._seqList.add(vSeqArray[i]);
1164 * Sets the value of field 'showConsensusHistogram'.
1166 * @param showConsensusHistogram
1167 * the value of field 'showConsensusHistogram'.
1169 public void setShowConsensusHistogram(final boolean showConsensusHistogram)
1171 this._showConsensusHistogram = showConsensusHistogram;
1172 this._has_showConsensusHistogram = true;
1176 * Sets the value of field 'showSequenceLogo'.
1178 * @param showSequenceLogo
1179 * the value of field 'showSequenceLogo'
1181 public void setShowSequenceLogo(final boolean showSequenceLogo)
1183 this._showSequenceLogo = showSequenceLogo;
1184 this._has_showSequenceLogo = true;
1188 * Sets the value of field 'showUnconserved'.
1190 * @param showUnconserved
1191 * the value of field 'showUnconserved'.
1193 public void setShowUnconserved(final boolean showUnconserved)
1195 this._showUnconserved = showUnconserved;
1196 this._has_showUnconserved = true;
1200 * Sets the value of field 'start'.
1203 * the value of field 'start'.
1205 public void setStart(final int start)
1207 this._start = start;
1208 this._has_start = true;
1212 * Sets the value of field 'textCol1'.
1215 * the value of field 'textCol1'.
1217 public void setTextCol1(final int textCol1)
1219 this._textCol1 = textCol1;
1220 this._has_textCol1 = true;
1224 * Sets the value of field 'textCol2'.
1227 * the value of field 'textCol2'.
1229 public void setTextCol2(final int textCol2)
1231 this._textCol2 = textCol2;
1232 this._has_textCol2 = true;
1236 * Sets the value of field 'textColThreshold'.
1238 * @param textColThreshold
1239 * the value of field 'textColThreshold'
1241 public void setTextColThreshold(final int textColThreshold)
1243 this._textColThreshold = textColThreshold;
1244 this._has_textColThreshold = true;
1251 * @throws org.exolab.castor.xml.MarshalException
1252 * if object is null or if any SAXException is thrown during
1254 * @throws org.exolab.castor.xml.ValidationException
1255 * if this object is an invalid instance according to the schema
1256 * @return the unmarshaled jalview.schemabinding.version2.JGroup
1258 public static jalview.schemabinding.version2.JGroup unmarshal(
1259 final java.io.Reader reader)
1260 throws org.exolab.castor.xml.MarshalException,
1261 org.exolab.castor.xml.ValidationException
1263 return (jalview.schemabinding.version2.JGroup) Unmarshaller.unmarshal(
1264 jalview.schemabinding.version2.JGroup.class, reader);
1270 * @throws org.exolab.castor.xml.ValidationException
1271 * if this object is an invalid instance according to the schema
1273 public void validate() throws org.exolab.castor.xml.ValidationException
1275 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
1276 validator.validate(this);