2 * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
3 * Copyright (C) $$Year-Rel$$ 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.
21 package jalview.schemabinding.version2;
23 //---------------------------------/
24 //- Imported classes and packages -/
25 //---------------------------------/
27 import org.exolab.castor.xml.Marshaller;
28 import org.exolab.castor.xml.Unmarshaller;
31 * Class ThresholdLine.
33 * @version $Revision$ $Date$
35 public class ThresholdLine implements java.io.Serializable
38 // --------------------------/
39 // - Class/Member Variables -/
40 // --------------------------/
45 private java.lang.String _label;
53 * keeps track of state for field: _value
55 private boolean _has_value;
63 * keeps track of state for field: _colour
65 private boolean _has_colour;
71 public ThresholdLine()
82 public void deleteColour()
84 this._has_colour = false;
89 public void deleteValue()
91 this._has_value = false;
95 * Returns the value of field 'colour'.
97 * @return the value of field 'Colour'.
99 public int getColour()
105 * Returns the value of field 'label'.
107 * @return the value of field 'Label'.
109 public java.lang.String getLabel()
115 * Returns the value of field 'value'.
117 * @return the value of field 'Value'.
119 public float getValue()
127 * @return true if at least one Colour has been added
129 public boolean hasColour()
131 return this._has_colour;
137 * @return true if at least one Value has been added
139 public boolean hasValue()
141 return this._has_value;
147 * @return true if this object is valid according to the schema
149 public boolean isValid()
154 } catch (org.exolab.castor.xml.ValidationException vex)
165 * @throws org.exolab.castor.xml.MarshalException
166 * if object is null or if any SAXException is thrown during
168 * @throws org.exolab.castor.xml.ValidationException
169 * if this object is an invalid instance according to the schema
171 public void marshal(final java.io.Writer out)
172 throws org.exolab.castor.xml.MarshalException,
173 org.exolab.castor.xml.ValidationException
175 Marshaller.marshal(this, out);
182 * @throws java.io.IOException
183 * if an IOException occurs during marshaling
184 * @throws org.exolab.castor.xml.ValidationException
185 * if this object is an invalid instance according to the schema
186 * @throws org.exolab.castor.xml.MarshalException
187 * if object is null or if any SAXException is thrown during
190 public void marshal(final org.xml.sax.ContentHandler handler)
191 throws java.io.IOException,
192 org.exolab.castor.xml.MarshalException,
193 org.exolab.castor.xml.ValidationException
195 Marshaller.marshal(this, handler);
199 * Sets the value of field 'colour'.
202 * the value of field 'colour'.
204 public void setColour(final int colour)
206 this._colour = colour;
207 this._has_colour = true;
211 * Sets the value of field 'label'.
214 * the value of field 'label'.
216 public void setLabel(final java.lang.String label)
222 * Sets the value of field 'value'.
225 * the value of field 'value'.
227 public void setValue(final float value)
230 this._has_value = true;
237 * @throws org.exolab.castor.xml.MarshalException
238 * if object is null or if any SAXException is thrown during
240 * @throws org.exolab.castor.xml.ValidationException
241 * if this object is an invalid instance according to the schema
242 * @return the unmarshaled jalview.schemabinding.version2.ThresholdLine
244 public static jalview.schemabinding.version2.ThresholdLine unmarshal(
245 final java.io.Reader reader)
246 throws org.exolab.castor.xml.MarshalException,
247 org.exolab.castor.xml.ValidationException
249 return (jalview.schemabinding.version2.ThresholdLine) Unmarshaller
250 .unmarshal(jalview.schemabinding.version2.ThresholdLine.class,
257 * @throws org.exolab.castor.xml.ValidationException
258 * if this object is an invalid instance according to the schema
260 public void validate() throws org.exolab.castor.xml.ValidationException
262 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
263 validator.validate(this);