1 /*******************************************************************************
2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
3 * Copyright (C) 2011 J Procter, AM Waterhouse, J Engelhardt, LM Lui, G Barton, M Clamp, S Searle
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. If not, see <http://www.gnu.org/licenses/>.
17 *******************************************************************************/
19 * This class was automatically generated with
20 * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
25 package jalview.schemabinding.version2;
27 //---------------------------------/
28 //- Imported classes and packages -/
29 //---------------------------------/
31 import org.exolab.castor.xml.Marshaller;
32 import org.exolab.castor.xml.Unmarshaller;
35 * Class AnnotationColours.
37 * @version $Revision$ $Date$
39 public class AnnotationColours implements java.io.Serializable {
42 //--------------------------/
43 //- Class/Member Variables -/
44 //--------------------------/
47 * Field _aboveThreshold.
49 private int _aboveThreshold;
52 * keeps track of state for field: _aboveThreshold
54 private boolean _has_aboveThreshold;
59 private java.lang.String _annotation;
64 private int _minColour;
67 * keeps track of state for field: _minColour
69 private boolean _has_minColour;
74 private int _maxColour;
77 * keeps track of state for field: _maxColour
79 private boolean _has_maxColour;
82 * Field _colourScheme.
84 private java.lang.String _colourScheme;
89 private float _threshold;
92 * keeps track of state for field: _threshold
94 private boolean _has_threshold;
101 public AnnotationColours() {
112 public void deleteAboveThreshold(
114 this._has_aboveThreshold= false;
119 public void deleteMaxColour(
121 this._has_maxColour= false;
126 public void deleteMinColour(
128 this._has_minColour= false;
133 public void deleteThreshold(
135 this._has_threshold= false;
139 * Returns the value of field 'aboveThreshold'.
141 * @return the value of field 'AboveThreshold'.
143 public int getAboveThreshold(
145 return this._aboveThreshold;
149 * Returns the value of field 'annotation'.
151 * @return the value of field 'Annotation'.
153 public java.lang.String getAnnotation(
155 return this._annotation;
159 * Returns the value of field 'colourScheme'.
161 * @return the value of field 'ColourScheme'.
163 public java.lang.String getColourScheme(
165 return this._colourScheme;
169 * Returns the value of field 'maxColour'.
171 * @return the value of field 'MaxColour'.
173 public int getMaxColour(
175 return this._maxColour;
179 * Returns the value of field 'minColour'.
181 * @return the value of field 'MinColour'.
183 public int getMinColour(
185 return this._minColour;
189 * Returns the value of field 'threshold'.
191 * @return the value of field 'Threshold'.
193 public float getThreshold(
195 return this._threshold;
199 * Method hasAboveThreshold.
201 * @return true if at least one AboveThreshold has been added
203 public boolean hasAboveThreshold(
205 return this._has_aboveThreshold;
209 * Method hasMaxColour.
211 * @return true if at least one MaxColour has been added
213 public boolean hasMaxColour(
215 return this._has_maxColour;
219 * Method hasMinColour.
221 * @return true if at least one MinColour has been added
223 public boolean hasMinColour(
225 return this._has_minColour;
229 * Method hasThreshold.
231 * @return true if at least one Threshold has been added
233 public boolean hasThreshold(
235 return this._has_threshold;
241 * @return true if this object is valid according to the schema
243 public boolean isValid(
247 } catch (org.exolab.castor.xml.ValidationException vex) {
257 * @throws org.exolab.castor.xml.MarshalException if object is
258 * null or if any SAXException is thrown during marshaling
259 * @throws org.exolab.castor.xml.ValidationException if this
260 * object is an invalid instance according to the schema
263 final java.io.Writer out)
264 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
265 Marshaller.marshal(this, out);
272 * @throws java.io.IOException if an IOException occurs during
274 * @throws org.exolab.castor.xml.ValidationException if this
275 * object is an invalid instance according to the schema
276 * @throws org.exolab.castor.xml.MarshalException if object is
277 * null or if any SAXException is thrown during marshaling
280 final org.xml.sax.ContentHandler handler)
281 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
282 Marshaller.marshal(this, handler);
286 * Sets the value of field 'aboveThreshold'.
288 * @param aboveThreshold the value of field 'aboveThreshold'.
290 public void setAboveThreshold(
291 final int aboveThreshold) {
292 this._aboveThreshold = aboveThreshold;
293 this._has_aboveThreshold = true;
297 * Sets the value of field 'annotation'.
299 * @param annotation the value of field 'annotation'.
301 public void setAnnotation(
302 final java.lang.String annotation) {
303 this._annotation = annotation;
307 * Sets the value of field 'colourScheme'.
309 * @param colourScheme the value of field 'colourScheme'.
311 public void setColourScheme(
312 final java.lang.String colourScheme) {
313 this._colourScheme = colourScheme;
317 * Sets the value of field 'maxColour'.
319 * @param maxColour the value of field 'maxColour'.
321 public void setMaxColour(
322 final int maxColour) {
323 this._maxColour = maxColour;
324 this._has_maxColour = true;
328 * Sets the value of field 'minColour'.
330 * @param minColour the value of field 'minColour'.
332 public void setMinColour(
333 final int minColour) {
334 this._minColour = minColour;
335 this._has_minColour = true;
339 * Sets the value of field 'threshold'.
341 * @param threshold the value of field 'threshold'.
343 public void setThreshold(
344 final float threshold) {
345 this._threshold = threshold;
346 this._has_threshold = true;
353 * @throws org.exolab.castor.xml.MarshalException if object is
354 * null or if any SAXException is thrown during marshaling
355 * @throws org.exolab.castor.xml.ValidationException if this
356 * object is an invalid instance according to the schema
357 * @return the unmarshaled
358 * jalview.schemabinding.version2.AnnotationColours
360 public static jalview.schemabinding.version2.AnnotationColours unmarshal(
361 final java.io.Reader reader)
362 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
363 return (jalview.schemabinding.version2.AnnotationColours) Unmarshaller.unmarshal(jalview.schemabinding.version2.AnnotationColours.class, reader);
369 * @throws org.exolab.castor.xml.ValidationException if this
370 * object is an invalid instance according to the schema
372 public void validate(
374 throws org.exolab.castor.xml.ValidationException {
375 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
376 validator.validate(this);