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. If not, see <http://www.gnu.org/licenses/>.
17 * The Jalview Authors are detailed in the 'AUTHORS' file.
19 package jalview.schemabinding.version2;
21 //---------------------------------/
22 //- Imported classes and packages -/
23 //---------------------------------/
25 import org.exolab.castor.xml.Marshaller;
26 import org.exolab.castor.xml.Unmarshaller;
29 * Class AnnotationColours.
31 * @version $Revision$ $Date$
33 public class AnnotationColours implements java.io.Serializable
36 // --------------------------/
37 // - Class/Member Variables -/
38 // --------------------------/
41 * Field _aboveThreshold.
43 private int _aboveThreshold;
46 * keeps track of state for field: _aboveThreshold
48 private boolean _has_aboveThreshold;
53 private java.lang.String _annotation;
58 private int _minColour;
61 * keeps track of state for field: _minColour
63 private boolean _has_minColour;
68 private int _maxColour;
71 * keeps track of state for field: _maxColour
73 private boolean _has_maxColour;
76 * Field _colourScheme.
78 private java.lang.String _colourScheme;
83 private float _threshold;
86 * keeps track of state for field: _threshold
88 private boolean _has_threshold;
94 public AnnotationColours()
105 public void deleteAboveThreshold()
107 this._has_aboveThreshold = false;
112 public void deleteMaxColour()
114 this._has_maxColour = false;
119 public void deleteMinColour()
121 this._has_minColour = false;
126 public void deleteThreshold()
128 this._has_threshold = false;
132 * Returns the value of field 'aboveThreshold'.
134 * @return the value of field 'AboveThreshold'.
136 public int getAboveThreshold()
138 return this._aboveThreshold;
142 * Returns the value of field 'annotation'.
144 * @return the value of field 'Annotation'.
146 public java.lang.String getAnnotation()
148 return this._annotation;
152 * Returns the value of field 'colourScheme'.
154 * @return the value of field 'ColourScheme'.
156 public java.lang.String getColourScheme()
158 return this._colourScheme;
162 * Returns the value of field 'maxColour'.
164 * @return the value of field 'MaxColour'.
166 public int getMaxColour()
168 return this._maxColour;
172 * Returns the value of field 'minColour'.
174 * @return the value of field 'MinColour'.
176 public int getMinColour()
178 return this._minColour;
182 * Returns the value of field 'threshold'.
184 * @return the value of field 'Threshold'.
186 public float getThreshold()
188 return this._threshold;
192 * Method hasAboveThreshold.
194 * @return true if at least one AboveThreshold has been added
196 public boolean hasAboveThreshold()
198 return this._has_aboveThreshold;
202 * Method hasMaxColour.
204 * @return true if at least one MaxColour has been added
206 public boolean hasMaxColour()
208 return this._has_maxColour;
212 * Method hasMinColour.
214 * @return true if at least one MinColour has been added
216 public boolean hasMinColour()
218 return this._has_minColour;
222 * Method hasThreshold.
224 * @return true if at least one Threshold has been added
226 public boolean hasThreshold()
228 return this._has_threshold;
234 * @return true if this object is valid according to the schema
236 public boolean isValid()
241 } catch (org.exolab.castor.xml.ValidationException vex)
252 * @throws org.exolab.castor.xml.MarshalException
253 * if object is null or if any SAXException is thrown during
255 * @throws org.exolab.castor.xml.ValidationException
256 * if this object is an invalid instance according to the schema
258 public void marshal(final java.io.Writer out)
259 throws org.exolab.castor.xml.MarshalException,
260 org.exolab.castor.xml.ValidationException
262 Marshaller.marshal(this, out);
269 * @throws java.io.IOException
270 * if an IOException occurs during marshaling
271 * @throws org.exolab.castor.xml.ValidationException
272 * if this object is an invalid instance according to the schema
273 * @throws org.exolab.castor.xml.MarshalException
274 * if object is null or if any SAXException is thrown during
277 public void marshal(final org.xml.sax.ContentHandler handler)
278 throws java.io.IOException,
279 org.exolab.castor.xml.MarshalException,
280 org.exolab.castor.xml.ValidationException
282 Marshaller.marshal(this, handler);
286 * Sets the value of field 'aboveThreshold'.
288 * @param aboveThreshold
289 * the value of field 'aboveThreshold'.
291 public void setAboveThreshold(final int aboveThreshold)
293 this._aboveThreshold = aboveThreshold;
294 this._has_aboveThreshold = true;
298 * Sets the value of field 'annotation'.
301 * the value of field 'annotation'.
303 public void setAnnotation(final java.lang.String annotation)
305 this._annotation = annotation;
309 * Sets the value of field 'colourScheme'.
311 * @param colourScheme
312 * the value of field 'colourScheme'.
314 public void setColourScheme(final java.lang.String colourScheme)
316 this._colourScheme = colourScheme;
320 * Sets the value of field 'maxColour'.
323 * the value of field 'maxColour'.
325 public void setMaxColour(final int maxColour)
327 this._maxColour = maxColour;
328 this._has_maxColour = true;
332 * Sets the value of field 'minColour'.
335 * the value of field 'minColour'.
337 public void setMinColour(final int minColour)
339 this._minColour = minColour;
340 this._has_minColour = true;
344 * Sets the value of field 'threshold'.
347 * the value of field 'threshold'.
349 public void setThreshold(final float threshold)
351 this._threshold = threshold;
352 this._has_threshold = true;
359 * @throws org.exolab.castor.xml.MarshalException
360 * if object is null or if any SAXException is thrown during
362 * @throws org.exolab.castor.xml.ValidationException
363 * if this object is an invalid instance according to the schema
364 * @return the unmarshaled jalview.schemabinding.version2.AnnotationColours
366 public static jalview.schemabinding.version2.AnnotationColours unmarshal(
367 final java.io.Reader reader)
368 throws org.exolab.castor.xml.MarshalException,
369 org.exolab.castor.xml.ValidationException
371 return (jalview.schemabinding.version2.AnnotationColours) Unmarshaller
373 jalview.schemabinding.version2.AnnotationColours.class,
380 * @throws org.exolab.castor.xml.ValidationException
381 * if this object is an invalid instance according to the schema
383 public void validate() throws org.exolab.castor.xml.ValidationException
385 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
386 validator.validate(this);