2 * This class was automatically generated with
3 * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
8 package jalview.binding;
10 //---------------------------------/
11 //- Imported classes and packages -/
12 //---------------------------------/
14 import org.exolab.castor.xml.Marshaller;
15 import org.exolab.castor.xml.Unmarshaller;
20 * @version $Revision$ $Date$
22 public class JGroup implements java.io.Serializable
25 // --------------------------/
26 // - Class/Member Variables -/
27 // --------------------------/
35 * keeps track of state for field: _start
37 private boolean _has_start;
45 * keeps track of state for field: _end
47 private boolean _has_end;
52 private java.lang.String _name;
57 private java.lang.String _colour;
60 * Field _consThreshold.
62 private int _consThreshold;
65 * keeps track of state for field: _consThreshold
67 private boolean _has_consThreshold;
70 * Field _pidThreshold.
72 private int _pidThreshold;
75 * keeps track of state for field: _pidThreshold
77 private boolean _has_pidThreshold;
80 * Field _outlineColour.
82 private int _outlineColour;
85 * keeps track of state for field: _outlineColour
87 private boolean _has_outlineColour;
90 * Field _displayBoxes.
92 private boolean _displayBoxes;
95 * keeps track of state for field: _displayBoxes
97 private boolean _has_displayBoxes;
100 * Field _displayText.
102 private boolean _displayText;
105 * keeps track of state for field: _displayText
107 private boolean _has_displayText;
112 private boolean _colourText;
115 * keeps track of state for field: _colourText
117 private boolean _has_colourText;
122 private java.util.Vector _seqList;
131 this._seqList = new java.util.Vector();
142 * @throws java.lang.IndexOutOfBoundsException
143 * if the index given is outside the bounds of the collection
145 public void addSeq(final int vSeq)
146 throws java.lang.IndexOutOfBoundsException
148 this._seqList.addElement(new java.lang.Integer(vSeq));
156 * @throws java.lang.IndexOutOfBoundsException
157 * if the index given is outside the bounds of the collection
159 public void addSeq(final int index, final int vSeq)
160 throws java.lang.IndexOutOfBoundsException
162 this._seqList.add(index, new java.lang.Integer(vSeq));
167 public void deleteColourText()
169 this._has_colourText = false;
174 public void deleteConsThreshold()
176 this._has_consThreshold = false;
181 public void deleteDisplayBoxes()
183 this._has_displayBoxes = false;
188 public void deleteDisplayText()
190 this._has_displayText = false;
195 public void deleteEnd()
197 this._has_end = false;
202 public void deleteOutlineColour()
204 this._has_outlineColour = false;
209 public void deletePidThreshold()
211 this._has_pidThreshold = false;
216 public void deleteStart()
218 this._has_start = false;
222 * Method enumerateSeq.
224 * @return an Enumeration over all int elements
226 public java.util.Enumeration enumerateSeq()
228 return this._seqList.elements();
232 * Returns the value of field 'colour'.
234 * @return the value of field 'Colour'.
236 public java.lang.String getColour()
242 * Returns the value of field 'colourText'.
244 * @return the value of field 'ColourText'.
246 public boolean getColourText()
248 return this._colourText;
252 * Returns the value of field 'consThreshold'.
254 * @return the value of field 'ConsThreshold'.
256 public int getConsThreshold()
258 return this._consThreshold;
262 * Returns the value of field 'displayBoxes'.
264 * @return the value of field 'DisplayBoxes'.
266 public boolean getDisplayBoxes()
268 return this._displayBoxes;
272 * Returns the value of field 'displayText'.
274 * @return the value of field 'DisplayText'.
276 public boolean getDisplayText()
278 return this._displayText;
282 * Returns the value of field 'end'.
284 * @return the value of field 'End'.
292 * Returns the value of field 'name'.
294 * @return the value of field 'Name'.
296 public java.lang.String getName()
302 * Returns the value of field 'outlineColour'.
304 * @return the value of field 'OutlineColour'.
306 public int getOutlineColour()
308 return this._outlineColour;
312 * Returns the value of field 'pidThreshold'.
314 * @return the value of field 'PidThreshold'.
316 public int getPidThreshold()
318 return this._pidThreshold;
325 * @throws java.lang.IndexOutOfBoundsException
326 * if the index given is outside the bounds of the collection
327 * @return the value of the int at the given index
329 public int getSeq(final int index)
330 throws java.lang.IndexOutOfBoundsException
332 // check bounds for index
333 if (index < 0 || index >= this._seqList.size())
335 throw new IndexOutOfBoundsException("getSeq: Index value '" + index
336 + "' not in range [0.." + (this._seqList.size() - 1) + "]");
339 return ((java.lang.Integer) _seqList.get(index)).intValue();
343 * Method getSeq.Returns the contents of the collection in an Array.
345 * @return this collection as an Array
347 public int[] getSeq()
349 int size = this._seqList.size();
350 int[] array = new int[size];
351 java.util.Iterator iter = _seqList.iterator();
352 for (int index = 0; index < size; index++)
354 array[index] = ((java.lang.Integer) iter.next()).intValue();
360 * Method getSeqCount.
362 * @return the size of this collection
364 public int getSeqCount()
366 return this._seqList.size();
370 * Returns the value of field 'start'.
372 * @return the value of field 'Start'.
374 public int getStart()
380 * Method hasColourText.
382 * @return true if at least one ColourText has been added
384 public boolean hasColourText()
386 return this._has_colourText;
390 * Method hasConsThreshold.
392 * @return true if at least one ConsThreshold has been added
394 public boolean hasConsThreshold()
396 return this._has_consThreshold;
400 * Method hasDisplayBoxes.
402 * @return true if at least one DisplayBoxes has been added
404 public boolean hasDisplayBoxes()
406 return this._has_displayBoxes;
410 * Method hasDisplayText.
412 * @return true if at least one DisplayText has been added
414 public boolean hasDisplayText()
416 return this._has_displayText;
422 * @return true if at least one End has been added
424 public boolean hasEnd()
426 return this._has_end;
430 * Method hasOutlineColour.
432 * @return true if at least one OutlineColour has been added
434 public boolean hasOutlineColour()
436 return this._has_outlineColour;
440 * Method hasPidThreshold.
442 * @return true if at least one PidThreshold has been added
444 public boolean hasPidThreshold()
446 return this._has_pidThreshold;
452 * @return true if at least one Start has been added
454 public boolean hasStart()
456 return this._has_start;
460 * Returns the value of field 'colourText'.
462 * @return the value of field 'ColourText'.
464 public boolean isColourText()
466 return this._colourText;
470 * Returns the value of field 'displayBoxes'.
472 * @return the value of field 'DisplayBoxes'.
474 public boolean isDisplayBoxes()
476 return this._displayBoxes;
480 * Returns the value of field 'displayText'.
482 * @return the value of field 'DisplayText'.
484 public boolean isDisplayText()
486 return this._displayText;
492 * @return true if this object is valid according to the schema
494 public boolean isValid()
499 } catch (org.exolab.castor.xml.ValidationException vex)
510 * @throws org.exolab.castor.xml.MarshalException
511 * if object is null or if any SAXException is thrown during
513 * @throws org.exolab.castor.xml.ValidationException
514 * if this object is an invalid instance according to the schema
516 public void marshal(final java.io.Writer out)
517 throws org.exolab.castor.xml.MarshalException,
518 org.exolab.castor.xml.ValidationException
520 Marshaller.marshal(this, out);
527 * @throws java.io.IOException
528 * if an IOException occurs during marshaling
529 * @throws org.exolab.castor.xml.ValidationException
530 * if this object is an invalid instance according to the schema
531 * @throws org.exolab.castor.xml.MarshalException
532 * if object is null or if any SAXException is thrown during
535 public void marshal(final org.xml.sax.ContentHandler handler)
536 throws java.io.IOException,
537 org.exolab.castor.xml.MarshalException,
538 org.exolab.castor.xml.ValidationException
540 Marshaller.marshal(this, handler);
545 public void removeAllSeq()
547 this._seqList.clear();
554 * @return true if the object was removed from the collection.
556 public boolean removeSeq(final int vSeq)
558 boolean removed = _seqList.remove(new java.lang.Integer(vSeq));
563 * Method removeSeqAt.
566 * @return the element removed from the collection
568 public int removeSeqAt(final int index)
570 java.lang.Object obj = this._seqList.remove(index);
571 return ((java.lang.Integer) obj).intValue();
575 * Sets the value of field 'colour'.
578 * the value of field 'colour'.
580 public void setColour(final java.lang.String colour)
582 this._colour = colour;
586 * Sets the value of field 'colourText'.
589 * the value of field 'colourText'.
591 public void setColourText(final boolean colourText)
593 this._colourText = colourText;
594 this._has_colourText = true;
598 * Sets the value of field 'consThreshold'.
600 * @param consThreshold
601 * the value of field 'consThreshold'.
603 public void setConsThreshold(final int consThreshold)
605 this._consThreshold = consThreshold;
606 this._has_consThreshold = true;
610 * Sets the value of field 'displayBoxes'.
612 * @param displayBoxes
613 * the value of field 'displayBoxes'.
615 public void setDisplayBoxes(final boolean displayBoxes)
617 this._displayBoxes = displayBoxes;
618 this._has_displayBoxes = true;
622 * Sets the value of field 'displayText'.
625 * the value of field 'displayText'.
627 public void setDisplayText(final boolean displayText)
629 this._displayText = displayText;
630 this._has_displayText = true;
634 * Sets the value of field 'end'.
637 * the value of field 'end'.
639 public void setEnd(final int end)
642 this._has_end = true;
646 * Sets the value of field 'name'.
649 * the value of field 'name'.
651 public void setName(final java.lang.String name)
657 * Sets the value of field 'outlineColour'.
659 * @param outlineColour
660 * the value of field 'outlineColour'.
662 public void setOutlineColour(final int outlineColour)
664 this._outlineColour = outlineColour;
665 this._has_outlineColour = true;
669 * Sets the value of field 'pidThreshold'.
671 * @param pidThreshold
672 * the value of field 'pidThreshold'.
674 public void setPidThreshold(final int pidThreshold)
676 this._pidThreshold = pidThreshold;
677 this._has_pidThreshold = true;
685 * @throws java.lang.IndexOutOfBoundsException
686 * if the index given is outside the bounds of the collection
688 public void setSeq(final int index, final int vSeq)
689 throws java.lang.IndexOutOfBoundsException
691 // check bounds for index
692 if (index < 0 || index >= this._seqList.size())
694 throw new IndexOutOfBoundsException("setSeq: Index value '" + index
695 + "' not in range [0.." + (this._seqList.size() - 1) + "]");
698 this._seqList.set(index, new java.lang.Integer(vSeq));
706 public void setSeq(final int[] vSeqArray)
711 for (int i = 0; i < vSeqArray.length; i++)
713 this._seqList.add(new java.lang.Integer(vSeqArray[i]));
718 * Sets the value of field 'start'.
721 * the value of field 'start'.
723 public void setStart(final int start)
726 this._has_start = true;
733 * @throws org.exolab.castor.xml.MarshalException
734 * if object is null or if any SAXException is thrown during
736 * @throws org.exolab.castor.xml.ValidationException
737 * if this object is an invalid instance according to the schema
738 * @return the unmarshaled jalview.binding.JGroup
740 public static jalview.binding.JGroup unmarshal(final java.io.Reader reader)
741 throws org.exolab.castor.xml.MarshalException,
742 org.exolab.castor.xml.ValidationException
744 return (jalview.binding.JGroup) Unmarshaller.unmarshal(
745 jalview.binding.JGroup.class, reader);
751 * @throws org.exolab.castor.xml.ValidationException
752 * if this object is an invalid instance according to the schema
754 public void validate() throws org.exolab.castor.xml.ValidationException
756 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
757 validator.validate(this);