Copyright test
[jalview.git] / src / jalview / schemabinding / version2 / ThresholdLine.java
1 /*******************************************************************************
2  * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
3  * Copyright (C) $(date) The Jalview Authors
4  *
5  * This file is part of Jalview.
6  *  
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.
11  *   
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.
16  *
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.
20  *******************************************************************************/
21 /*
22  * This class was automatically generated with 
23  * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
24  * Schema.
25  * $Id$
26  */
27
28 package jalview.schemabinding.version2;
29
30 //---------------------------------/
31 //- Imported classes and packages -/
32 //---------------------------------/
33
34 import org.exolab.castor.xml.Marshaller;
35 import org.exolab.castor.xml.Unmarshaller;
36
37 /**
38  * Class ThresholdLine.
39  * 
40  * @version $Revision$ $Date$
41  */
42 public class ThresholdLine implements java.io.Serializable
43 {
44
45   // --------------------------/
46   // - Class/Member Variables -/
47   // --------------------------/
48
49   /**
50    * Field _label.
51    */
52   private java.lang.String _label;
53
54   /**
55    * Field _value.
56    */
57   private float _value;
58
59   /**
60    * keeps track of state for field: _value
61    */
62   private boolean _has_value;
63
64   /**
65    * Field _colour.
66    */
67   private int _colour;
68
69   /**
70    * keeps track of state for field: _colour
71    */
72   private boolean _has_colour;
73
74   // ----------------/
75   // - Constructors -/
76   // ----------------/
77
78   public ThresholdLine()
79   {
80     super();
81   }
82
83   // -----------/
84   // - Methods -/
85   // -----------/
86
87   /**
88      */
89   public void deleteColour()
90   {
91     this._has_colour = false;
92   }
93
94   /**
95      */
96   public void deleteValue()
97   {
98     this._has_value = false;
99   }
100
101   /**
102    * Returns the value of field 'colour'.
103    * 
104    * @return the value of field 'Colour'.
105    */
106   public int getColour()
107   {
108     return this._colour;
109   }
110
111   /**
112    * Returns the value of field 'label'.
113    * 
114    * @return the value of field 'Label'.
115    */
116   public java.lang.String getLabel()
117   {
118     return this._label;
119   }
120
121   /**
122    * Returns the value of field 'value'.
123    * 
124    * @return the value of field 'Value'.
125    */
126   public float getValue()
127   {
128     return this._value;
129   }
130
131   /**
132    * Method hasColour.
133    * 
134    * @return true if at least one Colour has been added
135    */
136   public boolean hasColour()
137   {
138     return this._has_colour;
139   }
140
141   /**
142    * Method hasValue.
143    * 
144    * @return true if at least one Value has been added
145    */
146   public boolean hasValue()
147   {
148     return this._has_value;
149   }
150
151   /**
152    * Method isValid.
153    * 
154    * @return true if this object is valid according to the schema
155    */
156   public boolean isValid()
157   {
158     try
159     {
160       validate();
161     } catch (org.exolab.castor.xml.ValidationException vex)
162     {
163       return false;
164     }
165     return true;
166   }
167
168   /**
169    * 
170    * 
171    * @param out
172    * @throws org.exolab.castor.xml.MarshalException
173    *           if object is null or if any SAXException is thrown during
174    *           marshaling
175    * @throws org.exolab.castor.xml.ValidationException
176    *           if this object is an invalid instance according to the schema
177    */
178   public void marshal(final java.io.Writer out)
179           throws org.exolab.castor.xml.MarshalException,
180           org.exolab.castor.xml.ValidationException
181   {
182     Marshaller.marshal(this, out);
183   }
184
185   /**
186    * 
187    * 
188    * @param handler
189    * @throws java.io.IOException
190    *           if an IOException occurs during marshaling
191    * @throws org.exolab.castor.xml.ValidationException
192    *           if this object is an invalid instance according to the schema
193    * @throws org.exolab.castor.xml.MarshalException
194    *           if object is null or if any SAXException is thrown during
195    *           marshaling
196    */
197   public void marshal(final org.xml.sax.ContentHandler handler)
198           throws java.io.IOException,
199           org.exolab.castor.xml.MarshalException,
200           org.exolab.castor.xml.ValidationException
201   {
202     Marshaller.marshal(this, handler);
203   }
204
205   /**
206    * Sets the value of field 'colour'.
207    * 
208    * @param colour
209    *          the value of field 'colour'.
210    */
211   public void setColour(final int colour)
212   {
213     this._colour = colour;
214     this._has_colour = true;
215   }
216
217   /**
218    * Sets the value of field 'label'.
219    * 
220    * @param label
221    *          the value of field 'label'.
222    */
223   public void setLabel(final java.lang.String label)
224   {
225     this._label = label;
226   }
227
228   /**
229    * Sets the value of field 'value'.
230    * 
231    * @param value
232    *          the value of field 'value'.
233    */
234   public void setValue(final float value)
235   {
236     this._value = value;
237     this._has_value = true;
238   }
239
240   /**
241    * Method unmarshal.
242    * 
243    * @param reader
244    * @throws org.exolab.castor.xml.MarshalException
245    *           if object is null or if any SAXException is thrown during
246    *           marshaling
247    * @throws org.exolab.castor.xml.ValidationException
248    *           if this object is an invalid instance according to the schema
249    * @return the unmarshaled jalview.schemabinding.version2.ThresholdLine
250    */
251   public static jalview.schemabinding.version2.ThresholdLine unmarshal(
252           final java.io.Reader reader)
253           throws org.exolab.castor.xml.MarshalException,
254           org.exolab.castor.xml.ValidationException
255   {
256     return (jalview.schemabinding.version2.ThresholdLine) Unmarshaller
257             .unmarshal(jalview.schemabinding.version2.ThresholdLine.class,
258                     reader);
259   }
260
261   /**
262    * 
263    * 
264    * @throws org.exolab.castor.xml.ValidationException
265    *           if this object is an invalid instance according to the schema
266    */
267   public void validate() throws org.exolab.castor.xml.ValidationException
268   {
269     org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
270     validator.validate(this);
271   }
272
273 }