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;
31 * @version $Revision$ $Date$
33 public class Setting implements java.io.Serializable
36 // --------------------------/
37 // - Class/Member Variables -/
38 // --------------------------/
43 private java.lang.String _type;
51 * keeps track of state for field: _colour
53 private boolean _has_colour;
58 private boolean _display;
61 * keeps track of state for field: _display
63 private boolean _has_display;
71 * keeps track of state for field: _order
73 private boolean _has_order;
76 * Optional minimum colour for graduated feature colour
79 private int _mincolour;
82 * keeps track of state for field: _mincolour
84 private boolean _has_mincolour;
87 * threshold value for graduated feature colour
90 private float _threshold;
93 * keeps track of state for field: _threshold
95 private boolean _has_threshold;
98 * threshold type for graduated feature colour
101 private int _threshstate;
104 * keeps track of state for field: _threshstate
106 private boolean _has_threshstate;
114 * keeps track of state for field: _max
116 private boolean _has_max;
124 * keeps track of state for field: _min
126 private boolean _has_min;
129 * Field _colourByLabel.
131 private boolean _colourByLabel;
134 * keeps track of state for field: _colourByLabel
136 private boolean _has_colourByLabel;
141 private boolean _autoScale;
144 * keeps track of state for field: _autoScale
146 private boolean _has_autoScale;
163 public void deleteAutoScale()
165 this._has_autoScale = false;
170 public void deleteColour()
172 this._has_colour = false;
177 public void deleteColourByLabel()
179 this._has_colourByLabel = false;
184 public void deleteDisplay()
186 this._has_display = false;
191 public void deleteMax()
193 this._has_max = false;
198 public void deleteMin()
200 this._has_min = false;
205 public void deleteMincolour()
207 this._has_mincolour = false;
212 public void deleteOrder()
214 this._has_order = false;
219 public void deleteThreshold()
221 this._has_threshold = false;
226 public void deleteThreshstate()
228 this._has_threshstate = false;
232 * Returns the value of field 'autoScale'.
234 * @return the value of field 'AutoScale'.
236 public boolean getAutoScale()
238 return this._autoScale;
242 * Returns the value of field 'colour'.
244 * @return the value of field 'Colour'.
246 public int getColour()
252 * Returns the value of field 'colourByLabel'.
254 * @return the value of field 'ColourByLabel'.
256 public boolean getColourByLabel()
258 return this._colourByLabel;
262 * Returns the value of field 'display'.
264 * @return the value of field 'Display'.
266 public boolean getDisplay()
268 return this._display;
272 * Returns the value of field 'max'.
274 * @return the value of field 'Max'.
276 public float getMax()
282 * Returns the value of field 'min'.
284 * @return the value of field 'Min'.
286 public float getMin()
292 * Returns the value of field 'mincolour'. The field 'mincolour' has the
293 * following description: Optional minimum colour for graduated feature colour
296 * @return the value of field 'Mincolour'.
298 public int getMincolour()
300 return this._mincolour;
304 * Returns the value of field 'order'.
306 * @return the value of field 'Order'.
308 public float getOrder()
314 * Returns the value of field 'threshold'. The field 'threshold' has the
315 * following description: threshold value for graduated feature colour
318 * @return the value of field 'Threshold'.
320 public float getThreshold()
322 return this._threshold;
326 * Returns the value of field 'threshstate'. The field 'threshstate' has the
327 * following description: threshold type for graduated feature colour
330 * @return the value of field 'Threshstate'.
332 public int getThreshstate()
334 return this._threshstate;
338 * Returns the value of field 'type'.
340 * @return the value of field 'Type'.
342 public java.lang.String getType()
348 * Method hasAutoScale.
350 * @return true if at least one AutoScale has been added
352 public boolean hasAutoScale()
354 return this._has_autoScale;
360 * @return true if at least one Colour has been added
362 public boolean hasColour()
364 return this._has_colour;
368 * Method hasColourByLabel.
370 * @return true if at least one ColourByLabel has been added
372 public boolean hasColourByLabel()
374 return this._has_colourByLabel;
380 * @return true if at least one Display has been added
382 public boolean hasDisplay()
384 return this._has_display;
390 * @return true if at least one Max has been added
392 public boolean hasMax()
394 return this._has_max;
400 * @return true if at least one Min has been added
402 public boolean hasMin()
404 return this._has_min;
408 * Method hasMincolour.
410 * @return true if at least one Mincolour has been added
412 public boolean hasMincolour()
414 return this._has_mincolour;
420 * @return true if at least one Order has been added
422 public boolean hasOrder()
424 return this._has_order;
428 * Method hasThreshold.
430 * @return true if at least one Threshold has been added
432 public boolean hasThreshold()
434 return this._has_threshold;
438 * Method hasThreshstate.
440 * @return true if at least one Threshstate has been added
442 public boolean hasThreshstate()
444 return this._has_threshstate;
448 * Returns the value of field 'autoScale'.
450 * @return the value of field 'AutoScale'.
452 public boolean isAutoScale()
454 return this._autoScale;
458 * Returns the value of field 'colourByLabel'.
460 * @return the value of field 'ColourByLabel'.
462 public boolean isColourByLabel()
464 return this._colourByLabel;
468 * Returns the value of field 'display'.
470 * @return the value of field 'Display'.
472 public boolean isDisplay()
474 return this._display;
480 * @return true if this object is valid according to the schema
482 public boolean isValid()
487 } catch (org.exolab.castor.xml.ValidationException vex)
498 * @throws org.exolab.castor.xml.MarshalException
499 * if object is null or if any SAXException is thrown during
501 * @throws org.exolab.castor.xml.ValidationException
502 * if this object is an invalid instance according to the schema
504 public void marshal(final java.io.Writer out)
505 throws org.exolab.castor.xml.MarshalException,
506 org.exolab.castor.xml.ValidationException
508 Marshaller.marshal(this, out);
515 * @throws java.io.IOException
516 * if an IOException occurs during marshaling
517 * @throws org.exolab.castor.xml.ValidationException
518 * if this object is an invalid instance according to the schema
519 * @throws org.exolab.castor.xml.MarshalException
520 * if object is null or if any SAXException is thrown during
523 public void marshal(final org.xml.sax.ContentHandler handler)
524 throws java.io.IOException,
525 org.exolab.castor.xml.MarshalException,
526 org.exolab.castor.xml.ValidationException
528 Marshaller.marshal(this, handler);
532 * Sets the value of field 'autoScale'.
535 * the value of field 'autoScale'.
537 public void setAutoScale(final boolean autoScale)
539 this._autoScale = autoScale;
540 this._has_autoScale = true;
544 * Sets the value of field 'colour'.
547 * the value of field 'colour'.
549 public void setColour(final int colour)
551 this._colour = colour;
552 this._has_colour = true;
556 * Sets the value of field 'colourByLabel'.
558 * @param colourByLabel
559 * the value of field 'colourByLabel'.
561 public void setColourByLabel(final boolean colourByLabel)
563 this._colourByLabel = colourByLabel;
564 this._has_colourByLabel = true;
568 * Sets the value of field 'display'.
571 * the value of field 'display'.
573 public void setDisplay(final boolean display)
575 this._display = display;
576 this._has_display = true;
580 * Sets the value of field 'max'.
583 * the value of field 'max'.
585 public void setMax(final float max)
588 this._has_max = true;
592 * Sets the value of field 'min'.
595 * the value of field 'min'.
597 public void setMin(final float min)
600 this._has_min = true;
604 * Sets the value of field 'mincolour'. The field 'mincolour' has the
605 * following description: Optional minimum colour for graduated feature colour
609 * the value of field 'mincolour'.
611 public void setMincolour(final int mincolour)
613 this._mincolour = mincolour;
614 this._has_mincolour = true;
618 * Sets the value of field 'order'.
621 * the value of field 'order'.
623 public void setOrder(final float order)
626 this._has_order = true;
630 * Sets the value of field 'threshold'. The field 'threshold' has the
631 * following description: threshold value for graduated feature colour
635 * the value of field 'threshold'.
637 public void setThreshold(final float threshold)
639 this._threshold = threshold;
640 this._has_threshold = true;
644 * Sets the value of field 'threshstate'. The field 'threshstate' has the
645 * following description: threshold type for graduated feature colour
649 * the value of field 'threshstate'.
651 public void setThreshstate(final int threshstate)
653 this._threshstate = threshstate;
654 this._has_threshstate = true;
658 * Sets the value of field 'type'.
661 * the value of field 'type'.
663 public void setType(final java.lang.String type)
672 * @throws org.exolab.castor.xml.MarshalException
673 * if object is null or if any SAXException is thrown during
675 * @throws org.exolab.castor.xml.ValidationException
676 * if this object is an invalid instance according to the schema
677 * @return the unmarshaled jalview.schemabinding.version2.Settin
679 public static jalview.schemabinding.version2.Setting unmarshal(
680 final java.io.Reader reader)
681 throws org.exolab.castor.xml.MarshalException,
682 org.exolab.castor.xml.ValidationException
684 return (jalview.schemabinding.version2.Setting) Unmarshaller.unmarshal(
685 jalview.schemabinding.version2.Setting.class, reader);
691 * @throws org.exolab.castor.xml.ValidationException
692 * if this object is an invalid instance according to the schema
694 public void validate() throws org.exolab.castor.xml.ValidationException
696 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
697 validator.validate(this);