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.binding;
\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 java.util.Vector _seqList;
\r
134 //----------------/
\r
135 //- Constructors -/
\r
136 //----------------/
\r
140 _seqList = new Vector();
\r
141 } //-- jalview.binding.JGroup()
\r
155 public void addSeq(int vSeq)
\r
156 throws java.lang.IndexOutOfBoundsException
\r
158 _seqList.addElement(new java.lang.Integer(vSeq));
\r
159 } //-- void addSeq(int)
\r
169 public void addSeq(int index, int vSeq)
\r
170 throws java.lang.IndexOutOfBoundsException
\r
172 _seqList.insertElementAt(new java.lang.Integer(vSeq), index);
\r
173 } //-- void addSeq(int, int)
\r
176 * Method deleteColourText
\r
179 public void deleteColourText()
\r
181 this._has_colourText= false;
\r
182 } //-- void deleteColourText()
\r
185 * Method deleteConsThreshold
\r
188 public void deleteConsThreshold()
\r
190 this._has_consThreshold= false;
\r
191 } //-- void deleteConsThreshold()
\r
194 * Method deleteDisplayBoxes
\r
197 public void deleteDisplayBoxes()
\r
199 this._has_displayBoxes= false;
\r
200 } //-- void deleteDisplayBoxes()
\r
203 * Method deleteDisplayText
\r
206 public void deleteDisplayText()
\r
208 this._has_displayText= false;
\r
209 } //-- void deleteDisplayText()
\r
215 public void deleteEnd()
\r
217 this._has_end= false;
\r
218 } //-- void deleteEnd()
\r
221 * Method deleteOutlineColour
\r
224 public void deleteOutlineColour()
\r
226 this._has_outlineColour= false;
\r
227 } //-- void deleteOutlineColour()
\r
230 * Method deletePidThreshold
\r
233 public void deletePidThreshold()
\r
235 this._has_pidThreshold= false;
\r
236 } //-- void deletePidThreshold()
\r
239 * Method deleteStart
\r
242 public void deleteStart()
\r
244 this._has_start= false;
\r
245 } //-- void deleteStart()
\r
248 * Method enumerateSeq
\r
252 * @return Enumeration
\r
254 public java.util.Enumeration enumerateSeq()
\r
256 return _seqList.elements();
\r
257 } //-- java.util.Enumeration enumerateSeq()
\r
260 * Returns the value of field 'colour'.
\r
263 * @return the value of field 'colour'.
\r
265 public java.lang.String getColour()
\r
267 return this._colour;
\r
268 } //-- java.lang.String getColour()
\r
271 * Returns the value of field 'colourText'.
\r
274 * @return the value of field 'colourText'.
\r
276 public boolean getColourText()
\r
278 return this._colourText;
\r
279 } //-- boolean getColourText()
\r
282 * Returns the value of field 'consThreshold'.
\r
285 * @return the value of field 'consThreshold'.
\r
287 public int getConsThreshold()
\r
289 return this._consThreshold;
\r
290 } //-- int getConsThreshold()
\r
293 * Returns the value of field 'displayBoxes'.
\r
296 * @return the value of field 'displayBoxes'.
\r
298 public boolean getDisplayBoxes()
\r
300 return this._displayBoxes;
\r
301 } //-- boolean getDisplayBoxes()
\r
304 * Returns the value of field 'displayText'.
\r
307 * @return the value of field 'displayText'.
\r
309 public boolean getDisplayText()
\r
311 return this._displayText;
\r
312 } //-- boolean getDisplayText()
\r
315 * Returns the value of field 'end'.
\r
318 * @return the value of field 'end'.
\r
320 public int getEnd()
\r
323 } //-- int getEnd()
\r
326 * Returns the value of field 'name'.
\r
329 * @return the value of field 'name'.
\r
331 public java.lang.String getName()
\r
334 } //-- java.lang.String getName()
\r
337 * Returns the value of field 'outlineColour'.
\r
340 * @return the value of field 'outlineColour'.
\r
342 public int getOutlineColour()
\r
344 return this._outlineColour;
\r
345 } //-- int getOutlineColour()
\r
348 * Returns the value of field 'pidThreshold'.
\r
351 * @return the value of field 'pidThreshold'.
\r
353 public int getPidThreshold()
\r
355 return this._pidThreshold;
\r
356 } //-- int getPidThreshold()
\r
366 public int getSeq(int index)
\r
367 throws java.lang.IndexOutOfBoundsException
\r
369 //-- check bounds for index
\r
370 if ((index < 0) || (index > _seqList.size())) {
\r
371 throw new IndexOutOfBoundsException();
\r
374 return ((java.lang.Integer)_seqList.elementAt(index)).intValue();
\r
375 } //-- int getSeq(int)
\r
384 public int[] getSeq()
\r
386 int size = _seqList.size();
\r
387 int[] mArray = new int[size];
\r
388 for (int index = 0; index < size; index++) {
\r
389 mArray[index] = ((java.lang.Integer)_seqList.elementAt(index)).intValue();
\r
392 } //-- int[] getSeq()
\r
395 * Method getSeqCount
\r
401 public int getSeqCount()
\r
403 return _seqList.size();
\r
404 } //-- int getSeqCount()
\r
407 * Returns the value of field 'start'.
\r
410 * @return the value of field 'start'.
\r
412 public int getStart()
\r
414 return this._start;
\r
415 } //-- int getStart()
\r
418 * Method hasColourText
\r
424 public boolean hasColourText()
\r
426 return this._has_colourText;
\r
427 } //-- boolean hasColourText()
\r
430 * Method hasConsThreshold
\r
436 public boolean hasConsThreshold()
\r
438 return this._has_consThreshold;
\r
439 } //-- boolean hasConsThreshold()
\r
442 * Method hasDisplayBoxes
\r
448 public boolean hasDisplayBoxes()
\r
450 return this._has_displayBoxes;
\r
451 } //-- boolean hasDisplayBoxes()
\r
454 * Method hasDisplayText
\r
460 public boolean hasDisplayText()
\r
462 return this._has_displayText;
\r
463 } //-- boolean hasDisplayText()
\r
472 public boolean hasEnd()
\r
474 return this._has_end;
\r
475 } //-- boolean hasEnd()
\r
478 * Method hasOutlineColour
\r
484 public boolean hasOutlineColour()
\r
486 return this._has_outlineColour;
\r
487 } //-- boolean hasOutlineColour()
\r
490 * Method hasPidThreshold
\r
496 public boolean hasPidThreshold()
\r
498 return this._has_pidThreshold;
\r
499 } //-- boolean hasPidThreshold()
\r
508 public boolean hasStart()
\r
510 return this._has_start;
\r
511 } //-- boolean hasStart()
\r
520 public boolean isValid()
\r
525 catch (org.exolab.castor.xml.ValidationException vex) {
\r
529 } //-- boolean isValid()
\r
538 public void marshal(java.io.Writer out)
\r
539 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
\r
542 Marshaller.marshal(this, out);
\r
543 } //-- void marshal(java.io.Writer)
\r
552 public void marshal(org.xml.sax.ContentHandler handler)
\r
553 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
\r
556 Marshaller.marshal(this, handler);
\r
557 } //-- void marshal(org.xml.sax.ContentHandler)
\r
560 * Method removeAllSeq
\r
563 public void removeAllSeq()
\r
565 _seqList.removeAllElements();
\r
566 } //-- void removeAllSeq()
\r
576 public int removeSeq(int index)
\r
578 java.lang.Object obj = _seqList.elementAt(index);
\r
579 _seqList.removeElementAt(index);
\r
580 return ((java.lang.Integer)obj).intValue();
\r
581 } //-- int removeSeq(int)
\r
584 * Sets the value of field 'colour'.
\r
586 * @param colour the value of field 'colour'.
\r
588 public void setColour(java.lang.String colour)
\r
590 this._colour = colour;
\r
591 } //-- void setColour(java.lang.String)
\r
594 * Sets the value of field 'colourText'.
\r
596 * @param colourText the value of field 'colourText'.
\r
598 public void setColourText(boolean colourText)
\r
600 this._colourText = colourText;
\r
601 this._has_colourText = true;
\r
602 } //-- void setColourText(boolean)
\r
605 * Sets the value of field 'consThreshold'.
\r
607 * @param consThreshold the value of field 'consThreshold'.
\r
609 public void setConsThreshold(int consThreshold)
\r
611 this._consThreshold = consThreshold;
\r
612 this._has_consThreshold = true;
\r
613 } //-- void setConsThreshold(int)
\r
616 * Sets the value of field 'displayBoxes'.
\r
618 * @param displayBoxes the value of field 'displayBoxes'.
\r
620 public void setDisplayBoxes(boolean displayBoxes)
\r
622 this._displayBoxes = displayBoxes;
\r
623 this._has_displayBoxes = true;
\r
624 } //-- void setDisplayBoxes(boolean)
\r
627 * Sets the value of field 'displayText'.
\r
629 * @param displayText the value of field 'displayText'.
\r
631 public void setDisplayText(boolean displayText)
\r
633 this._displayText = displayText;
\r
634 this._has_displayText = true;
\r
635 } //-- void setDisplayText(boolean)
\r
638 * Sets the value of field 'end'.
\r
640 * @param end the value of field 'end'.
\r
642 public void setEnd(int end)
\r
645 this._has_end = true;
\r
646 } //-- void setEnd(int)
\r
649 * Sets the value of field 'name'.
\r
651 * @param name the value of field 'name'.
\r
653 public void setName(java.lang.String name)
\r
656 } //-- void setName(java.lang.String)
\r
659 * Sets the value of field 'outlineColour'.
\r
661 * @param outlineColour the value of field 'outlineColour'.
\r
663 public void setOutlineColour(int outlineColour)
\r
665 this._outlineColour = outlineColour;
\r
666 this._has_outlineColour = true;
\r
667 } //-- void setOutlineColour(int)
\r
670 * Sets the value of field 'pidThreshold'.
\r
672 * @param pidThreshold the value of field 'pidThreshold'.
\r
674 public void setPidThreshold(int pidThreshold)
\r
676 this._pidThreshold = pidThreshold;
\r
677 this._has_pidThreshold = true;
\r
678 } //-- void setPidThreshold(int)
\r
688 public void setSeq(int index, int vSeq)
\r
689 throws java.lang.IndexOutOfBoundsException
\r
691 //-- check bounds for index
\r
692 if ((index < 0) || (index > _seqList.size())) {
\r
693 throw new IndexOutOfBoundsException();
\r
695 _seqList.setElementAt(new java.lang.Integer(vSeq), index);
\r
696 } //-- void setSeq(int, int)
\r
705 public void setSeq(int[] seqArray)
\r
708 _seqList.removeAllElements();
\r
709 for (int i = 0; i < seqArray.length; i++) {
\r
710 _seqList.addElement(new java.lang.Integer(seqArray[i]));
\r
712 } //-- void setSeq(int)
\r
715 * Sets the value of field 'start'.
\r
717 * @param start the value of field 'start'.
\r
719 public void setStart(int start)
\r
721 this._start = start;
\r
722 this._has_start = true;
\r
723 } //-- void setStart(int)
\r
733 public static java.lang.Object unmarshal(java.io.Reader reader)
\r
734 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
\r
736 return (jalview.binding.JGroup) Unmarshaller.unmarshal(jalview.binding.JGroup.class, reader);
\r
737 } //-- java.lang.Object unmarshal(java.io.Reader)
\r
743 public void validate()
\r
744 throws org.exolab.castor.xml.ValidationException
\r
746 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
\r
747 validator.validate(this);
\r
748 } //-- void validate()
\r