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