2 * This class was automatically generated with
\r
3 * <a href="http://www.castor.org">Castor 0.9.6</a>, using an XML
\r
7 package jalview.binding;
\r
9 import org.exolab.castor.xml.MarshalException;
\r
10 import org.exolab.castor.xml.Marshaller;
\r
11 import org.exolab.castor.xml.Unmarshaller;
\r
12 import org.exolab.castor.xml.ValidationException;
\r
14 import org.xml.sax.ContentHandler;
\r
16 //---------------------------------/
\r
17 //- Imported classes and packages -/
\r
18 //---------------------------------/
\r
19 import java.io.IOException;
\r
20 import java.io.Reader;
\r
21 import java.io.Serializable;
\r
22 import java.io.Writer;
\r
24 import java.util.Enumeration;
\r
25 import java.util.Vector;
\r
31 * @version $Revision$ $Date$
\r
33 public class JGroup implements java.io.Serializable
\r
35 //--------------------------/
\r
36 //- Class/Member Variables -/
\r
37 //--------------------------/
\r
45 * keeps track of state for field: _start
\r
47 private boolean _has_start;
\r
55 * keeps track of state for field: _end
\r
57 private boolean _has_end;
\r
62 private java.lang.String _name;
\r
67 private java.lang.String _colour;
\r
70 * Field _consThreshold
\r
72 private int _consThreshold;
\r
75 * keeps track of state for field: _consThreshold
\r
77 private boolean _has_consThreshold;
\r
80 * Field _pidThreshold
\r
82 private int _pidThreshold;
\r
85 * keeps track of state for field: _pidThreshold
\r
87 private boolean _has_pidThreshold;
\r
90 * Field _outlineColour
\r
92 private int _outlineColour;
\r
95 * keeps track of state for field: _outlineColour
\r
97 private boolean _has_outlineColour;
\r
100 * Field _displayBoxes
\r
102 private boolean _displayBoxes;
\r
105 * keeps track of state for field: _displayBoxes
\r
107 private boolean _has_displayBoxes;
\r
110 * Field _displayText
\r
112 private boolean _displayText;
\r
115 * keeps track of state for field: _displayText
\r
117 private boolean _has_displayText;
\r
120 * Field _colourText
\r
122 private boolean _colourText;
\r
125 * keeps track of state for field: _colourText
\r
127 private boolean _has_colourText;
\r
132 private java.util.Vector _seqList;
\r
134 //----------------/
\r
135 //- Constructors -/
\r
136 //----------------/
\r
140 _seqList = new Vector();
\r
143 //-- jalview.binding.JGroup()
\r
149 * @param vSeq DOCUMENT ME!
\r
151 * @throws java.lang.IndexOutOfBoundsException DOCUMENT ME!
\r
153 public void addSeq(int vSeq) throws java.lang.IndexOutOfBoundsException
\r
155 _seqList.addElement(new java.lang.Integer(vSeq));
\r
158 //-- void addSeq(int)
\r
168 public void addSeq(int index, int vSeq)
\r
169 throws java.lang.IndexOutOfBoundsException
\r
171 _seqList.insertElementAt(new java.lang.Integer(vSeq), index);
\r
174 //-- void addSeq(int, int)
\r
177 * Method deleteColourText
\r
180 public void deleteColourText()
\r
182 this._has_colourText = false;
\r
185 //-- void deleteColourText()
\r
188 * Method deleteConsThreshold
\r
191 public void deleteConsThreshold()
\r
193 this._has_consThreshold = false;
\r
196 //-- void deleteConsThreshold()
\r
199 * Method deleteDisplayBoxes
\r
202 public void deleteDisplayBoxes()
\r
204 this._has_displayBoxes = false;
\r
207 //-- void deleteDisplayBoxes()
\r
210 * Method deleteDisplayText
\r
213 public void deleteDisplayText()
\r
215 this._has_displayText = false;
\r
218 //-- void deleteDisplayText()
\r
224 public void deleteEnd()
\r
226 this._has_end = false;
\r
229 //-- void deleteEnd()
\r
232 * Method deleteOutlineColour
\r
235 public void deleteOutlineColour()
\r
237 this._has_outlineColour = false;
\r
240 //-- void deleteOutlineColour()
\r
243 * Method deletePidThreshold
\r
246 public void deletePidThreshold()
\r
248 this._has_pidThreshold = false;
\r
251 //-- void deletePidThreshold()
\r
254 * Method deleteStart
\r
257 public void deleteStart()
\r
259 this._has_start = false;
\r
262 //-- void deleteStart()
\r
265 * Method enumerateSeq
\r
269 * @return Enumeration
\r
271 public java.util.Enumeration enumerateSeq()
\r
273 return _seqList.elements();
\r
276 //-- java.util.Enumeration enumerateSeq()
\r
279 * Returns the value of field 'colour'.
\r
282 * @return the value of field 'colour'.
\r
284 public java.lang.String getColour()
\r
286 return this._colour;
\r
289 //-- java.lang.String getColour()
\r
292 * Returns the value of field 'colourText'.
\r
295 * @return the value of field 'colourText'.
\r
297 public boolean getColourText()
\r
299 return this._colourText;
\r
302 //-- boolean getColourText()
\r
305 * Returns the value of field 'consThreshold'.
\r
308 * @return the value of field 'consThreshold'.
\r
310 public int getConsThreshold()
\r
312 return this._consThreshold;
\r
315 //-- int getConsThreshold()
\r
318 * Returns the value of field 'displayBoxes'.
\r
321 * @return the value of field 'displayBoxes'.
\r
323 public boolean getDisplayBoxes()
\r
325 return this._displayBoxes;
\r
328 //-- boolean getDisplayBoxes()
\r
331 * Returns the value of field 'displayText'.
\r
334 * @return the value of field 'displayText'.
\r
336 public boolean getDisplayText()
\r
338 return this._displayText;
\r
341 //-- boolean getDisplayText()
\r
344 * Returns the value of field 'end'.
\r
347 * @return the value of field 'end'.
\r
349 public int getEnd()
\r
357 * Returns the value of field 'name'.
\r
360 * @return the value of field 'name'.
\r
362 public java.lang.String getName()
\r
367 //-- java.lang.String getName()
\r
370 * Returns the value of field 'outlineColour'.
\r
373 * @return the value of field 'outlineColour'.
\r
375 public int getOutlineColour()
\r
377 return this._outlineColour;
\r
380 //-- int getOutlineColour()
\r
383 * Returns the value of field 'pidThreshold'.
\r
386 * @return the value of field 'pidThreshold'.
\r
388 public int getPidThreshold()
\r
390 return this._pidThreshold;
\r
393 //-- int getPidThreshold()
\r
403 public int getSeq(int index) throws java.lang.IndexOutOfBoundsException
\r
405 //-- check bounds for index
\r
406 if ((index < 0) || (index > _seqList.size()))
\r
408 throw new IndexOutOfBoundsException();
\r
411 return ((java.lang.Integer) _seqList.elementAt(index)).intValue();
\r
414 //-- int getSeq(int)
\r
423 public int[] getSeq()
\r
425 int size = _seqList.size();
\r
426 int[] mArray = new int[size];
\r
428 for (int index = 0; index < size; index++)
\r
430 mArray[index] = ((java.lang.Integer) _seqList.elementAt(index)).intValue();
\r
436 //-- int[] getSeq()
\r
439 * Method getSeqCount
\r
445 public int getSeqCount()
\r
447 return _seqList.size();
\r
450 //-- int getSeqCount()
\r
453 * Returns the value of field 'start'.
\r
456 * @return the value of field 'start'.
\r
458 public int getStart()
\r
460 return this._start;
\r
463 //-- int getStart()
\r
466 * Method hasColourText
\r
472 public boolean hasColourText()
\r
474 return this._has_colourText;
\r
477 //-- boolean hasColourText()
\r
480 * Method hasConsThreshold
\r
486 public boolean hasConsThreshold()
\r
488 return this._has_consThreshold;
\r
491 //-- boolean hasConsThreshold()
\r
494 * Method hasDisplayBoxes
\r
500 public boolean hasDisplayBoxes()
\r
502 return this._has_displayBoxes;
\r
505 //-- boolean hasDisplayBoxes()
\r
508 * Method hasDisplayText
\r
514 public boolean hasDisplayText()
\r
516 return this._has_displayText;
\r
519 //-- boolean hasDisplayText()
\r
528 public boolean hasEnd()
\r
530 return this._has_end;
\r
533 //-- boolean hasEnd()
\r
536 * Method hasOutlineColour
\r
542 public boolean hasOutlineColour()
\r
544 return this._has_outlineColour;
\r
547 //-- boolean hasOutlineColour()
\r
550 * Method hasPidThreshold
\r
556 public boolean hasPidThreshold()
\r
558 return this._has_pidThreshold;
\r
561 //-- boolean hasPidThreshold()
\r
570 public boolean hasStart()
\r
572 return this._has_start;
\r
575 //-- boolean hasStart()
\r
584 public boolean isValid()
\r
590 catch (org.exolab.castor.xml.ValidationException vex)
\r
598 //-- boolean isValid()
\r
607 public void marshal(java.io.Writer out)
\r
608 throws org.exolab.castor.xml.MarshalException,
\r
609 org.exolab.castor.xml.ValidationException
\r
611 Marshaller.marshal(this, out);
\r
614 //-- void marshal(java.io.Writer)
\r
623 public void marshal(org.xml.sax.ContentHandler handler)
\r
624 throws java.io.IOException, org.exolab.castor.xml.MarshalException,
\r
625 org.exolab.castor.xml.ValidationException
\r
627 Marshaller.marshal(this, handler);
\r
630 //-- void marshal(org.xml.sax.ContentHandler)
\r
633 * Method removeAllSeq
\r
636 public void removeAllSeq()
\r
638 _seqList.removeAllElements();
\r
641 //-- void removeAllSeq()
\r
651 public int removeSeq(int index)
\r
653 java.lang.Object obj = _seqList.elementAt(index);
\r
654 _seqList.removeElementAt(index);
\r
656 return ((java.lang.Integer) obj).intValue();
\r
659 //-- int removeSeq(int)
\r
662 * Sets the value of field 'colour'.
\r
664 * @param colour the value of field 'colour'.
\r
666 public void setColour(java.lang.String colour)
\r
668 this._colour = colour;
\r
671 //-- void setColour(java.lang.String)
\r
674 * Sets the value of field 'colourText'.
\r
676 * @param colourText the value of field 'colourText'.
\r
678 public void setColourText(boolean colourText)
\r
680 this._colourText = colourText;
\r
681 this._has_colourText = true;
\r
684 //-- void setColourText(boolean)
\r
687 * Sets the value of field 'consThreshold'.
\r
689 * @param consThreshold the value of field 'consThreshold'.
\r
691 public void setConsThreshold(int consThreshold)
\r
693 this._consThreshold = consThreshold;
\r
694 this._has_consThreshold = true;
\r
697 //-- void setConsThreshold(int)
\r
700 * Sets the value of field 'displayBoxes'.
\r
702 * @param displayBoxes the value of field 'displayBoxes'.
\r
704 public void setDisplayBoxes(boolean displayBoxes)
\r
706 this._displayBoxes = displayBoxes;
\r
707 this._has_displayBoxes = true;
\r
710 //-- void setDisplayBoxes(boolean)
\r
713 * Sets the value of field 'displayText'.
\r
715 * @param displayText the value of field 'displayText'.
\r
717 public void setDisplayText(boolean displayText)
\r
719 this._displayText = displayText;
\r
720 this._has_displayText = true;
\r
723 //-- void setDisplayText(boolean)
\r
726 * Sets the value of field 'end'.
\r
728 * @param end the value of field 'end'.
\r
730 public void setEnd(int end)
\r
733 this._has_end = true;
\r
736 //-- void setEnd(int)
\r
739 * Sets the value of field 'name'.
\r
741 * @param name the value of field 'name'.
\r
743 public void setName(java.lang.String name)
\r
748 //-- void setName(java.lang.String)
\r
751 * Sets the value of field 'outlineColour'.
\r
753 * @param outlineColour the value of field 'outlineColour'.
\r
755 public void setOutlineColour(int outlineColour)
\r
757 this._outlineColour = outlineColour;
\r
758 this._has_outlineColour = true;
\r
761 //-- void setOutlineColour(int)
\r
764 * Sets the value of field 'pidThreshold'.
\r
766 * @param pidThreshold the value of field 'pidThreshold'.
\r
768 public void setPidThreshold(int pidThreshold)
\r
770 this._pidThreshold = pidThreshold;
\r
771 this._has_pidThreshold = true;
\r
774 //-- void setPidThreshold(int)
\r
784 public void setSeq(int index, int vSeq)
\r
785 throws java.lang.IndexOutOfBoundsException
\r
787 //-- check bounds for index
\r
788 if ((index < 0) || (index > _seqList.size()))
\r
790 throw new IndexOutOfBoundsException();
\r
793 _seqList.setElementAt(new java.lang.Integer(vSeq), index);
\r
796 //-- void setSeq(int, int)
\r
805 public void setSeq(int[] seqArray)
\r
808 _seqList.removeAllElements();
\r
810 for (int i = 0; i < seqArray.length; i++)
\r
812 _seqList.addElement(new java.lang.Integer(seqArray[i]));
\r
816 //-- void setSeq(int)
\r
819 * Sets the value of field 'start'.
\r
821 * @param start the value of field 'start'.
\r
823 public void setStart(int start)
\r
825 this._start = start;
\r
826 this._has_start = true;
\r
829 //-- void setStart(int)
\r
839 public static java.lang.Object unmarshal(java.io.Reader reader)
\r
840 throws org.exolab.castor.xml.MarshalException,
\r
841 org.exolab.castor.xml.ValidationException
\r
843 return (jalview.binding.JGroup) Unmarshaller.unmarshal(jalview.binding.JGroup.class,
\r
847 //-- java.lang.Object unmarshal(java.io.Reader)
\r
853 public void validate() throws org.exolab.castor.xml.ValidationException
\r
855 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
\r
856 validator.validate(this);
\r
859 //-- void validate()
\r