2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
3 * Copyright (C) 2014 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 of the License, or (at your option) any later version.
11 * Jalview is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty
13 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 * PURPOSE. See the GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License along with Jalview. If not, see <http://www.gnu.org/licenses/>.
17 * The Jalview Authors are detailed in the 'AUTHORS' file.
19 package jalview.schemabinding.version2;
21 //---------------------------------/
22 //- Imported classes and packages -/
23 //---------------------------------/
25 import org.exolab.castor.xml.Marshaller;
26 import org.exolab.castor.xml.Unmarshaller;
29 * Class ThresholdLine.
31 * @version $Revision$ $Date$
33 public class ThresholdLine implements java.io.Serializable
36 // --------------------------/
37 // - Class/Member Variables -/
38 // --------------------------/
43 private java.lang.String _label;
51 * keeps track of state for field: _value
53 private boolean _has_value;
61 * keeps track of state for field: _colour
63 private boolean _has_colour;
69 public ThresholdLine()
80 public void deleteColour()
82 this._has_colour = false;
87 public void deleteValue()
89 this._has_value = false;
93 * Returns the value of field 'colour'.
95 * @return the value of field 'Colour'.
97 public int getColour()
103 * Returns the value of field 'label'.
105 * @return the value of field 'Label'.
107 public java.lang.String getLabel()
113 * Returns the value of field 'value'.
115 * @return the value of field 'Value'.
117 public float getValue()
125 * @return true if at least one Colour has been added
127 public boolean hasColour()
129 return this._has_colour;
135 * @return true if at least one Value has been added
137 public boolean hasValue()
139 return this._has_value;
145 * @return true if this object is valid according to the schema
147 public boolean isValid()
152 } catch (org.exolab.castor.xml.ValidationException vex)
163 * @throws org.exolab.castor.xml.MarshalException
164 * if object is null or if any SAXException is thrown during
166 * @throws org.exolab.castor.xml.ValidationException
167 * if this object is an invalid instance according to the schema
169 public void marshal(final java.io.Writer out)
170 throws org.exolab.castor.xml.MarshalException,
171 org.exolab.castor.xml.ValidationException
173 Marshaller.marshal(this, out);
180 * @throws java.io.IOException
181 * if an IOException occurs during marshaling
182 * @throws org.exolab.castor.xml.ValidationException
183 * if this object is an invalid instance according to the schema
184 * @throws org.exolab.castor.xml.MarshalException
185 * if object is null or if any SAXException is thrown during
188 public void marshal(final org.xml.sax.ContentHandler handler)
189 throws java.io.IOException,
190 org.exolab.castor.xml.MarshalException,
191 org.exolab.castor.xml.ValidationException
193 Marshaller.marshal(this, handler);
197 * Sets the value of field 'colour'.
200 * the value of field 'colour'.
202 public void setColour(final int colour)
204 this._colour = colour;
205 this._has_colour = true;
209 * Sets the value of field 'label'.
212 * the value of field 'label'.
214 public void setLabel(final java.lang.String label)
220 * Sets the value of field 'value'.
223 * the value of field 'value'.
225 public void setValue(final float value)
228 this._has_value = true;
235 * @throws org.exolab.castor.xml.MarshalException
236 * if object is null or if any SAXException is thrown during
238 * @throws org.exolab.castor.xml.ValidationException
239 * if this object is an invalid instance according to the schema
240 * @return the unmarshaled jalview.schemabinding.version2.ThresholdLine
242 public static jalview.schemabinding.version2.ThresholdLine unmarshal(
243 final java.io.Reader reader)
244 throws org.exolab.castor.xml.MarshalException,
245 org.exolab.castor.xml.ValidationException
247 return (jalview.schemabinding.version2.ThresholdLine) Unmarshaller
248 .unmarshal(jalview.schemabinding.version2.ThresholdLine.class,
255 * @throws org.exolab.castor.xml.ValidationException
256 * if this object is an invalid instance according to the schema
258 public void validate() throws org.exolab.castor.xml.ValidationException
260 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
261 validator.validate(this);