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();
143 * @throws java.lang.IndexOutOfBoundsException if the index
144 * given is outside the bounds of the collection
148 throws java.lang.IndexOutOfBoundsException {
149 this._seqList.addElement(new java.lang.Integer(vSeq));
157 * @throws java.lang.IndexOutOfBoundsException if the index
158 * given is outside the bounds of the collection
163 throws java.lang.IndexOutOfBoundsException {
164 this._seqList.add(index, new java.lang.Integer(vSeq));
169 public void deleteColourText(
171 this._has_colourText= false;
176 public void deleteConsThreshold(
178 this._has_consThreshold= false;
183 public void deleteDisplayBoxes(
185 this._has_displayBoxes= false;
190 public void deleteDisplayText(
192 this._has_displayText= false;
197 public void deleteEnd(
199 this._has_end= false;
204 public void deleteOutlineColour(
206 this._has_outlineColour= false;
211 public void deletePidThreshold(
213 this._has_pidThreshold= false;
218 public void deleteStart(
220 this._has_start= false;
224 * Method enumerateSeq.
226 * @return an Enumeration over all int elements
228 public java.util.Enumeration enumerateSeq(
230 return this._seqList.elements();
234 * Returns the value of field 'colour'.
236 * @return the value of field 'Colour'.
238 public java.lang.String getColour(
244 * Returns the value of field 'colourText'.
246 * @return the value of field 'ColourText'.
248 public boolean getColourText(
250 return this._colourText;
254 * Returns the value of field 'consThreshold'.
256 * @return the value of field 'ConsThreshold'.
258 public int getConsThreshold(
260 return this._consThreshold;
264 * Returns the value of field 'displayBoxes'.
266 * @return the value of field 'DisplayBoxes'.
268 public boolean getDisplayBoxes(
270 return this._displayBoxes;
274 * Returns the value of field 'displayText'.
276 * @return the value of field 'DisplayText'.
278 public boolean getDisplayText(
280 return this._displayText;
284 * Returns the value of field 'end'.
286 * @return the value of field 'End'.
294 * Returns the value of field 'name'.
296 * @return the value of field 'Name'.
298 public java.lang.String getName(
304 * Returns the value of field 'outlineColour'.
306 * @return the value of field 'OutlineColour'.
308 public int getOutlineColour(
310 return this._outlineColour;
314 * Returns the value of field 'pidThreshold'.
316 * @return the value of field 'PidThreshold'.
318 public int getPidThreshold(
320 return this._pidThreshold;
327 * @throws java.lang.IndexOutOfBoundsException if the index
328 * given is outside the bounds of the collection
329 * @return the value of the int at the given index
333 throws java.lang.IndexOutOfBoundsException {
334 // check bounds for index
335 if (index < 0 || index >= this._seqList.size()) {
336 throw new IndexOutOfBoundsException("getSeq: Index value '" + index + "' 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
346 * @return this collection as an Array
350 int size = this._seqList.size();
351 int[] array = new int[size];
352 java.util.Iterator iter = _seqList.iterator();
353 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'.
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(
498 } catch (org.exolab.castor.xml.ValidationException vex) {
508 * @throws org.exolab.castor.xml.MarshalException if object is
509 * null or if any SAXException is thrown during marshaling
510 * @throws org.exolab.castor.xml.ValidationException if this
511 * object is an invalid instance according to the schema
514 final java.io.Writer out)
515 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
516 Marshaller.marshal(this, out);
523 * @throws java.io.IOException if an IOException occurs during
525 * @throws org.exolab.castor.xml.ValidationException if this
526 * object is an invalid instance according to the schema
527 * @throws org.exolab.castor.xml.MarshalException if object is
528 * null or if any SAXException is thrown during marshaling
531 final org.xml.sax.ContentHandler handler)
532 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
533 Marshaller.marshal(this, handler);
538 public void removeAllSeq(
540 this._seqList.clear();
547 * @return true if the object was removed from the collection.
549 public boolean removeSeq(
551 boolean removed = _seqList.remove(new java.lang.Integer(vSeq));
556 * Method removeSeqAt.
559 * @return the element removed from the collection
561 public int removeSeqAt(
563 java.lang.Object obj = this._seqList.remove(index);
564 return ((java.lang.Integer) obj).intValue();
568 * Sets the value of field 'colour'.
570 * @param colour the value of field 'colour'.
572 public void setColour(
573 final java.lang.String colour) {
574 this._colour = colour;
578 * Sets the value of field 'colourText'.
580 * @param colourText the value of field 'colourText'.
582 public void setColourText(
583 final boolean colourText) {
584 this._colourText = colourText;
585 this._has_colourText = true;
589 * Sets the value of field 'consThreshold'.
591 * @param consThreshold the value of field 'consThreshold'.
593 public void setConsThreshold(
594 final int consThreshold) {
595 this._consThreshold = consThreshold;
596 this._has_consThreshold = true;
600 * Sets the value of field 'displayBoxes'.
602 * @param displayBoxes the value of field 'displayBoxes'.
604 public void setDisplayBoxes(
605 final boolean displayBoxes) {
606 this._displayBoxes = displayBoxes;
607 this._has_displayBoxes = true;
611 * Sets the value of field 'displayText'.
613 * @param displayText the value of field 'displayText'.
615 public void setDisplayText(
616 final boolean displayText) {
617 this._displayText = displayText;
618 this._has_displayText = true;
622 * Sets the value of field 'end'.
624 * @param end the value of field 'end'.
629 this._has_end = true;
633 * Sets the value of field 'name'.
635 * @param name the value of field 'name'.
638 final java.lang.String name) {
643 * Sets the value of field 'outlineColour'.
645 * @param outlineColour the value of field 'outlineColour'.
647 public void setOutlineColour(
648 final int outlineColour) {
649 this._outlineColour = outlineColour;
650 this._has_outlineColour = true;
654 * Sets the value of field 'pidThreshold'.
656 * @param pidThreshold the value of field 'pidThreshold'.
658 public void setPidThreshold(
659 final int pidThreshold) {
660 this._pidThreshold = pidThreshold;
661 this._has_pidThreshold = true;
669 * @throws java.lang.IndexOutOfBoundsException if the index
670 * given is outside the bounds of the collection
675 throws java.lang.IndexOutOfBoundsException {
676 // check bounds for index
677 if (index < 0 || index >= this._seqList.size()) {
678 throw new IndexOutOfBoundsException("setSeq: Index value '" + index + "' not in range [0.." + (this._seqList.size() - 1) + "]");
681 this._seqList.set(index, new java.lang.Integer(vSeq));
690 final int[] vSeqArray) {
694 for (int i = 0; i < vSeqArray.length; i++) {
695 this._seqList.add(new java.lang.Integer(vSeqArray[i]));
700 * Sets the value of field 'start'.
702 * @param start the value of field 'start'.
704 public void setStart(
707 this._has_start = true;
714 * @throws org.exolab.castor.xml.MarshalException if object is
715 * null or if any SAXException is thrown during marshaling
716 * @throws org.exolab.castor.xml.ValidationException if this
717 * object is an invalid instance according to the schema
718 * @return the unmarshaled jalview.binding.JGroup
720 public static jalview.binding.JGroup unmarshal(
721 final java.io.Reader reader)
722 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
723 return (jalview.binding.JGroup) Unmarshaller.unmarshal(jalview.binding.JGroup.class, reader);
729 * @throws org.exolab.castor.xml.ValidationException if this
730 * object is an invalid instance according to the schema
732 public void validate(
734 throws org.exolab.castor.xml.ValidationException {
735 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
736 validator.validate(this);