2 * This class was automatically generated with
\r
3 * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
\r
8 package jalview.schemabinding.version2;
\r
10 //---------------------------------/
\r
11 //- Imported classes and packages -/
\r
12 //---------------------------------/
\r
14 import org.exolab.castor.xml.Marshaller;
\r
15 import org.exolab.castor.xml.Unmarshaller;
\r
20 * @version $Revision$ $Date$
\r
22 public class Colour implements java.io.Serializable {
\r
25 //--------------------------/
\r
26 //- Class/Member Variables -/
\r
27 //--------------------------/
\r
32 private java.lang.String _name;
\r
37 private java.lang.String _RGB;
\r
42 private java.lang.String _minRGB;
\r
45 * loosely specified enumeration: NONE,ABOVE, or BELOW
\r
47 private java.lang.String _threshType;
\r
52 private float _threshold;
\r
55 * keeps track of state for field: _threshold
\r
57 private boolean _has_threshold;
\r
65 * keeps track of state for field: _max
\r
67 private boolean _has_max;
\r
75 * keeps track of state for field: _min
\r
77 private boolean _has_min;
\r
80 * Field _colourByLabel.
\r
82 private boolean _colourByLabel;
\r
85 * keeps track of state for field: _colourByLabel
\r
87 private boolean _has_colourByLabel;
\r
92 private boolean _autoScale;
\r
95 * keeps track of state for field: _autoScale
\r
97 private boolean _has_autoScale;
\r
100 //----------------/
\r
101 //- Constructors -/
\r
102 //----------------/
\r
115 public void deleteAutoScale(
\r
117 this._has_autoScale= false;
\r
122 public void deleteColourByLabel(
\r
124 this._has_colourByLabel= false;
\r
129 public void deleteMax(
\r
131 this._has_max= false;
\r
136 public void deleteMin(
\r
138 this._has_min= false;
\r
143 public void deleteThreshold(
\r
145 this._has_threshold= false;
\r
149 * Returns the value of field 'autoScale'.
\r
151 * @return the value of field 'AutoScale'.
\r
153 public boolean getAutoScale(
\r
155 return this._autoScale;
\r
159 * Returns the value of field 'colourByLabel'.
\r
161 * @return the value of field 'ColourByLabel'.
\r
163 public boolean getColourByLabel(
\r
165 return this._colourByLabel;
\r
169 * Returns the value of field 'max'.
\r
171 * @return the value of field 'Max'.
\r
173 public float getMax(
\r
179 * Returns the value of field 'min'.
\r
181 * @return the value of field 'Min'.
\r
183 public float getMin(
\r
189 * Returns the value of field 'minRGB'.
\r
191 * @return the value of field 'MinRGB'.
\r
193 public java.lang.String getMinRGB(
\r
195 return this._minRGB;
\r
199 * Returns the value of field 'name'.
\r
201 * @return the value of field 'Name'.
\r
203 public java.lang.String getName(
\r
209 * Returns the value of field 'RGB'.
\r
211 * @return the value of field 'RGB'.
\r
213 public java.lang.String getRGB(
\r
219 * Returns the value of field 'threshType'. The field
\r
220 * 'threshType' has the following description: loosely
\r
221 * specified enumeration: NONE,ABOVE, or BELOW
\r
223 * @return the value of field 'ThreshType'.
\r
225 public java.lang.String getThreshType(
\r
227 return this._threshType;
\r
231 * Returns the value of field 'threshold'.
\r
233 * @return the value of field 'Threshold'.
\r
235 public float getThreshold(
\r
237 return this._threshold;
\r
241 * Method hasAutoScale.
\r
243 * @return true if at least one AutoScale has been added
\r
245 public boolean hasAutoScale(
\r
247 return this._has_autoScale;
\r
251 * Method hasColourByLabel.
\r
253 * @return true if at least one ColourByLabel has been added
\r
255 public boolean hasColourByLabel(
\r
257 return this._has_colourByLabel;
\r
263 * @return true if at least one Max has been added
\r
265 public boolean hasMax(
\r
267 return this._has_max;
\r
273 * @return true if at least one Min has been added
\r
275 public boolean hasMin(
\r
277 return this._has_min;
\r
281 * Method hasThreshold.
\r
283 * @return true if at least one Threshold has been added
\r
285 public boolean hasThreshold(
\r
287 return this._has_threshold;
\r
291 * Returns the value of field 'autoScale'.
\r
293 * @return the value of field 'AutoScale'.
\r
295 public boolean isAutoScale(
\r
297 return this._autoScale;
\r
301 * Returns the value of field 'colourByLabel'.
\r
303 * @return the value of field 'ColourByLabel'.
\r
305 public boolean isColourByLabel(
\r
307 return this._colourByLabel;
\r
313 * @return true if this object is valid according to the schema
\r
315 public boolean isValid(
\r
319 } catch (org.exolab.castor.xml.ValidationException vex) {
\r
329 * @throws org.exolab.castor.xml.MarshalException if object is
\r
330 * null or if any SAXException is thrown during marshaling
\r
331 * @throws org.exolab.castor.xml.ValidationException if this
\r
332 * object is an invalid instance according to the schema
\r
334 public void marshal(
\r
335 final java.io.Writer out)
\r
336 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
\r
337 Marshaller.marshal(this, out);
\r
344 * @throws java.io.IOException if an IOException occurs during
\r
346 * @throws org.exolab.castor.xml.ValidationException if this
\r
347 * object is an invalid instance according to the schema
\r
348 * @throws org.exolab.castor.xml.MarshalException if object is
\r
349 * null or if any SAXException is thrown during marshaling
\r
351 public void marshal(
\r
352 final org.xml.sax.ContentHandler handler)
\r
353 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
\r
354 Marshaller.marshal(this, handler);
\r
358 * Sets the value of field 'autoScale'.
\r
360 * @param autoScale the value of field 'autoScale'.
\r
362 public void setAutoScale(
\r
363 final boolean autoScale) {
\r
364 this._autoScale = autoScale;
\r
365 this._has_autoScale = true;
\r
369 * Sets the value of field 'colourByLabel'.
\r
371 * @param colourByLabel the value of field 'colourByLabel'.
\r
373 public void setColourByLabel(
\r
374 final boolean colourByLabel) {
\r
375 this._colourByLabel = colourByLabel;
\r
376 this._has_colourByLabel = true;
\r
380 * Sets the value of field 'max'.
\r
382 * @param max the value of field 'max'.
\r
384 public void setMax(
\r
387 this._has_max = true;
\r
391 * Sets the value of field 'min'.
\r
393 * @param min the value of field 'min'.
\r
395 public void setMin(
\r
398 this._has_min = true;
\r
402 * Sets the value of field 'minRGB'.
\r
404 * @param minRGB the value of field 'minRGB'.
\r
406 public void setMinRGB(
\r
407 final java.lang.String minRGB) {
\r
408 this._minRGB = minRGB;
\r
412 * Sets the value of field 'name'.
\r
414 * @param name the value of field 'name'.
\r
416 public void setName(
\r
417 final java.lang.String name) {
\r
422 * Sets the value of field 'RGB'.
\r
424 * @param RGB the value of field 'RGB'.
\r
426 public void setRGB(
\r
427 final java.lang.String RGB) {
\r
432 * Sets the value of field 'threshType'. The field 'threshType'
\r
433 * has the following description: loosely specified
\r
434 * enumeration: NONE,ABOVE, or BELOW
\r
436 * @param threshType the value of field 'threshType'.
\r
438 public void setThreshType(
\r
439 final java.lang.String threshType) {
\r
440 this._threshType = threshType;
\r
444 * Sets the value of field 'threshold'.
\r
446 * @param threshold the value of field 'threshold'.
\r
448 public void setThreshold(
\r
449 final float threshold) {
\r
450 this._threshold = threshold;
\r
451 this._has_threshold = true;
\r
455 * Method unmarshal.
\r
458 * @throws org.exolab.castor.xml.MarshalException if object is
\r
459 * null or if any SAXException is thrown during marshaling
\r
460 * @throws org.exolab.castor.xml.ValidationException if this
\r
461 * object is an invalid instance according to the schema
\r
462 * @return the unmarshaled jalview.schemabinding.version2.Colour
\r
464 public static jalview.schemabinding.version2.Colour unmarshal(
\r
465 final java.io.Reader reader)
\r
466 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
\r
467 return (jalview.schemabinding.version2.Colour) Unmarshaller.unmarshal(jalview.schemabinding.version2.Colour.class, reader);
\r
473 * @throws org.exolab.castor.xml.ValidationException if this
\r
474 * object is an invalid instance according to the schema
\r
476 public void validate(
\r
478 throws org.exolab.castor.xml.ValidationException {
\r
479 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
\r
480 validator.validate(this);
\r