2 * This class was automatically generated with
\r
3 * <a href="http://www.castor.org">Castor 0.9.6</a>, using an XML
\r
8 package jalview.schemabinding.version2;
\r
10 //---------------------------------/
\r
11 //- Imported classes and packages -/
\r
12 //---------------------------------/
\r
14 import java.io.IOException;
\r
15 import java.io.Reader;
\r
16 import java.io.Serializable;
\r
17 import java.io.Writer;
\r
18 import java.util.Enumeration;
\r
19 import java.util.Vector;
\r
20 import org.exolab.castor.xml.MarshalException;
\r
21 import org.exolab.castor.xml.Marshaller;
\r
22 import org.exolab.castor.xml.Unmarshaller;
\r
23 import org.exolab.castor.xml.ValidationException;
\r
24 import org.xml.sax.ContentHandler;
\r
29 * @version $Revision$ $Date$
\r
31 public class JGroup implements java.io.Serializable {
\r
34 //--------------------------/
\r
35 //- Class/Member Variables -/
\r
36 //--------------------------/
\r
44 * keeps track of state for field: _start
\r
46 private boolean _has_start;
\r
54 * keeps track of state for field: _end
\r
56 private boolean _has_end;
\r
61 private java.lang.String _name;
\r
66 private java.lang.String _colour;
\r
69 * Field _consThreshold
\r
71 private int _consThreshold;
\r
74 * keeps track of state for field: _consThreshold
\r
76 private boolean _has_consThreshold;
\r
79 * Field _pidThreshold
\r
81 private int _pidThreshold;
\r
84 * keeps track of state for field: _pidThreshold
\r
86 private boolean _has_pidThreshold;
\r
89 * Field _outlineColour
\r
91 private int _outlineColour;
\r
94 * keeps track of state for field: _outlineColour
\r
96 private boolean _has_outlineColour;
\r
99 * Field _displayBoxes
\r
101 private boolean _displayBoxes;
\r
104 * keeps track of state for field: _displayBoxes
\r
106 private boolean _has_displayBoxes;
\r
109 * Field _displayText
\r
111 private boolean _displayText;
\r
114 * keeps track of state for field: _displayText
\r
116 private boolean _has_displayText;
\r
119 * Field _colourText
\r
121 private boolean _colourText;
\r
124 * keeps track of state for field: _colourText
\r
126 private boolean _has_colourText;
\r
131 private int _textCol1;
\r
134 * keeps track of state for field: _textCol1
\r
136 private boolean _has_textCol1;
\r
141 private int _textCol2;
\r
144 * keeps track of state for field: _textCol2
\r
146 private boolean _has_textCol2;
\r
149 * Field _textColThreshold
\r
151 private int _textColThreshold;
\r
154 * keeps track of state for field: _textColThreshold
\r
156 private boolean _has_textColThreshold;
\r
161 private java.util.Vector _seqList;
\r
164 //----------------/
\r
165 //- Constructors -/
\r
166 //----------------/
\r
170 _seqList = new Vector();
\r
171 } //-- jalview.schemabinding.version2.JGroup()
\r
185 public void addSeq(int vSeq)
\r
186 throws java.lang.IndexOutOfBoundsException
\r
188 _seqList.addElement(new java.lang.Integer(vSeq));
\r
189 } //-- void addSeq(int)
\r
199 public void addSeq(int index, int vSeq)
\r
200 throws java.lang.IndexOutOfBoundsException
\r
202 _seqList.insertElementAt(new java.lang.Integer(vSeq), index);
\r
203 } //-- void addSeq(int, int)
\r
206 * Method deleteColourText
\r
209 public void deleteColourText()
\r
211 this._has_colourText= false;
\r
212 } //-- void deleteColourText()
\r
215 * Method deleteConsThreshold
\r
218 public void deleteConsThreshold()
\r
220 this._has_consThreshold= false;
\r
221 } //-- void deleteConsThreshold()
\r
224 * Method deleteDisplayBoxes
\r
227 public void deleteDisplayBoxes()
\r
229 this._has_displayBoxes= false;
\r
230 } //-- void deleteDisplayBoxes()
\r
233 * Method deleteDisplayText
\r
236 public void deleteDisplayText()
\r
238 this._has_displayText= false;
\r
239 } //-- void deleteDisplayText()
\r
245 public void deleteEnd()
\r
247 this._has_end= false;
\r
248 } //-- void deleteEnd()
\r
251 * Method deleteOutlineColour
\r
254 public void deleteOutlineColour()
\r
256 this._has_outlineColour= false;
\r
257 } //-- void deleteOutlineColour()
\r
260 * Method deletePidThreshold
\r
263 public void deletePidThreshold()
\r
265 this._has_pidThreshold= false;
\r
266 } //-- void deletePidThreshold()
\r
269 * Method deleteStart
\r
272 public void deleteStart()
\r
274 this._has_start= false;
\r
275 } //-- void deleteStart()
\r
278 * Method deleteTextCol1
\r
281 public void deleteTextCol1()
\r
283 this._has_textCol1= false;
\r
284 } //-- void deleteTextCol1()
\r
287 * Method deleteTextCol2
\r
290 public void deleteTextCol2()
\r
292 this._has_textCol2= false;
\r
293 } //-- void deleteTextCol2()
\r
296 * Method deleteTextColThreshold
\r
299 public void deleteTextColThreshold()
\r
301 this._has_textColThreshold= false;
\r
302 } //-- void deleteTextColThreshold()
\r
305 * Method enumerateSeq
\r
309 * @return Enumeration
\r
311 public java.util.Enumeration enumerateSeq()
\r
313 return _seqList.elements();
\r
314 } //-- java.util.Enumeration enumerateSeq()
\r
317 * Returns the value of field 'colour'.
\r
320 * @return the value of field 'colour'.
\r
322 public java.lang.String getColour()
\r
324 return this._colour;
\r
325 } //-- java.lang.String getColour()
\r
328 * Returns the value of field 'colourText'.
\r
331 * @return the value of field 'colourText'.
\r
333 public boolean getColourText()
\r
335 return this._colourText;
\r
336 } //-- boolean getColourText()
\r
339 * Returns the value of field 'consThreshold'.
\r
342 * @return the value of field 'consThreshold'.
\r
344 public int getConsThreshold()
\r
346 return this._consThreshold;
\r
347 } //-- int getConsThreshold()
\r
350 * Returns the value of field 'displayBoxes'.
\r
353 * @return the value of field 'displayBoxes'.
\r
355 public boolean getDisplayBoxes()
\r
357 return this._displayBoxes;
\r
358 } //-- boolean getDisplayBoxes()
\r
361 * Returns the value of field 'displayText'.
\r
364 * @return the value of field 'displayText'.
\r
366 public boolean getDisplayText()
\r
368 return this._displayText;
\r
369 } //-- boolean getDisplayText()
\r
372 * Returns the value of field 'end'.
\r
375 * @return the value of field 'end'.
\r
377 public int getEnd()
\r
380 } //-- int getEnd()
\r
383 * Returns the value of field 'name'.
\r
386 * @return the value of field 'name'.
\r
388 public java.lang.String getName()
\r
391 } //-- java.lang.String getName()
\r
394 * Returns the value of field 'outlineColour'.
\r
397 * @return the value of field 'outlineColour'.
\r
399 public int getOutlineColour()
\r
401 return this._outlineColour;
\r
402 } //-- int getOutlineColour()
\r
405 * Returns the value of field 'pidThreshold'.
\r
408 * @return the value of field 'pidThreshold'.
\r
410 public int getPidThreshold()
\r
412 return this._pidThreshold;
\r
413 } //-- int getPidThreshold()
\r
423 public int getSeq(int index)
\r
424 throws java.lang.IndexOutOfBoundsException
\r
426 //-- check bounds for index
\r
427 if ((index < 0) || (index > _seqList.size())) {
\r
428 throw new IndexOutOfBoundsException();
\r
431 return ((java.lang.Integer)_seqList.elementAt(index)).intValue();
\r
432 } //-- int getSeq(int)
\r
441 public int[] getSeq()
\r
443 int size = _seqList.size();
\r
444 int[] mArray = new int[size];
\r
445 for (int index = 0; index < size; index++) {
\r
446 mArray[index] = ((java.lang.Integer)_seqList.elementAt(index)).intValue();
\r
449 } //-- int[] getSeq()
\r
452 * Method getSeqCount
\r
458 public int getSeqCount()
\r
460 return _seqList.size();
\r
461 } //-- int getSeqCount()
\r
464 * Returns the value of field 'start'.
\r
467 * @return the value of field 'start'.
\r
469 public int getStart()
\r
471 return this._start;
\r
472 } //-- int getStart()
\r
475 * Returns the value of field 'textCol1'.
\r
478 * @return the value of field 'textCol1'.
\r
480 public int getTextCol1()
\r
482 return this._textCol1;
\r
483 } //-- int getTextCol1()
\r
486 * Returns the value of field 'textCol2'.
\r
489 * @return the value of field 'textCol2'.
\r
491 public int getTextCol2()
\r
493 return this._textCol2;
\r
494 } //-- int getTextCol2()
\r
497 * Returns the value of field 'textColThreshold'.
\r
500 * @return the value of field 'textColThreshold'.
\r
502 public int getTextColThreshold()
\r
504 return this._textColThreshold;
\r
505 } //-- int getTextColThreshold()
\r
508 * Method hasColourText
\r
514 public boolean hasColourText()
\r
516 return this._has_colourText;
\r
517 } //-- boolean hasColourText()
\r
520 * Method hasConsThreshold
\r
526 public boolean hasConsThreshold()
\r
528 return this._has_consThreshold;
\r
529 } //-- boolean hasConsThreshold()
\r
532 * Method hasDisplayBoxes
\r
538 public boolean hasDisplayBoxes()
\r
540 return this._has_displayBoxes;
\r
541 } //-- boolean hasDisplayBoxes()
\r
544 * Method hasDisplayText
\r
550 public boolean hasDisplayText()
\r
552 return this._has_displayText;
\r
553 } //-- boolean hasDisplayText()
\r
562 public boolean hasEnd()
\r
564 return this._has_end;
\r
565 } //-- boolean hasEnd()
\r
568 * Method hasOutlineColour
\r
574 public boolean hasOutlineColour()
\r
576 return this._has_outlineColour;
\r
577 } //-- boolean hasOutlineColour()
\r
580 * Method hasPidThreshold
\r
586 public boolean hasPidThreshold()
\r
588 return this._has_pidThreshold;
\r
589 } //-- boolean hasPidThreshold()
\r
598 public boolean hasStart()
\r
600 return this._has_start;
\r
601 } //-- boolean hasStart()
\r
604 * Method hasTextCol1
\r
610 public boolean hasTextCol1()
\r
612 return this._has_textCol1;
\r
613 } //-- boolean hasTextCol1()
\r
616 * Method hasTextCol2
\r
622 public boolean hasTextCol2()
\r
624 return this._has_textCol2;
\r
625 } //-- boolean hasTextCol2()
\r
628 * Method hasTextColThreshold
\r
634 public boolean hasTextColThreshold()
\r
636 return this._has_textColThreshold;
\r
637 } //-- boolean hasTextColThreshold()
\r
646 public boolean isValid()
\r
651 catch (org.exolab.castor.xml.ValidationException vex) {
\r
655 } //-- boolean isValid()
\r
664 public void marshal(java.io.Writer out)
\r
665 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
\r
668 Marshaller.marshal(this, out);
\r
669 } //-- void marshal(java.io.Writer)
\r
678 public void marshal(org.xml.sax.ContentHandler handler)
\r
679 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
\r
682 Marshaller.marshal(this, handler);
\r
683 } //-- void marshal(org.xml.sax.ContentHandler)
\r
686 * Method removeAllSeq
\r
689 public void removeAllSeq()
\r
691 _seqList.removeAllElements();
\r
692 } //-- void removeAllSeq()
\r
702 public int removeSeq(int index)
\r
704 java.lang.Object obj = _seqList.elementAt(index);
\r
705 _seqList.removeElementAt(index);
\r
706 return ((java.lang.Integer)obj).intValue();
\r
707 } //-- int removeSeq(int)
\r
710 * Sets the value of field 'colour'.
\r
712 * @param colour the value of field 'colour'.
\r
714 public void setColour(java.lang.String colour)
\r
716 this._colour = colour;
\r
717 } //-- void setColour(java.lang.String)
\r
720 * Sets the value of field 'colourText'.
\r
722 * @param colourText the value of field 'colourText'.
\r
724 public void setColourText(boolean colourText)
\r
726 this._colourText = colourText;
\r
727 this._has_colourText = true;
\r
728 } //-- void setColourText(boolean)
\r
731 * Sets the value of field 'consThreshold'.
\r
733 * @param consThreshold the value of field 'consThreshold'.
\r
735 public void setConsThreshold(int consThreshold)
\r
737 this._consThreshold = consThreshold;
\r
738 this._has_consThreshold = true;
\r
739 } //-- void setConsThreshold(int)
\r
742 * Sets the value of field 'displayBoxes'.
\r
744 * @param displayBoxes the value of field 'displayBoxes'.
\r
746 public void setDisplayBoxes(boolean displayBoxes)
\r
748 this._displayBoxes = displayBoxes;
\r
749 this._has_displayBoxes = true;
\r
750 } //-- void setDisplayBoxes(boolean)
\r
753 * Sets the value of field 'displayText'.
\r
755 * @param displayText the value of field 'displayText'.
\r
757 public void setDisplayText(boolean displayText)
\r
759 this._displayText = displayText;
\r
760 this._has_displayText = true;
\r
761 } //-- void setDisplayText(boolean)
\r
764 * Sets the value of field 'end'.
\r
766 * @param end the value of field 'end'.
\r
768 public void setEnd(int end)
\r
771 this._has_end = true;
\r
772 } //-- void setEnd(int)
\r
775 * Sets the value of field 'name'.
\r
777 * @param name the value of field 'name'.
\r
779 public void setName(java.lang.String name)
\r
782 } //-- void setName(java.lang.String)
\r
785 * Sets the value of field 'outlineColour'.
\r
787 * @param outlineColour the value of field 'outlineColour'.
\r
789 public void setOutlineColour(int outlineColour)
\r
791 this._outlineColour = outlineColour;
\r
792 this._has_outlineColour = true;
\r
793 } //-- void setOutlineColour(int)
\r
796 * Sets the value of field 'pidThreshold'.
\r
798 * @param pidThreshold the value of field 'pidThreshold'.
\r
800 public void setPidThreshold(int pidThreshold)
\r
802 this._pidThreshold = pidThreshold;
\r
803 this._has_pidThreshold = true;
\r
804 } //-- void setPidThreshold(int)
\r
814 public void setSeq(int index, int vSeq)
\r
815 throws java.lang.IndexOutOfBoundsException
\r
817 //-- check bounds for index
\r
818 if ((index < 0) || (index > _seqList.size())) {
\r
819 throw new IndexOutOfBoundsException();
\r
821 _seqList.setElementAt(new java.lang.Integer(vSeq), index);
\r
822 } //-- void setSeq(int, int)
\r
831 public void setSeq(int[] seqArray)
\r
834 _seqList.removeAllElements();
\r
835 for (int i = 0; i < seqArray.length; i++) {
\r
836 _seqList.addElement(new java.lang.Integer(seqArray[i]));
\r
838 } //-- void setSeq(int)
\r
841 * Sets the value of field 'start'.
\r
843 * @param start the value of field 'start'.
\r
845 public void setStart(int start)
\r
847 this._start = start;
\r
848 this._has_start = true;
\r
849 } //-- void setStart(int)
\r
852 * Sets the value of field 'textCol1'.
\r
854 * @param textCol1 the value of field 'textCol1'.
\r
856 public void setTextCol1(int textCol1)
\r
858 this._textCol1 = textCol1;
\r
859 this._has_textCol1 = true;
\r
860 } //-- void setTextCol1(int)
\r
863 * Sets the value of field 'textCol2'.
\r
865 * @param textCol2 the value of field 'textCol2'.
\r
867 public void setTextCol2(int textCol2)
\r
869 this._textCol2 = textCol2;
\r
870 this._has_textCol2 = true;
\r
871 } //-- void setTextCol2(int)
\r
874 * Sets the value of field 'textColThreshold'.
\r
876 * @param textColThreshold the value of field 'textColThreshold'
\r
878 public void setTextColThreshold(int textColThreshold)
\r
880 this._textColThreshold = textColThreshold;
\r
881 this._has_textColThreshold = true;
\r
882 } //-- void setTextColThreshold(int)
\r
892 public static java.lang.Object unmarshal(java.io.Reader reader)
\r
893 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
\r
895 return (jalview.schemabinding.version2.JGroup) Unmarshaller.unmarshal(jalview.schemabinding.version2.JGroup.class, reader);
\r
896 } //-- java.lang.Object unmarshal(java.io.Reader)
\r
902 public void validate()
\r
903 throws org.exolab.castor.xml.ValidationException
\r
905 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
\r
906 validator.validate(this);
\r
907 } //-- void validate()
\r