1 /*******************************************************************************
2 * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
3 * Copyright (C) $(date) 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.
20 *******************************************************************************/
22 * This class was automatically generated with
23 * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
28 package jalview.schemabinding.version2;
30 //---------------------------------/
31 //- Imported classes and packages -/
32 //---------------------------------/
34 import org.exolab.castor.xml.Marshaller;
35 import org.exolab.castor.xml.Unmarshaller;
40 * @version $Revision$ $Date$
42 public class Setting implements java.io.Serializable
45 // --------------------------/
46 // - Class/Member Variables -/
47 // --------------------------/
52 private java.lang.String _type;
60 * keeps track of state for field: _colour
62 private boolean _has_colour;
67 private boolean _display;
70 * keeps track of state for field: _display
72 private boolean _has_display;
80 * keeps track of state for field: _order
82 private boolean _has_order;
85 * Optional minimum colour for graduated feature colour
88 private int _mincolour;
91 * keeps track of state for field: _mincolour
93 private boolean _has_mincolour;
96 * threshold value for graduated feature colour
99 private float _threshold;
102 * keeps track of state for field: _threshold
104 private boolean _has_threshold;
107 * threshold type for graduated feature colour
110 private int _threshstate;
113 * keeps track of state for field: _threshstate
115 private boolean _has_threshstate;
123 * keeps track of state for field: _max
125 private boolean _has_max;
133 * keeps track of state for field: _min
135 private boolean _has_min;
138 * Field _colourByLabel.
140 private boolean _colourByLabel;
143 * keeps track of state for field: _colourByLabel
145 private boolean _has_colourByLabel;
150 private boolean _autoScale;
153 * keeps track of state for field: _autoScale
155 private boolean _has_autoScale;
172 public void deleteAutoScale()
174 this._has_autoScale = false;
179 public void deleteColour()
181 this._has_colour = false;
186 public void deleteColourByLabel()
188 this._has_colourByLabel = false;
193 public void deleteDisplay()
195 this._has_display = false;
200 public void deleteMax()
202 this._has_max = false;
207 public void deleteMin()
209 this._has_min = false;
214 public void deleteMincolour()
216 this._has_mincolour = false;
221 public void deleteOrder()
223 this._has_order = false;
228 public void deleteThreshold()
230 this._has_threshold = false;
235 public void deleteThreshstate()
237 this._has_threshstate = false;
241 * Returns the value of field 'autoScale'.
243 * @return the value of field 'AutoScale'.
245 public boolean getAutoScale()
247 return this._autoScale;
251 * Returns the value of field 'colour'.
253 * @return the value of field 'Colour'.
255 public int getColour()
261 * Returns the value of field 'colourByLabel'.
263 * @return the value of field 'ColourByLabel'.
265 public boolean getColourByLabel()
267 return this._colourByLabel;
271 * Returns the value of field 'display'.
273 * @return the value of field 'Display'.
275 public boolean getDisplay()
277 return this._display;
281 * Returns the value of field 'max'.
283 * @return the value of field 'Max'.
285 public float getMax()
291 * Returns the value of field 'min'.
293 * @return the value of field 'Min'.
295 public float getMin()
301 * Returns the value of field 'mincolour'. The field 'mincolour' has the
302 * following description: Optional minimum colour for graduated feature colour
305 * @return the value of field 'Mincolour'.
307 public int getMincolour()
309 return this._mincolour;
313 * Returns the value of field 'order'.
315 * @return the value of field 'Order'.
317 public float getOrder()
323 * Returns the value of field 'threshold'. The field 'threshold' has the
324 * following description: threshold value for graduated feature colour
327 * @return the value of field 'Threshold'.
329 public float getThreshold()
331 return this._threshold;
335 * Returns the value of field 'threshstate'. The field 'threshstate' has the
336 * following description: threshold type for graduated feature colour
339 * @return the value of field 'Threshstate'.
341 public int getThreshstate()
343 return this._threshstate;
347 * Returns the value of field 'type'.
349 * @return the value of field 'Type'.
351 public java.lang.String getType()
357 * Method hasAutoScale.
359 * @return true if at least one AutoScale has been added
361 public boolean hasAutoScale()
363 return this._has_autoScale;
369 * @return true if at least one Colour has been added
371 public boolean hasColour()
373 return this._has_colour;
377 * Method hasColourByLabel.
379 * @return true if at least one ColourByLabel has been added
381 public boolean hasColourByLabel()
383 return this._has_colourByLabel;
389 * @return true if at least one Display has been added
391 public boolean hasDisplay()
393 return this._has_display;
399 * @return true if at least one Max has been added
401 public boolean hasMax()
403 return this._has_max;
409 * @return true if at least one Min has been added
411 public boolean hasMin()
413 return this._has_min;
417 * Method hasMincolour.
419 * @return true if at least one Mincolour has been added
421 public boolean hasMincolour()
423 return this._has_mincolour;
429 * @return true if at least one Order has been added
431 public boolean hasOrder()
433 return this._has_order;
437 * Method hasThreshold.
439 * @return true if at least one Threshold has been added
441 public boolean hasThreshold()
443 return this._has_threshold;
447 * Method hasThreshstate.
449 * @return true if at least one Threshstate has been added
451 public boolean hasThreshstate()
453 return this._has_threshstate;
457 * Returns the value of field 'autoScale'.
459 * @return the value of field 'AutoScale'.
461 public boolean isAutoScale()
463 return this._autoScale;
467 * Returns the value of field 'colourByLabel'.
469 * @return the value of field 'ColourByLabel'.
471 public boolean isColourByLabel()
473 return this._colourByLabel;
477 * Returns the value of field 'display'.
479 * @return the value of field 'Display'.
481 public boolean isDisplay()
483 return this._display;
489 * @return true if this object is valid according to the schema
491 public boolean isValid()
496 } catch (org.exolab.castor.xml.ValidationException vex)
507 * @throws org.exolab.castor.xml.MarshalException
508 * if object is null or if any SAXException is thrown during
510 * @throws org.exolab.castor.xml.ValidationException
511 * if this object is an invalid instance according to the schema
513 public void marshal(final java.io.Writer out)
514 throws org.exolab.castor.xml.MarshalException,
515 org.exolab.castor.xml.ValidationException
517 Marshaller.marshal(this, out);
524 * @throws java.io.IOException
525 * if an IOException occurs during marshaling
526 * @throws org.exolab.castor.xml.ValidationException
527 * if this object is an invalid instance according to the schema
528 * @throws org.exolab.castor.xml.MarshalException
529 * if object is null or if any SAXException is thrown during
532 public void marshal(final org.xml.sax.ContentHandler handler)
533 throws java.io.IOException,
534 org.exolab.castor.xml.MarshalException,
535 org.exolab.castor.xml.ValidationException
537 Marshaller.marshal(this, handler);
541 * Sets the value of field 'autoScale'.
544 * the value of field 'autoScale'.
546 public void setAutoScale(final boolean autoScale)
548 this._autoScale = autoScale;
549 this._has_autoScale = true;
553 * Sets the value of field 'colour'.
556 * the value of field 'colour'.
558 public void setColour(final int colour)
560 this._colour = colour;
561 this._has_colour = true;
565 * Sets the value of field 'colourByLabel'.
567 * @param colourByLabel
568 * the value of field 'colourByLabel'.
570 public void setColourByLabel(final boolean colourByLabel)
572 this._colourByLabel = colourByLabel;
573 this._has_colourByLabel = true;
577 * Sets the value of field 'display'.
580 * the value of field 'display'.
582 public void setDisplay(final boolean display)
584 this._display = display;
585 this._has_display = true;
589 * Sets the value of field 'max'.
592 * the value of field 'max'.
594 public void setMax(final float max)
597 this._has_max = true;
601 * Sets the value of field 'min'.
604 * the value of field 'min'.
606 public void setMin(final float min)
609 this._has_min = true;
613 * Sets the value of field 'mincolour'. The field 'mincolour' has the
614 * following description: Optional minimum colour for graduated feature colour
618 * the value of field 'mincolour'.
620 public void setMincolour(final int mincolour)
622 this._mincolour = mincolour;
623 this._has_mincolour = true;
627 * Sets the value of field 'order'.
630 * the value of field 'order'.
632 public void setOrder(final float order)
635 this._has_order = true;
639 * Sets the value of field 'threshold'. The field 'threshold' has the
640 * following description: threshold value for graduated feature colour
644 * the value of field 'threshold'.
646 public void setThreshold(final float threshold)
648 this._threshold = threshold;
649 this._has_threshold = true;
653 * Sets the value of field 'threshstate'. The field 'threshstate' has the
654 * following description: threshold type for graduated feature colour
658 * the value of field 'threshstate'.
660 public void setThreshstate(final int threshstate)
662 this._threshstate = threshstate;
663 this._has_threshstate = true;
667 * Sets the value of field 'type'.
670 * the value of field 'type'.
672 public void setType(final java.lang.String type)
681 * @throws org.exolab.castor.xml.MarshalException
682 * if object is null or if any SAXException is thrown during
684 * @throws org.exolab.castor.xml.ValidationException
685 * if this object is an invalid instance according to the schema
686 * @return the unmarshaled jalview.schemabinding.version2.Settin
688 public static jalview.schemabinding.version2.Setting unmarshal(
689 final java.io.Reader reader)
690 throws org.exolab.castor.xml.MarshalException,
691 org.exolab.castor.xml.ValidationException
693 return (jalview.schemabinding.version2.Setting) Unmarshaller.unmarshal(
694 jalview.schemabinding.version2.Setting.class, reader);
700 * @throws org.exolab.castor.xml.ValidationException
701 * if this object is an invalid instance according to the schema
703 public void validate() throws org.exolab.castor.xml.ValidationException
705 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
706 validator.validate(this);