1 /*******************************************************************************
2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
3 * Copyright (C) 2011 J Procter, AM Waterhouse, J Engelhardt, LM Lui, 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/>.
17 *******************************************************************************/
19 * This class was automatically generated with
20 * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
25 package jalview.schemabinding.version2;
27 //---------------------------------/
28 //- Imported classes and packages -/
29 //---------------------------------/
31 import org.exolab.castor.xml.Marshaller;
32 import org.exolab.castor.xml.Unmarshaller;
35 * Class ThresholdLine.
37 * @version $Revision$ $Date$
39 public class ThresholdLine implements java.io.Serializable {
42 //--------------------------/
43 //- Class/Member Variables -/
44 //--------------------------/
49 private java.lang.String _label;
57 * keeps track of state for field: _value
59 private boolean _has_value;
67 * keeps track of state for field: _colour
69 private boolean _has_colour;
76 public ThresholdLine() {
87 public void deleteColour(
89 this._has_colour= false;
94 public void deleteValue(
96 this._has_value= false;
100 * Returns the value of field 'colour'.
102 * @return the value of field 'Colour'.
104 public int getColour(
110 * Returns the value of field 'label'.
112 * @return the value of field 'Label'.
114 public java.lang.String getLabel(
120 * Returns the value of field 'value'.
122 * @return the value of field 'Value'.
124 public float getValue(
132 * @return true if at least one Colour has been added
134 public boolean hasColour(
136 return this._has_colour;
142 * @return true if at least one Value has been added
144 public boolean hasValue(
146 return this._has_value;
152 * @return true if this object is valid according to the schema
154 public boolean isValid(
158 } catch (org.exolab.castor.xml.ValidationException vex) {
168 * @throws org.exolab.castor.xml.MarshalException if object is
169 * null or if any SAXException is thrown during marshaling
170 * @throws org.exolab.castor.xml.ValidationException if this
171 * object is an invalid instance according to the schema
174 final java.io.Writer out)
175 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
176 Marshaller.marshal(this, out);
183 * @throws java.io.IOException if an IOException occurs during
185 * @throws org.exolab.castor.xml.ValidationException if this
186 * object is an invalid instance according to the schema
187 * @throws org.exolab.castor.xml.MarshalException if object is
188 * null or if any SAXException is thrown during marshaling
191 final org.xml.sax.ContentHandler handler)
192 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
193 Marshaller.marshal(this, handler);
197 * Sets the value of field 'colour'.
199 * @param colour the value of field 'colour'.
201 public void setColour(
203 this._colour = colour;
204 this._has_colour = true;
208 * Sets the value of field 'label'.
210 * @param label the value of field 'label'.
212 public void setLabel(
213 final java.lang.String label) {
218 * Sets the value of field 'value'.
220 * @param value the value of field 'value'.
222 public void setValue(
225 this._has_value = true;
232 * @throws org.exolab.castor.xml.MarshalException if object is
233 * null or if any SAXException is thrown during marshaling
234 * @throws org.exolab.castor.xml.ValidationException if this
235 * object is an invalid instance according to the schema
236 * @return the unmarshaled
237 * jalview.schemabinding.version2.ThresholdLine
239 public static jalview.schemabinding.version2.ThresholdLine unmarshal(
240 final java.io.Reader reader)
241 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
242 return (jalview.schemabinding.version2.ThresholdLine) Unmarshaller.unmarshal(jalview.schemabinding.version2.ThresholdLine.class, reader);
248 * @throws org.exolab.castor.xml.ValidationException if this
249 * object is an invalid instance according to the schema
251 public void validate(
253 throws org.exolab.castor.xml.ValidationException {
254 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
255 validator.validate(this);