1 /*******************************************************************************
2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.1)
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.
17 * If not, see <http://www.gnu.org/licenses/>.
18 * The Jalview Authors are detailed in the 'AUTHORS' file.
19 ******************************************************************************/
21 * This class was automatically generated with
22 * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
27 package jalview.schemabinding.version2;
29 //---------------------------------/
30 //- Imported classes and packages -/
31 //---------------------------------/
33 import org.exolab.castor.xml.Marshaller;
34 import org.exolab.castor.xml.Unmarshaller;
37 * Class ThresholdLine.
39 * @version $Revision$ $Date$
41 public class ThresholdLine implements java.io.Serializable
44 // --------------------------/
45 // - Class/Member Variables -/
46 // --------------------------/
51 private java.lang.String _label;
59 * keeps track of state for field: _value
61 private boolean _has_value;
69 * keeps track of state for field: _colour
71 private boolean _has_colour;
77 public ThresholdLine()
88 public void deleteColour()
90 this._has_colour = false;
95 public void deleteValue()
97 this._has_value = false;
101 * Returns the value of field 'colour'.
103 * @return the value of field 'Colour'.
105 public int getColour()
111 * Returns the value of field 'label'.
113 * @return the value of field 'Label'.
115 public java.lang.String getLabel()
121 * Returns the value of field 'value'.
123 * @return the value of field 'Value'.
125 public float getValue()
133 * @return true if at least one Colour has been added
135 public boolean hasColour()
137 return this._has_colour;
143 * @return true if at least one Value has been added
145 public boolean hasValue()
147 return this._has_value;
153 * @return true if this object is valid according to the schema
155 public boolean isValid()
160 } catch (org.exolab.castor.xml.ValidationException vex)
171 * @throws org.exolab.castor.xml.MarshalException
172 * if object is null or if any SAXException is thrown during
174 * @throws org.exolab.castor.xml.ValidationException
175 * if this object is an invalid instance according to the schema
177 public void marshal(final java.io.Writer out)
178 throws org.exolab.castor.xml.MarshalException,
179 org.exolab.castor.xml.ValidationException
181 Marshaller.marshal(this, out);
188 * @throws java.io.IOException
189 * if an IOException occurs during marshaling
190 * @throws org.exolab.castor.xml.ValidationException
191 * if this object is an invalid instance according to the schema
192 * @throws org.exolab.castor.xml.MarshalException
193 * if object is null or if any SAXException is thrown during
196 public void marshal(final org.xml.sax.ContentHandler handler)
197 throws java.io.IOException,
198 org.exolab.castor.xml.MarshalException,
199 org.exolab.castor.xml.ValidationException
201 Marshaller.marshal(this, handler);
205 * Sets the value of field 'colour'.
208 * the value of field 'colour'.
210 public void setColour(final int colour)
212 this._colour = colour;
213 this._has_colour = true;
217 * Sets the value of field 'label'.
220 * the value of field 'label'.
222 public void setLabel(final java.lang.String label)
228 * Sets the value of field 'value'.
231 * the value of field 'value'.
233 public void setValue(final float value)
236 this._has_value = true;
243 * @throws org.exolab.castor.xml.MarshalException
244 * if object is null or if any SAXException is thrown during
246 * @throws org.exolab.castor.xml.ValidationException
247 * if this object is an invalid instance according to the schema
248 * @return the unmarshaled jalview.schemabinding.version2.ThresholdLine
250 public static jalview.schemabinding.version2.ThresholdLine unmarshal(
251 final java.io.Reader reader)
252 throws org.exolab.castor.xml.MarshalException,
253 org.exolab.castor.xml.ValidationException
255 return (jalview.schemabinding.version2.ThresholdLine) Unmarshaller
256 .unmarshal(jalview.schemabinding.version2.ThresholdLine.class,
263 * @throws org.exolab.castor.xml.ValidationException
264 * if this object is an invalid instance according to the schema
266 public void validate() throws org.exolab.castor.xml.ValidationException
268 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
269 validator.validate(this);