2 * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
3 * Copyright (C) $$Year-Rel$$ 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
10 * of the License, or (at your option) any later version.
12 * Jalview is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty
14 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with Jalview. If not, see <http://www.gnu.org/licenses/>.
19 * The Jalview Authors are detailed in the 'AUTHORS' file.
21 package jalview.schemabinding.version2;
23 //---------------------------------/
24 //- Imported classes and packages -/
25 //---------------------------------/
27 import org.exolab.castor.xml.Marshaller;
28 import org.exolab.castor.xml.Unmarshaller;
33 * @version $Revision$ $Date$
35 public class Setting implements java.io.Serializable
38 // --------------------------/
39 // - Class/Member Variables -/
40 // --------------------------/
45 private java.lang.String _type;
53 * keeps track of state for field: _colour
55 private boolean _has_colour;
60 private boolean _display;
63 * keeps track of state for field: _display
65 private boolean _has_display;
73 * keeps track of state for field: _order
75 private boolean _has_order;
78 * Optional minimum colour for graduated feature colour
81 private int _mincolour;
84 * keeps track of state for field: _mincolour
86 private boolean _has_mincolour;
89 * threshold value for graduated feature colour
92 private float _threshold;
95 * keeps track of state for field: _threshold
97 private boolean _has_threshold;
100 * threshold type for graduated feature colour
103 private int _threshstate;
106 * keeps track of state for field: _threshstate
108 private boolean _has_threshstate;
116 * keeps track of state for field: _max
118 private boolean _has_max;
126 * keeps track of state for field: _min
128 private boolean _has_min;
131 * Field _colourByLabel.
133 private boolean _colourByLabel;
136 * keeps track of state for field: _colourByLabel
138 private boolean _has_colourByLabel;
143 private boolean _autoScale;
146 * keeps track of state for field: _autoScale
148 private boolean _has_autoScale;
165 public void deleteAutoScale()
167 this._has_autoScale = false;
172 public void deleteColour()
174 this._has_colour = false;
179 public void deleteColourByLabel()
181 this._has_colourByLabel = false;
186 public void deleteDisplay()
188 this._has_display = false;
193 public void deleteMax()
195 this._has_max = false;
200 public void deleteMin()
202 this._has_min = false;
207 public void deleteMincolour()
209 this._has_mincolour = false;
214 public void deleteOrder()
216 this._has_order = false;
221 public void deleteThreshold()
223 this._has_threshold = false;
228 public void deleteThreshstate()
230 this._has_threshstate = false;
234 * Returns the value of field 'autoScale'.
236 * @return the value of field 'AutoScale'.
238 public boolean getAutoScale()
240 return this._autoScale;
244 * Returns the value of field 'colour'.
246 * @return the value of field 'Colour'.
248 public int getColour()
254 * Returns the value of field 'colourByLabel'.
256 * @return the value of field 'ColourByLabel'.
258 public boolean getColourByLabel()
260 return this._colourByLabel;
264 * Returns the value of field 'display'.
266 * @return the value of field 'Display'.
268 public boolean getDisplay()
270 return this._display;
274 * Returns the value of field 'max'.
276 * @return the value of field 'Max'.
278 public float getMax()
284 * Returns the value of field 'min'.
286 * @return the value of field 'Min'.
288 public float getMin()
294 * Returns the value of field 'mincolour'. The field 'mincolour' has the
295 * following description: Optional minimum colour for graduated feature colour
298 * @return the value of field 'Mincolour'.
300 public int getMincolour()
302 return this._mincolour;
306 * Returns the value of field 'order'.
308 * @return the value of field 'Order'.
310 public float getOrder()
316 * Returns the value of field 'threshold'. The field 'threshold' has the
317 * following description: threshold value for graduated feature colour
320 * @return the value of field 'Threshold'.
322 public float getThreshold()
324 return this._threshold;
328 * Returns the value of field 'threshstate'. The field 'threshstate' has the
329 * following description: threshold type for graduated feature colour
332 * @return the value of field 'Threshstate'.
334 public int getThreshstate()
336 return this._threshstate;
340 * Returns the value of field 'type'.
342 * @return the value of field 'Type'.
344 public java.lang.String getType()
350 * Method hasAutoScale.
352 * @return true if at least one AutoScale has been added
354 public boolean hasAutoScale()
356 return this._has_autoScale;
362 * @return true if at least one Colour has been added
364 public boolean hasColour()
366 return this._has_colour;
370 * Method hasColourByLabel.
372 * @return true if at least one ColourByLabel has been added
374 public boolean hasColourByLabel()
376 return this._has_colourByLabel;
382 * @return true if at least one Display has been added
384 public boolean hasDisplay()
386 return this._has_display;
392 * @return true if at least one Max has been added
394 public boolean hasMax()
396 return this._has_max;
402 * @return true if at least one Min has been added
404 public boolean hasMin()
406 return this._has_min;
410 * Method hasMincolour.
412 * @return true if at least one Mincolour has been added
414 public boolean hasMincolour()
416 return this._has_mincolour;
422 * @return true if at least one Order has been added
424 public boolean hasOrder()
426 return this._has_order;
430 * Method hasThreshold.
432 * @return true if at least one Threshold has been added
434 public boolean hasThreshold()
436 return this._has_threshold;
440 * Method hasThreshstate.
442 * @return true if at least one Threshstate has been added
444 public boolean hasThreshstate()
446 return this._has_threshstate;
450 * Returns the value of field 'autoScale'.
452 * @return the value of field 'AutoScale'.
454 public boolean isAutoScale()
456 return this._autoScale;
460 * Returns the value of field 'colourByLabel'.
462 * @return the value of field 'ColourByLabel'.
464 public boolean isColourByLabel()
466 return this._colourByLabel;
470 * Returns the value of field 'display'.
472 * @return the value of field 'Display'.
474 public boolean isDisplay()
476 return this._display;
482 * @return true if this object is valid according to the schema
484 public boolean isValid()
489 } catch (org.exolab.castor.xml.ValidationException vex)
500 * @throws org.exolab.castor.xml.MarshalException
501 * if object is null or if any SAXException is thrown during
503 * @throws org.exolab.castor.xml.ValidationException
504 * if this object is an invalid instance according to the schema
506 public void marshal(final java.io.Writer out)
507 throws org.exolab.castor.xml.MarshalException,
508 org.exolab.castor.xml.ValidationException
510 Marshaller.marshal(this, out);
517 * @throws java.io.IOException
518 * if an IOException occurs during marshaling
519 * @throws org.exolab.castor.xml.ValidationException
520 * if this object is an invalid instance according to the schema
521 * @throws org.exolab.castor.xml.MarshalException
522 * if object is null or if any SAXException is thrown during
525 public void marshal(final org.xml.sax.ContentHandler handler)
526 throws java.io.IOException,
527 org.exolab.castor.xml.MarshalException,
528 org.exolab.castor.xml.ValidationException
530 Marshaller.marshal(this, handler);
534 * Sets the value of field 'autoScale'.
537 * the value of field 'autoScale'.
539 public void setAutoScale(final boolean autoScale)
541 this._autoScale = autoScale;
542 this._has_autoScale = true;
546 * Sets the value of field 'colour'.
549 * the value of field 'colour'.
551 public void setColour(final int colour)
553 this._colour = colour;
554 this._has_colour = true;
558 * Sets the value of field 'colourByLabel'.
560 * @param colourByLabel
561 * the value of field 'colourByLabel'.
563 public void setColourByLabel(final boolean colourByLabel)
565 this._colourByLabel = colourByLabel;
566 this._has_colourByLabel = true;
570 * Sets the value of field 'display'.
573 * the value of field 'display'.
575 public void setDisplay(final boolean display)
577 this._display = display;
578 this._has_display = true;
582 * Sets the value of field 'max'.
585 * the value of field 'max'.
587 public void setMax(final float max)
590 this._has_max = true;
594 * Sets the value of field 'min'.
597 * the value of field 'min'.
599 public void setMin(final float min)
602 this._has_min = true;
606 * Sets the value of field 'mincolour'. The field 'mincolour' has the
607 * following description: Optional minimum colour for graduated feature colour
611 * the value of field 'mincolour'.
613 public void setMincolour(final int mincolour)
615 this._mincolour = mincolour;
616 this._has_mincolour = true;
620 * Sets the value of field 'order'.
623 * the value of field 'order'.
625 public void setOrder(final float order)
628 this._has_order = true;
632 * Sets the value of field 'threshold'. The field 'threshold' has the
633 * following description: threshold value for graduated feature colour
637 * the value of field 'threshold'.
639 public void setThreshold(final float threshold)
641 this._threshold = threshold;
642 this._has_threshold = true;
646 * Sets the value of field 'threshstate'. The field 'threshstate' has the
647 * following description: threshold type for graduated feature colour
651 * the value of field 'threshstate'.
653 public void setThreshstate(final int threshstate)
655 this._threshstate = threshstate;
656 this._has_threshstate = true;
660 * Sets the value of field 'type'.
663 * the value of field 'type'.
665 public void setType(final java.lang.String type)
674 * @throws org.exolab.castor.xml.MarshalException
675 * if object is null or if any SAXException is thrown during
677 * @throws org.exolab.castor.xml.ValidationException
678 * if this object is an invalid instance according to the schema
679 * @return the unmarshaled jalview.schemabinding.version2.Settin
681 public static jalview.schemabinding.version2.Setting unmarshal(
682 final java.io.Reader reader)
683 throws org.exolab.castor.xml.MarshalException,
684 org.exolab.castor.xml.ValidationException
686 return (jalview.schemabinding.version2.Setting) Unmarshaller.unmarshal(
687 jalview.schemabinding.version2.Setting.class, reader);
693 * @throws org.exolab.castor.xml.ValidationException
694 * if this object is an invalid instance according to the schema
696 public void validate() throws org.exolab.castor.xml.ValidationException
698 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
699 validator.validate(this);