2 * This class was automatically generated with
3 * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
8 package jalview.schemabinding.version2;
10 //---------------------------------/
11 //- Imported classes and packages -/
12 //---------------------------------/
14 import org.exolab.castor.xml.Marshaller;
15 import org.exolab.castor.xml.Unmarshaller;
18 * Class AnnotationColours.
20 * @version $Revision$ $Date$
22 public class AnnotationColours implements java.io.Serializable {
25 //--------------------------/
26 //- Class/Member Variables -/
27 //--------------------------/
30 * Field _aboveThreshold.
32 private int _aboveThreshold;
35 * keeps track of state for field: _aboveThreshold
37 private boolean _has_aboveThreshold;
42 private java.lang.String _annotation;
47 private int _minColour;
50 * keeps track of state for field: _minColour
52 private boolean _has_minColour;
57 private int _maxColour;
60 * keeps track of state for field: _maxColour
62 private boolean _has_maxColour;
65 * Field _colourScheme.
67 private java.lang.String _colourScheme;
72 private float _threshold;
75 * keeps track of state for field: _threshold
77 private boolean _has_threshold;
82 private boolean _perSequence;
85 * keeps track of state for field: _perSequence
87 private boolean _has_perSequence;
90 * Field _predefinedColours.
92 private boolean _predefinedColours;
95 * keeps track of state for field: _predefinedColours
97 private boolean _has_predefinedColours;
104 public AnnotationColours() {
115 public void deleteAboveThreshold(
117 this._has_aboveThreshold= false;
122 public void deleteMaxColour(
124 this._has_maxColour= false;
129 public void deleteMinColour(
131 this._has_minColour= false;
136 public void deletePerSequence(
138 this._has_perSequence= false;
143 public void deletePredefinedColours(
145 this._has_predefinedColours= false;
150 public void deleteThreshold(
152 this._has_threshold= false;
156 * Returns the value of field 'aboveThreshold'.
158 * @return the value of field 'AboveThreshold'.
160 public int getAboveThreshold(
162 return this._aboveThreshold;
166 * Returns the value of field 'annotation'.
168 * @return the value of field 'Annotation'.
170 public java.lang.String getAnnotation(
172 return this._annotation;
176 * Returns the value of field 'colourScheme'.
178 * @return the value of field 'ColourScheme'.
180 public java.lang.String getColourScheme(
182 return this._colourScheme;
186 * Returns the value of field 'maxColour'.
188 * @return the value of field 'MaxColour'.
190 public int getMaxColour(
192 return this._maxColour;
196 * Returns the value of field 'minColour'.
198 * @return the value of field 'MinColour'.
200 public int getMinColour(
202 return this._minColour;
206 * Returns the value of field 'perSequence'.
208 * @return the value of field 'PerSequence'.
210 public boolean getPerSequence(
212 return this._perSequence;
216 * Returns the value of field 'predefinedColours'.
218 * @return the value of field 'PredefinedColours'.
220 public boolean getPredefinedColours(
222 return this._predefinedColours;
226 * Returns the value of field 'threshold'.
228 * @return the value of field 'Threshold'.
230 public float getThreshold(
232 return this._threshold;
236 * Method hasAboveThreshold.
238 * @return true if at least one AboveThreshold has been added
240 public boolean hasAboveThreshold(
242 return this._has_aboveThreshold;
246 * Method hasMaxColour.
248 * @return true if at least one MaxColour has been added
250 public boolean hasMaxColour(
252 return this._has_maxColour;
256 * Method hasMinColour.
258 * @return true if at least one MinColour has been added
260 public boolean hasMinColour(
262 return this._has_minColour;
266 * Method hasPerSequence.
268 * @return true if at least one PerSequence has been added
270 public boolean hasPerSequence(
272 return this._has_perSequence;
276 * Method hasPredefinedColours.
278 * @return true if at least one PredefinedColours has been added
280 public boolean hasPredefinedColours(
282 return this._has_predefinedColours;
286 * Method hasThreshold.
288 * @return true if at least one Threshold has been added
290 public boolean hasThreshold(
292 return this._has_threshold;
296 * Returns the value of field 'perSequence'.
298 * @return the value of field 'PerSequence'.
300 public boolean isPerSequence(
302 return this._perSequence;
306 * Returns the value of field 'predefinedColours'.
308 * @return the value of field 'PredefinedColours'.
310 public boolean isPredefinedColours(
312 return this._predefinedColours;
318 * @return true if this object is valid according to the schema
320 public boolean isValid(
324 } catch (org.exolab.castor.xml.ValidationException vex) {
334 * @throws org.exolab.castor.xml.MarshalException if object is
335 * null or if any SAXException is thrown during marshaling
336 * @throws org.exolab.castor.xml.ValidationException if this
337 * object is an invalid instance according to the schema
340 final java.io.Writer out)
341 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
342 Marshaller.marshal(this, out);
349 * @throws java.io.IOException if an IOException occurs during
351 * @throws org.exolab.castor.xml.ValidationException if this
352 * object is an invalid instance according to the schema
353 * @throws org.exolab.castor.xml.MarshalException if object is
354 * null or if any SAXException is thrown during marshaling
357 final org.xml.sax.ContentHandler handler)
358 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
359 Marshaller.marshal(this, handler);
363 * Sets the value of field 'aboveThreshold'.
365 * @param aboveThreshold the value of field 'aboveThreshold'.
367 public void setAboveThreshold(
368 final int aboveThreshold) {
369 this._aboveThreshold = aboveThreshold;
370 this._has_aboveThreshold = true;
374 * Sets the value of field 'annotation'.
376 * @param annotation the value of field 'annotation'.
378 public void setAnnotation(
379 final java.lang.String annotation) {
380 this._annotation = annotation;
384 * Sets the value of field 'colourScheme'.
386 * @param colourScheme the value of field 'colourScheme'.
388 public void setColourScheme(
389 final java.lang.String colourScheme) {
390 this._colourScheme = colourScheme;
394 * Sets the value of field 'maxColour'.
396 * @param maxColour the value of field 'maxColour'.
398 public void setMaxColour(
399 final int maxColour) {
400 this._maxColour = maxColour;
401 this._has_maxColour = true;
405 * Sets the value of field 'minColour'.
407 * @param minColour the value of field 'minColour'.
409 public void setMinColour(
410 final int minColour) {
411 this._minColour = minColour;
412 this._has_minColour = true;
416 * Sets the value of field 'perSequence'.
418 * @param perSequence the value of field 'perSequence'.
420 public void setPerSequence(
421 final boolean perSequence) {
422 this._perSequence = perSequence;
423 this._has_perSequence = true;
427 * Sets the value of field 'predefinedColours'.
429 * @param predefinedColours the value of field
430 * 'predefinedColours'.
432 public void setPredefinedColours(
433 final boolean predefinedColours) {
434 this._predefinedColours = predefinedColours;
435 this._has_predefinedColours = true;
439 * Sets the value of field 'threshold'.
441 * @param threshold the value of field 'threshold'.
443 public void setThreshold(
444 final float threshold) {
445 this._threshold = threshold;
446 this._has_threshold = true;
453 * @throws org.exolab.castor.xml.MarshalException if object is
454 * null or if any SAXException is thrown during marshaling
455 * @throws org.exolab.castor.xml.ValidationException if this
456 * object is an invalid instance according to the schema
457 * @return the unmarshaled
458 * jalview.schemabinding.version2.AnnotationColours
460 public static jalview.schemabinding.version2.AnnotationColours unmarshal(
461 final java.io.Reader reader)
462 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
463 return (jalview.schemabinding.version2.AnnotationColours) Unmarshaller.unmarshal(jalview.schemabinding.version2.AnnotationColours.class, reader);
469 * @throws org.exolab.castor.xml.ValidationException if this
470 * object is an invalid instance according to the schema
472 public void validate(
474 throws org.exolab.castor.xml.ValidationException {
475 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
476 validator.validate(this);