2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8)
3 * Copyright (C) 2012 J Procter, AM Waterhouse, LM Lui, J Engelhardt, G Barton, M Clamp, S Searle
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/>.
18 package jalview.schemabinding.version2;
20 //---------------------------------/
21 //- Imported classes and packages -/
22 //---------------------------------/
24 import org.exolab.castor.xml.Marshaller;
25 import org.exolab.castor.xml.Unmarshaller;
28 * Class ThresholdLine.
30 * @version $Revision$ $Date$
32 public class ThresholdLine implements java.io.Serializable
35 // --------------------------/
36 // - Class/Member Variables -/
37 // --------------------------/
42 private java.lang.String _label;
50 * keeps track of state for field: _value
52 private boolean _has_value;
60 * keeps track of state for field: _colour
62 private boolean _has_colour;
68 public ThresholdLine()
79 public void deleteColour()
81 this._has_colour = false;
86 public void deleteValue()
88 this._has_value = false;
92 * Returns the value of field 'colour'.
94 * @return the value of field 'Colour'.
96 public int getColour()
102 * Returns the value of field 'label'.
104 * @return the value of field 'Label'.
106 public java.lang.String getLabel()
112 * Returns the value of field 'value'.
114 * @return the value of field 'Value'.
116 public float getValue()
124 * @return true if at least one Colour has been added
126 public boolean hasColour()
128 return this._has_colour;
134 * @return true if at least one Value has been added
136 public boolean hasValue()
138 return this._has_value;
144 * @return true if this object is valid according to the schema
146 public boolean isValid()
151 } catch (org.exolab.castor.xml.ValidationException vex)
162 * @throws org.exolab.castor.xml.MarshalException
163 * if object is null or if any SAXException is thrown during
165 * @throws org.exolab.castor.xml.ValidationException
166 * if this object is an invalid instance according to the schema
168 public void marshal(final java.io.Writer out)
169 throws org.exolab.castor.xml.MarshalException,
170 org.exolab.castor.xml.ValidationException
172 Marshaller.marshal(this, out);
179 * @throws java.io.IOException
180 * if an IOException occurs during marshaling
181 * @throws org.exolab.castor.xml.ValidationException
182 * if this object is an invalid instance according to the schema
183 * @throws org.exolab.castor.xml.MarshalException
184 * if object is null or if any SAXException is thrown during
187 public void marshal(final org.xml.sax.ContentHandler handler)
188 throws java.io.IOException,
189 org.exolab.castor.xml.MarshalException,
190 org.exolab.castor.xml.ValidationException
192 Marshaller.marshal(this, handler);
196 * Sets the value of field 'colour'.
199 * the value of field 'colour'.
201 public void setColour(final int colour)
203 this._colour = colour;
204 this._has_colour = true;
208 * Sets the value of field 'label'.
211 * the value of field 'label'.
213 public void setLabel(final java.lang.String label)
219 * Sets the value of field 'value'.
222 * the value of field 'value'.
224 public void setValue(final float value)
227 this._has_value = true;
234 * @throws org.exolab.castor.xml.MarshalException
235 * if object is null or if any SAXException is thrown during
237 * @throws org.exolab.castor.xml.ValidationException
238 * if this object is an invalid instance according to the schema
239 * @return the unmarshaled jalview.schemabinding.version2.ThresholdLine
241 public static jalview.schemabinding.version2.ThresholdLine unmarshal(
242 final java.io.Reader reader)
243 throws org.exolab.castor.xml.MarshalException,
244 org.exolab.castor.xml.ValidationException
246 return (jalview.schemabinding.version2.ThresholdLine) Unmarshaller
247 .unmarshal(jalview.schemabinding.version2.ThresholdLine.class,
254 * @throws org.exolab.castor.xml.ValidationException
255 * if this object is an invalid instance according to the schema
257 public void validate() throws org.exolab.castor.xml.ValidationException
259 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
260 validator.validate(this);