1 /*******************************************************************************
2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.1)
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;
39 * @version $Revision$ $Date$
41 public class Setting implements java.io.Serializable
44 // --------------------------/
45 // - Class/Member Variables -/
46 // --------------------------/
51 private java.lang.String _type;
59 * keeps track of state for field: _colour
61 private boolean _has_colour;
66 private boolean _display;
69 * keeps track of state for field: _display
71 private boolean _has_display;
79 * keeps track of state for field: _order
81 private boolean _has_order;
84 * Optional minimum colour for graduated feature colour
87 private int _mincolour;
90 * keeps track of state for field: _mincolour
92 private boolean _has_mincolour;
95 * threshold value for graduated feature colour
98 private float _threshold;
101 * keeps track of state for field: _threshold
103 private boolean _has_threshold;
106 * threshold type for graduated feature colour
109 private int _threshstate;
112 * keeps track of state for field: _threshstate
114 private boolean _has_threshstate;
122 * keeps track of state for field: _max
124 private boolean _has_max;
132 * keeps track of state for field: _min
134 private boolean _has_min;
137 * Field _colourByLabel.
139 private boolean _colourByLabel;
142 * keeps track of state for field: _colourByLabel
144 private boolean _has_colourByLabel;
149 private boolean _autoScale;
152 * keeps track of state for field: _autoScale
154 private boolean _has_autoScale;
171 public void deleteAutoScale()
173 this._has_autoScale = false;
178 public void deleteColour()
180 this._has_colour = false;
185 public void deleteColourByLabel()
187 this._has_colourByLabel = false;
192 public void deleteDisplay()
194 this._has_display = false;
199 public void deleteMax()
201 this._has_max = false;
206 public void deleteMin()
208 this._has_min = false;
213 public void deleteMincolour()
215 this._has_mincolour = false;
220 public void deleteOrder()
222 this._has_order = false;
227 public void deleteThreshold()
229 this._has_threshold = false;
234 public void deleteThreshstate()
236 this._has_threshstate = false;
240 * Returns the value of field 'autoScale'.
242 * @return the value of field 'AutoScale'.
244 public boolean getAutoScale()
246 return this._autoScale;
250 * Returns the value of field 'colour'.
252 * @return the value of field 'Colour'.
254 public int getColour()
260 * Returns the value of field 'colourByLabel'.
262 * @return the value of field 'ColourByLabel'.
264 public boolean getColourByLabel()
266 return this._colourByLabel;
270 * Returns the value of field 'display'.
272 * @return the value of field 'Display'.
274 public boolean getDisplay()
276 return this._display;
280 * Returns the value of field 'max'.
282 * @return the value of field 'Max'.
284 public float getMax()
290 * Returns the value of field 'min'.
292 * @return the value of field 'Min'.
294 public float getMin()
300 * Returns the value of field 'mincolour'. The field 'mincolour' has the
301 * following description: Optional minimum colour for graduated feature colour
304 * @return the value of field 'Mincolour'.
306 public int getMincolour()
308 return this._mincolour;
312 * Returns the value of field 'order'.
314 * @return the value of field 'Order'.
316 public float getOrder()
322 * Returns the value of field 'threshold'. The field 'threshold' has the
323 * following description: threshold value for graduated feature colour
326 * @return the value of field 'Threshold'.
328 public float getThreshold()
330 return this._threshold;
334 * Returns the value of field 'threshstate'. The field 'threshstate' has the
335 * following description: threshold type for graduated feature colour
338 * @return the value of field 'Threshstate'.
340 public int getThreshstate()
342 return this._threshstate;
346 * Returns the value of field 'type'.
348 * @return the value of field 'Type'.
350 public java.lang.String getType()
356 * Method hasAutoScale.
358 * @return true if at least one AutoScale has been added
360 public boolean hasAutoScale()
362 return this._has_autoScale;
368 * @return true if at least one Colour has been added
370 public boolean hasColour()
372 return this._has_colour;
376 * Method hasColourByLabel.
378 * @return true if at least one ColourByLabel has been added
380 public boolean hasColourByLabel()
382 return this._has_colourByLabel;
388 * @return true if at least one Display has been added
390 public boolean hasDisplay()
392 return this._has_display;
398 * @return true if at least one Max has been added
400 public boolean hasMax()
402 return this._has_max;
408 * @return true if at least one Min has been added
410 public boolean hasMin()
412 return this._has_min;
416 * Method hasMincolour.
418 * @return true if at least one Mincolour has been added
420 public boolean hasMincolour()
422 return this._has_mincolour;
428 * @return true if at least one Order has been added
430 public boolean hasOrder()
432 return this._has_order;
436 * Method hasThreshold.
438 * @return true if at least one Threshold has been added
440 public boolean hasThreshold()
442 return this._has_threshold;
446 * Method hasThreshstate.
448 * @return true if at least one Threshstate has been added
450 public boolean hasThreshstate()
452 return this._has_threshstate;
456 * Returns the value of field 'autoScale'.
458 * @return the value of field 'AutoScale'.
460 public boolean isAutoScale()
462 return this._autoScale;
466 * Returns the value of field 'colourByLabel'.
468 * @return the value of field 'ColourByLabel'.
470 public boolean isColourByLabel()
472 return this._colourByLabel;
476 * Returns the value of field 'display'.
478 * @return the value of field 'Display'.
480 public boolean isDisplay()
482 return this._display;
488 * @return true if this object is valid according to the schema
490 public boolean isValid()
495 } catch (org.exolab.castor.xml.ValidationException vex)
506 * @throws org.exolab.castor.xml.MarshalException
507 * if object is null or if any SAXException is thrown during
509 * @throws org.exolab.castor.xml.ValidationException
510 * if this object is an invalid instance according to the schema
512 public void marshal(final java.io.Writer out)
513 throws org.exolab.castor.xml.MarshalException,
514 org.exolab.castor.xml.ValidationException
516 Marshaller.marshal(this, out);
523 * @throws java.io.IOException
524 * if an IOException occurs during marshaling
525 * @throws org.exolab.castor.xml.ValidationException
526 * if this object is an invalid instance according to the schema
527 * @throws org.exolab.castor.xml.MarshalException
528 * if object is null or if any SAXException is thrown during
531 public void marshal(final org.xml.sax.ContentHandler handler)
532 throws java.io.IOException,
533 org.exolab.castor.xml.MarshalException,
534 org.exolab.castor.xml.ValidationException
536 Marshaller.marshal(this, handler);
540 * Sets the value of field 'autoScale'.
543 * the value of field 'autoScale'.
545 public void setAutoScale(final boolean autoScale)
547 this._autoScale = autoScale;
548 this._has_autoScale = true;
552 * Sets the value of field 'colour'.
555 * the value of field 'colour'.
557 public void setColour(final int colour)
559 this._colour = colour;
560 this._has_colour = true;
564 * Sets the value of field 'colourByLabel'.
566 * @param colourByLabel
567 * the value of field 'colourByLabel'.
569 public void setColourByLabel(final boolean colourByLabel)
571 this._colourByLabel = colourByLabel;
572 this._has_colourByLabel = true;
576 * Sets the value of field 'display'.
579 * the value of field 'display'.
581 public void setDisplay(final boolean display)
583 this._display = display;
584 this._has_display = true;
588 * Sets the value of field 'max'.
591 * the value of field 'max'.
593 public void setMax(final float max)
596 this._has_max = true;
600 * Sets the value of field 'min'.
603 * the value of field 'min'.
605 public void setMin(final float min)
608 this._has_min = true;
612 * Sets the value of field 'mincolour'. The field 'mincolour' has the
613 * following description: Optional minimum colour for graduated feature colour
617 * the value of field 'mincolour'.
619 public void setMincolour(final int mincolour)
621 this._mincolour = mincolour;
622 this._has_mincolour = true;
626 * Sets the value of field 'order'.
629 * the value of field 'order'.
631 public void setOrder(final float order)
634 this._has_order = true;
638 * Sets the value of field 'threshold'. The field 'threshold' has the
639 * following description: threshold value for graduated feature colour
643 * the value of field 'threshold'.
645 public void setThreshold(final float threshold)
647 this._threshold = threshold;
648 this._has_threshold = true;
652 * Sets the value of field 'threshstate'. The field 'threshstate' has the
653 * following description: threshold type for graduated feature colour
657 * the value of field 'threshstate'.
659 public void setThreshstate(final int threshstate)
661 this._threshstate = threshstate;
662 this._has_threshstate = true;
666 * Sets the value of field 'type'.
669 * the value of field 'type'.
671 public void setType(final java.lang.String type)
680 * @throws org.exolab.castor.xml.MarshalException
681 * if object is null or if any SAXException is thrown during
683 * @throws org.exolab.castor.xml.ValidationException
684 * if this object is an invalid instance according to the schema
685 * @return the unmarshaled jalview.schemabinding.version2.Settin
687 public static jalview.schemabinding.version2.Setting unmarshal(
688 final java.io.Reader reader)
689 throws org.exolab.castor.xml.MarshalException,
690 org.exolab.castor.xml.ValidationException
692 return (jalview.schemabinding.version2.Setting) Unmarshaller.unmarshal(
693 jalview.schemabinding.version2.Setting.class, reader);
699 * @throws org.exolab.castor.xml.ValidationException
700 * if this object is an invalid instance according to the schema
702 public void validate() throws org.exolab.castor.xml.ValidationException
704 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
705 validator.validate(this);