1 /*******************************************************************************
2 * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
3 * Copyright (C) $(date) The Jalview Authors
5 * This file is part of Jalview.
7 * Jalview is free software: you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation, either version 3
10 * of the License, or (at your option) any later version.
12 * Jalview is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty
14 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with Jalview. If not, see <http://www.gnu.org/licenses/>.
19 * The Jalview Authors are detailed in the 'AUTHORS' file.
20 *******************************************************************************/
22 * This class was automatically generated with
23 * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
28 package jalview.schemabinding.version2;
30 //---------------------------------/
31 //- Imported classes and packages -/
32 //---------------------------------/
34 import org.exolab.castor.xml.Marshaller;
35 import org.exolab.castor.xml.Unmarshaller;
38 * Class ThresholdLine.
40 * @version $Revision$ $Date$
42 public class ThresholdLine implements java.io.Serializable
45 // --------------------------/
46 // - Class/Member Variables -/
47 // --------------------------/
52 private java.lang.String _label;
60 * keeps track of state for field: _value
62 private boolean _has_value;
70 * keeps track of state for field: _colour
72 private boolean _has_colour;
78 public ThresholdLine()
89 public void deleteColour()
91 this._has_colour = false;
96 public void deleteValue()
98 this._has_value = false;
102 * Returns the value of field 'colour'.
104 * @return the value of field 'Colour'.
106 public int getColour()
112 * Returns the value of field 'label'.
114 * @return the value of field 'Label'.
116 public java.lang.String getLabel()
122 * Returns the value of field 'value'.
124 * @return the value of field 'Value'.
126 public float getValue()
134 * @return true if at least one Colour has been added
136 public boolean hasColour()
138 return this._has_colour;
144 * @return true if at least one Value has been added
146 public boolean hasValue()
148 return this._has_value;
154 * @return true if this object is valid according to the schema
156 public boolean isValid()
161 } catch (org.exolab.castor.xml.ValidationException vex)
172 * @throws org.exolab.castor.xml.MarshalException
173 * if object is null or if any SAXException is thrown during
175 * @throws org.exolab.castor.xml.ValidationException
176 * if this object is an invalid instance according to the schema
178 public void marshal(final java.io.Writer out)
179 throws org.exolab.castor.xml.MarshalException,
180 org.exolab.castor.xml.ValidationException
182 Marshaller.marshal(this, out);
189 * @throws java.io.IOException
190 * if an IOException occurs during marshaling
191 * @throws org.exolab.castor.xml.ValidationException
192 * if this object is an invalid instance according to the schema
193 * @throws org.exolab.castor.xml.MarshalException
194 * if object is null or if any SAXException is thrown during
197 public void marshal(final org.xml.sax.ContentHandler handler)
198 throws java.io.IOException,
199 org.exolab.castor.xml.MarshalException,
200 org.exolab.castor.xml.ValidationException
202 Marshaller.marshal(this, handler);
206 * Sets the value of field 'colour'.
209 * the value of field 'colour'.
211 public void setColour(final int colour)
213 this._colour = colour;
214 this._has_colour = true;
218 * Sets the value of field 'label'.
221 * the value of field 'label'.
223 public void setLabel(final java.lang.String label)
229 * Sets the value of field 'value'.
232 * the value of field 'value'.
234 public void setValue(final float value)
237 this._has_value = true;
244 * @throws org.exolab.castor.xml.MarshalException
245 * if object is null or if any SAXException is thrown during
247 * @throws org.exolab.castor.xml.ValidationException
248 * if this object is an invalid instance according to the schema
249 * @return the unmarshaled jalview.schemabinding.version2.ThresholdLine
251 public static jalview.schemabinding.version2.ThresholdLine unmarshal(
252 final java.io.Reader reader)
253 throws org.exolab.castor.xml.MarshalException,
254 org.exolab.castor.xml.ValidationException
256 return (jalview.schemabinding.version2.ThresholdLine) Unmarshaller
257 .unmarshal(jalview.schemabinding.version2.ThresholdLine.class,
264 * @throws org.exolab.castor.xml.ValidationException
265 * if this object is an invalid instance according to the schema
267 public void validate() throws org.exolab.castor.xml.ValidationException
269 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
270 validator.validate(this);