2 * This class was automatically generated with
\r
3 * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
\r
8 package jalview.schemabinding.version2;
\r
10 //---------------------------------/
\r
11 //- Imported classes and packages -/
\r
12 //---------------------------------/
\r
14 import org.exolab.castor.xml.Marshaller;
\r
15 import org.exolab.castor.xml.Unmarshaller;
\r
18 * Class ThresholdLine.
\r
20 * @version $Revision$ $Date$
\r
22 public class ThresholdLine implements java.io.Serializable {
\r
25 //--------------------------/
\r
26 //- Class/Member Variables -/
\r
27 //--------------------------/
\r
32 private java.lang.String _label;
\r
37 private float _value;
\r
40 * keeps track of state for field: _value
\r
42 private boolean _has_value;
\r
47 private int _colour;
\r
50 * keeps track of state for field: _colour
\r
52 private boolean _has_colour;
\r
59 public ThresholdLine() {
\r
70 public void deleteColour(
\r
72 this._has_colour= false;
\r
77 public void deleteValue(
\r
79 this._has_value= false;
\r
83 * Returns the value of field 'colour'.
\r
85 * @return the value of field 'Colour'.
\r
87 public int getColour(
\r
89 return this._colour;
\r
93 * Returns the value of field 'label'.
\r
95 * @return the value of field 'Label'.
\r
97 public java.lang.String getLabel(
\r
103 * Returns the value of field 'value'.
\r
105 * @return the value of field 'Value'.
\r
107 public float getValue(
\r
109 return this._value;
\r
113 * Method hasColour.
\r
115 * @return true if at least one Colour has been added
\r
117 public boolean hasColour(
\r
119 return this._has_colour;
\r
125 * @return true if at least one Value has been added
\r
127 public boolean hasValue(
\r
129 return this._has_value;
\r
135 * @return true if this object is valid according to the schema
\r
137 public boolean isValid(
\r
141 } catch (org.exolab.castor.xml.ValidationException vex) {
\r
151 * @throws org.exolab.castor.xml.MarshalException if object is
\r
152 * null or if any SAXException is thrown during marshaling
\r
153 * @throws org.exolab.castor.xml.ValidationException if this
\r
154 * object is an invalid instance according to the schema
\r
156 public void marshal(
\r
157 final java.io.Writer out)
\r
158 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
\r
159 Marshaller.marshal(this, out);
\r
166 * @throws java.io.IOException if an IOException occurs during
\r
168 * @throws org.exolab.castor.xml.ValidationException if this
\r
169 * object is an invalid instance according to the schema
\r
170 * @throws org.exolab.castor.xml.MarshalException if object is
\r
171 * null or if any SAXException is thrown during marshaling
\r
173 public void marshal(
\r
174 final org.xml.sax.ContentHandler handler)
\r
175 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
\r
176 Marshaller.marshal(this, handler);
\r
180 * Sets the value of field 'colour'.
\r
182 * @param colour the value of field 'colour'.
\r
184 public void setColour(
\r
185 final int colour) {
\r
186 this._colour = colour;
\r
187 this._has_colour = true;
\r
191 * Sets the value of field 'label'.
\r
193 * @param label the value of field 'label'.
\r
195 public void setLabel(
\r
196 final java.lang.String label) {
\r
197 this._label = label;
\r
201 * Sets the value of field 'value'.
\r
203 * @param value the value of field 'value'.
\r
205 public void setValue(
\r
206 final float value) {
\r
207 this._value = value;
\r
208 this._has_value = true;
\r
212 * Method unmarshal.
\r
215 * @throws org.exolab.castor.xml.MarshalException if object is
\r
216 * null or if any SAXException is thrown during marshaling
\r
217 * @throws org.exolab.castor.xml.ValidationException if this
\r
218 * object is an invalid instance according to the schema
\r
219 * @return the unmarshaled
\r
220 * jalview.schemabinding.version2.ThresholdLine
\r
222 public static jalview.schemabinding.version2.ThresholdLine unmarshal(
\r
223 final java.io.Reader reader)
\r
224 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
\r
225 return (jalview.schemabinding.version2.ThresholdLine) Unmarshaller.unmarshal(jalview.schemabinding.version2.ThresholdLine.class, reader);
\r
231 * @throws org.exolab.castor.xml.ValidationException if this
\r
232 * object is an invalid instance according to the schema
\r
234 public void validate(
\r
236 throws org.exolab.castor.xml.ValidationException {
\r
237 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
\r
238 validator.validate(this);
\r