1 /*******************************************************************************
2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
3 * Copyright (C) 2014 The Jalview Authors
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.
17 * If not, see <http://www.gnu.org/licenses/>.
18 * The Jalview Authors are detailed in the 'AUTHORS' file.
19 ******************************************************************************/
21 * This class was automatically generated with
22 * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
27 package jalview.schemabinding.version2;
29 //---------------------------------/
30 //- Imported classes and packages -/
31 //---------------------------------/
33 import org.exolab.castor.xml.Marshaller;
34 import org.exolab.castor.xml.Unmarshaller;
37 * Class AnnotationColourScheme.
39 * @version $Revision$ $Date$
41 public class AnnotationColourScheme implements java.io.Serializable
44 // --------------------------/
45 // - Class/Member Variables -/
46 // --------------------------/
49 * Field _aboveThreshold.
51 private int _aboveThreshold;
54 * keeps track of state for field: _aboveThreshold
56 private boolean _has_aboveThreshold;
61 private java.lang.String _annotation;
66 private int _minColour;
69 * keeps track of state for field: _minColour
71 private boolean _has_minColour;
76 private int _maxColour;
79 * keeps track of state for field: _maxColour
81 private boolean _has_maxColour;
84 * Field _colourScheme.
86 private java.lang.String _colourScheme;
91 private float _threshold;
94 * keeps track of state for field: _threshold
96 private boolean _has_threshold;
101 private boolean _perSequence;
104 * keeps track of state for field: _perSequence
106 private boolean _has_perSequence;
109 * Field _predefinedColours.
111 private boolean _predefinedColours;
114 * keeps track of state for field: _predefinedColours
116 private boolean _has_predefinedColours;
122 public AnnotationColourScheme()
133 public void deleteAboveThreshold()
135 this._has_aboveThreshold = false;
140 public void deleteMaxColour()
142 this._has_maxColour = false;
147 public void deleteMinColour()
149 this._has_minColour = false;
154 public void deletePerSequence()
156 this._has_perSequence = false;
161 public void deletePredefinedColours()
163 this._has_predefinedColours = false;
168 public void deleteThreshold()
170 this._has_threshold = false;
174 * Returns the value of field 'aboveThreshold'.
176 * @return the value of field 'AboveThreshold'.
178 public int getAboveThreshold()
180 return this._aboveThreshold;
184 * Returns the value of field 'annotation'.
186 * @return the value of field 'Annotation'.
188 public java.lang.String getAnnotation()
190 return this._annotation;
194 * Returns the value of field 'colourScheme'.
196 * @return the value of field 'ColourScheme'.
198 public java.lang.String getColourScheme()
200 return this._colourScheme;
204 * Returns the value of field 'maxColour'.
206 * @return the value of field 'MaxColour'.
208 public int getMaxColour()
210 return this._maxColour;
214 * Returns the value of field 'minColour'.
216 * @return the value of field 'MinColour'.
218 public int getMinColour()
220 return this._minColour;
224 * Returns the value of field 'perSequence'.
226 * @return the value of field 'PerSequence'.
228 public boolean getPerSequence()
230 return this._perSequence;
234 * Returns the value of field 'predefinedColours'.
236 * @return the value of field 'PredefinedColours'.
238 public boolean getPredefinedColours()
240 return this._predefinedColours;
244 * Returns the value of field 'threshold'.
246 * @return the value of field 'Threshold'.
248 public float getThreshold()
250 return this._threshold;
254 * Method hasAboveThreshold.
256 * @return true if at least one AboveThreshold has been added
258 public boolean hasAboveThreshold()
260 return this._has_aboveThreshold;
264 * Method hasMaxColour.
266 * @return true if at least one MaxColour has been added
268 public boolean hasMaxColour()
270 return this._has_maxColour;
274 * Method hasMinColour.
276 * @return true if at least one MinColour has been added
278 public boolean hasMinColour()
280 return this._has_minColour;
284 * Method hasPerSequence.
286 * @return true if at least one PerSequence has been added
288 public boolean hasPerSequence()
290 return this._has_perSequence;
294 * Method hasPredefinedColours.
296 * @return true if at least one PredefinedColours has been added
298 public boolean hasPredefinedColours()
300 return this._has_predefinedColours;
304 * Method hasThreshold.
306 * @return true if at least one Threshold has been added
308 public boolean hasThreshold()
310 return this._has_threshold;
314 * Returns the value of field 'perSequence'.
316 * @return the value of field 'PerSequence'.
318 public boolean isPerSequence()
320 return this._perSequence;
324 * Returns the value of field 'predefinedColours'.
326 * @return the value of field 'PredefinedColours'.
328 public boolean isPredefinedColours()
330 return this._predefinedColours;
336 * @return true if this object is valid according to the schema
338 public boolean isValid()
343 } catch (org.exolab.castor.xml.ValidationException vex)
354 * @throws org.exolab.castor.xml.MarshalException
355 * if object is null or if any SAXException is thrown during
357 * @throws org.exolab.castor.xml.ValidationException
358 * if this object is an invalid instance according to the schema
360 public void marshal(final java.io.Writer out)
361 throws org.exolab.castor.xml.MarshalException,
362 org.exolab.castor.xml.ValidationException
364 Marshaller.marshal(this, out);
371 * @throws java.io.IOException
372 * if an IOException occurs during marshaling
373 * @throws org.exolab.castor.xml.ValidationException
374 * if this object is an invalid instance according to the schema
375 * @throws org.exolab.castor.xml.MarshalException
376 * if object is null or if any SAXException is thrown during
379 public void marshal(final org.xml.sax.ContentHandler handler)
380 throws java.io.IOException,
381 org.exolab.castor.xml.MarshalException,
382 org.exolab.castor.xml.ValidationException
384 Marshaller.marshal(this, handler);
388 * Sets the value of field 'aboveThreshold'.
390 * @param aboveThreshold
391 * the value of field 'aboveThreshold'.
393 public void setAboveThreshold(final int aboveThreshold)
395 this._aboveThreshold = aboveThreshold;
396 this._has_aboveThreshold = true;
400 * Sets the value of field 'annotation'.
403 * the value of field 'annotation'.
405 public void setAnnotation(final java.lang.String annotation)
407 this._annotation = annotation;
411 * Sets the value of field 'colourScheme'.
413 * @param colourScheme
414 * the value of field 'colourScheme'.
416 public void setColourScheme(final java.lang.String colourScheme)
418 this._colourScheme = colourScheme;
422 * Sets the value of field 'maxColour'.
425 * the value of field 'maxColour'.
427 public void setMaxColour(final int maxColour)
429 this._maxColour = maxColour;
430 this._has_maxColour = true;
434 * Sets the value of field 'minColour'.
437 * the value of field 'minColour'.
439 public void setMinColour(final int minColour)
441 this._minColour = minColour;
442 this._has_minColour = true;
446 * Sets the value of field 'perSequence'.
449 * the value of field 'perSequence'.
451 public void setPerSequence(final boolean perSequence)
453 this._perSequence = perSequence;
454 this._has_perSequence = true;
458 * Sets the value of field 'predefinedColours'.
460 * @param predefinedColours
461 * the value of field 'predefinedColours'.
463 public void setPredefinedColours(final boolean predefinedColours)
465 this._predefinedColours = predefinedColours;
466 this._has_predefinedColours = true;
470 * Sets the value of field 'threshold'.
473 * the value of field 'threshold'.
475 public void setThreshold(final float threshold)
477 this._threshold = threshold;
478 this._has_threshold = true;
485 * @throws org.exolab.castor.xml.MarshalException
486 * if object is null or if any SAXException is thrown during
488 * @throws org.exolab.castor.xml.ValidationException
489 * if this object is an invalid instance according to the schema
490 * @return the unmarshaled
491 * jalview.schemabinding.version2.AnnotationColourScheme
493 public static jalview.schemabinding.version2.AnnotationColourScheme unmarshal(
494 final java.io.Reader reader)
495 throws org.exolab.castor.xml.MarshalException,
496 org.exolab.castor.xml.ValidationException
498 return (jalview.schemabinding.version2.AnnotationColourScheme) Unmarshaller
500 jalview.schemabinding.version2.AnnotationColourScheme.class,
507 * @throws org.exolab.castor.xml.ValidationException
508 * if this object is an invalid instance according to the schema
510 public void validate() throws org.exolab.castor.xml.ValidationException
512 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
513 validator.validate(this);