31affa2e07e2ea54add632dc5e3a03577c45c3bf
[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       //----------------/
56      //- Constructors -/
57     //----------------/
58
59     public ThresholdLine() {
60         super();
61     }
62
63
64       //-----------/
65      //- Methods -/
66     //-----------/
67
68     /**
69      */
70     public void deleteColour(
71     ) {
72         this._has_colour= false;
73     }
74
75     /**
76      */
77     public void deleteValue(
78     ) {
79         this._has_value= false;
80     }
81
82     /**
83      * Returns the value of field 'colour'.
84      * 
85      * @return the value of field 'Colour'.
86      */
87     public int getColour(
88     ) {
89         return this._colour;
90     }
91
92     /**
93      * Returns the value of field 'label'.
94      * 
95      * @return the value of field 'Label'.
96      */
97     public java.lang.String getLabel(
98     ) {
99         return this._label;
100     }
101
102     /**
103      * Returns the value of field 'value'.
104      * 
105      * @return the value of field 'Value'.
106      */
107     public float getValue(
108     ) {
109         return this._value;
110     }
111
112     /**
113      * Method hasColour.
114      * 
115      * @return true if at least one Colour has been added
116      */
117     public boolean hasColour(
118     ) {
119         return this._has_colour;
120     }
121
122     /**
123      * Method hasValue.
124      * 
125      * @return true if at least one Value has been added
126      */
127     public boolean hasValue(
128     ) {
129         return this._has_value;
130     }
131
132     /**
133      * Method isValid.
134      * 
135      * @return true if this object is valid according to the schema
136      */
137     public boolean isValid(
138     ) {
139         try {
140             validate();
141         } catch (org.exolab.castor.xml.ValidationException vex) {
142             return false;
143         }
144         return true;
145     }
146
147     /**
148      * 
149      * 
150      * @param out
151      * @throws org.exolab.castor.xml.MarshalException if object is
152      * null or if any SAXException is thrown during marshaling
153      * @throws org.exolab.castor.xml.ValidationException if this
154      * object is an invalid instance according to the schema
155      */
156     public void marshal(
157             final java.io.Writer out)
158     throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
159         Marshaller.marshal(this, out);
160     }
161
162     /**
163      * 
164      * 
165      * @param handler
166      * @throws java.io.IOException if an IOException occurs during
167      * marshaling
168      * @throws org.exolab.castor.xml.ValidationException if this
169      * object is an invalid instance according to the schema
170      * @throws org.exolab.castor.xml.MarshalException if object is
171      * null or if any SAXException is thrown during marshaling
172      */
173     public void marshal(
174             final org.xml.sax.ContentHandler handler)
175     throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
176         Marshaller.marshal(this, handler);
177     }
178
179     /**
180      * Sets the value of field 'colour'.
181      * 
182      * @param colour the value of field 'colour'.
183      */
184     public void setColour(
185             final int colour) {
186         this._colour = colour;
187         this._has_colour = true;
188     }
189
190     /**
191      * Sets the value of field 'label'.
192      * 
193      * @param label the value of field 'label'.
194      */
195     public void setLabel(
196             final java.lang.String label) {
197         this._label = label;
198     }
199
200     /**
201      * Sets the value of field 'value'.
202      * 
203      * @param value the value of field 'value'.
204      */
205     public void setValue(
206             final float value) {
207         this._value = value;
208         this._has_value = true;
209     }
210
211     /**
212      * Method unmarshal.
213      * 
214      * @param reader
215      * @throws org.exolab.castor.xml.MarshalException if object is
216      * null or if any SAXException is thrown during marshaling
217      * @throws org.exolab.castor.xml.ValidationException if this
218      * object is an invalid instance according to the schema
219      * @return the unmarshaled
220      * jalview.schemabinding.version2.ThresholdLine
221      */
222     public static jalview.schemabinding.version2.ThresholdLine unmarshal(
223             final java.io.Reader reader)
224     throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
225         return (jalview.schemabinding.version2.ThresholdLine) Unmarshaller.unmarshal(jalview.schemabinding.version2.ThresholdLine.class, reader);
226     }
227
228     /**
229      * 
230      * 
231      * @throws org.exolab.castor.xml.ValidationException if this
232      * object is an invalid instance according to the schema
233      */
234     public void validate(
235     )
236     throws org.exolab.castor.xml.ValidationException {
237         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
238         validator.validate(this);
239     }
240
241 }