1 /*******************************************************************************
2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
3 * Copyright (C) 2011 J Procter, AM Waterhouse, J Engelhardt, LM Lui, G Barton, M Clamp, S Searle
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 *******************************************************************************/
19 * This class was automatically generated with
20 * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
25 package jalview.schemabinding.version2;
27 //---------------------------------/
28 //- Imported classes and packages -/
29 //---------------------------------/
31 import org.exolab.castor.xml.Marshaller;
32 import org.exolab.castor.xml.Unmarshaller;
37 * @version $Revision$ $Date$
39 public class Setting implements java.io.Serializable {
42 //--------------------------/
43 //- Class/Member Variables -/
44 //--------------------------/
49 private java.lang.String _type;
57 * keeps track of state for field: _colour
59 private boolean _has_colour;
64 private boolean _display;
67 * keeps track of state for field: _display
69 private boolean _has_display;
77 * keeps track of state for field: _order
79 private boolean _has_order;
82 * Optional minimum colour for graduated feature colour
84 private int _mincolour;
87 * keeps track of state for field: _mincolour
89 private boolean _has_mincolour;
92 * threshold value for graduated feature colour
94 private float _threshold;
97 * keeps track of state for field: _threshold
99 private boolean _has_threshold;
102 * threshold type for graduated feature colour
104 private int _threshstate;
107 * keeps track of state for field: _threshstate
109 private boolean _has_threshstate;
117 * keeps track of state for field: _max
119 private boolean _has_max;
127 * keeps track of state for field: _min
129 private boolean _has_min;
132 * Field _colourByLabel.
134 private boolean _colourByLabel;
137 * keeps track of state for field: _colourByLabel
139 private boolean _has_colourByLabel;
144 private boolean _autoScale;
147 * keeps track of state for field: _autoScale
149 private boolean _has_autoScale;
167 public void deleteAutoScale(
169 this._has_autoScale= false;
174 public void deleteColour(
176 this._has_colour= false;
181 public void deleteColourByLabel(
183 this._has_colourByLabel= false;
188 public void deleteDisplay(
190 this._has_display= false;
195 public void deleteMax(
197 this._has_max= false;
202 public void deleteMin(
204 this._has_min= false;
209 public void deleteMincolour(
211 this._has_mincolour= false;
216 public void deleteOrder(
218 this._has_order= false;
223 public void deleteThreshold(
225 this._has_threshold= false;
230 public void deleteThreshstate(
232 this._has_threshstate= false;
236 * Returns the value of field 'autoScale'.
238 * @return the value of field 'AutoScale'.
240 public boolean getAutoScale(
242 return this._autoScale;
246 * Returns the value of field 'colour'.
248 * @return the value of field 'Colour'.
250 public int getColour(
256 * Returns the value of field 'colourByLabel'.
258 * @return the value of field 'ColourByLabel'.
260 public boolean getColourByLabel(
262 return this._colourByLabel;
266 * Returns the value of field 'display'.
268 * @return the value of field 'Display'.
270 public boolean getDisplay(
272 return this._display;
276 * Returns the value of field 'max'.
278 * @return the value of field 'Max'.
286 * Returns the value of field 'min'.
288 * @return the value of field 'Min'.
296 * Returns the value of field 'mincolour'. The field
297 * 'mincolour' has the following description: Optional minimum
298 * colour for graduated feature colour
300 * @return the value of field 'Mincolour'.
302 public int getMincolour(
304 return this._mincolour;
308 * Returns the value of field 'order'.
310 * @return the value of field 'Order'.
312 public float getOrder(
318 * Returns the value of field 'threshold'. The field
319 * 'threshold' has the following description: threshold value
320 * for graduated feature colour
322 * @return the value of field 'Threshold'.
324 public float getThreshold(
326 return this._threshold;
330 * Returns the value of field 'threshstate'. The field
331 * 'threshstate' has the following description: threshold type
332 * for graduated feature colour
334 * @return the value of field 'Threshstate'.
336 public int getThreshstate(
338 return this._threshstate;
342 * Returns the value of field 'type'.
344 * @return the value of field 'Type'.
346 public java.lang.String getType(
352 * Method hasAutoScale.
354 * @return true if at least one AutoScale has been added
356 public boolean hasAutoScale(
358 return this._has_autoScale;
364 * @return true if at least one Colour has been added
366 public boolean hasColour(
368 return this._has_colour;
372 * Method hasColourByLabel.
374 * @return true if at least one ColourByLabel has been added
376 public boolean hasColourByLabel(
378 return this._has_colourByLabel;
384 * @return true if at least one Display has been added
386 public boolean hasDisplay(
388 return this._has_display;
394 * @return true if at least one Max has been added
396 public boolean hasMax(
398 return this._has_max;
404 * @return true if at least one Min has been added
406 public boolean hasMin(
408 return this._has_min;
412 * Method hasMincolour.
414 * @return true if at least one Mincolour has been added
416 public boolean hasMincolour(
418 return this._has_mincolour;
424 * @return true if at least one Order has been added
426 public boolean hasOrder(
428 return this._has_order;
432 * Method hasThreshold.
434 * @return true if at least one Threshold has been added
436 public boolean hasThreshold(
438 return this._has_threshold;
442 * Method hasThreshstate.
444 * @return true if at least one Threshstate has been added
446 public boolean hasThreshstate(
448 return this._has_threshstate;
452 * Returns the value of field 'autoScale'.
454 * @return the value of field 'AutoScale'.
456 public boolean isAutoScale(
458 return this._autoScale;
462 * Returns the value of field 'colourByLabel'.
464 * @return the value of field 'ColourByLabel'.
466 public boolean isColourByLabel(
468 return this._colourByLabel;
472 * Returns the value of field 'display'.
474 * @return the value of field 'Display'.
476 public boolean isDisplay(
478 return this._display;
484 * @return true if this object is valid according to the schema
486 public boolean isValid(
490 } catch (org.exolab.castor.xml.ValidationException vex) {
500 * @throws org.exolab.castor.xml.MarshalException if object is
501 * null or if any SAXException is thrown during marshaling
502 * @throws org.exolab.castor.xml.ValidationException if this
503 * object is an invalid instance according to the schema
506 final java.io.Writer out)
507 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
508 Marshaller.marshal(this, out);
515 * @throws java.io.IOException if an IOException occurs during
517 * @throws org.exolab.castor.xml.ValidationException if this
518 * object is an invalid instance according to the schema
519 * @throws org.exolab.castor.xml.MarshalException if object is
520 * null or if any SAXException is thrown during marshaling
523 final org.xml.sax.ContentHandler handler)
524 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
525 Marshaller.marshal(this, handler);
529 * Sets the value of field 'autoScale'.
531 * @param autoScale the value of field 'autoScale'.
533 public void setAutoScale(
534 final boolean autoScale) {
535 this._autoScale = autoScale;
536 this._has_autoScale = true;
540 * Sets the value of field 'colour'.
542 * @param colour the value of field 'colour'.
544 public void setColour(
546 this._colour = colour;
547 this._has_colour = true;
551 * Sets the value of field 'colourByLabel'.
553 * @param colourByLabel the value of field 'colourByLabel'.
555 public void setColourByLabel(
556 final boolean colourByLabel) {
557 this._colourByLabel = colourByLabel;
558 this._has_colourByLabel = true;
562 * Sets the value of field 'display'.
564 * @param display the value of field 'display'.
566 public void setDisplay(
567 final boolean display) {
568 this._display = display;
569 this._has_display = true;
573 * Sets the value of field 'max'.
575 * @param max the value of field 'max'.
580 this._has_max = true;
584 * Sets the value of field 'min'.
586 * @param min the value of field 'min'.
591 this._has_min = true;
595 * Sets the value of field 'mincolour'. The field 'mincolour'
596 * has the following description: Optional minimum colour for
597 * graduated feature colour
599 * @param mincolour the value of field 'mincolour'.
601 public void setMincolour(
602 final int mincolour) {
603 this._mincolour = mincolour;
604 this._has_mincolour = true;
608 * Sets the value of field 'order'.
610 * @param order the value of field 'order'.
612 public void setOrder(
615 this._has_order = true;
619 * Sets the value of field 'threshold'. The field 'threshold'
620 * has the following description: threshold value for graduated
623 * @param threshold the value of field 'threshold'.
625 public void setThreshold(
626 final float threshold) {
627 this._threshold = threshold;
628 this._has_threshold = true;
632 * Sets the value of field 'threshstate'. The field
633 * 'threshstate' has the following description: threshold type
634 * for graduated feature colour
636 * @param threshstate the value of field 'threshstate'.
638 public void setThreshstate(
639 final int threshstate) {
640 this._threshstate = threshstate;
641 this._has_threshstate = true;
645 * Sets the value of field 'type'.
647 * @param type the value of field 'type'.
650 final java.lang.String type) {
658 * @throws org.exolab.castor.xml.MarshalException if object is
659 * null or if any SAXException is thrown during marshaling
660 * @throws org.exolab.castor.xml.ValidationException if this
661 * object is an invalid instance according to the schema
662 * @return the unmarshaled jalview.schemabinding.version2.Settin
664 public static jalview.schemabinding.version2.Setting unmarshal(
665 final java.io.Reader reader)
666 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
667 return (jalview.schemabinding.version2.Setting) Unmarshaller.unmarshal(jalview.schemabinding.version2.Setting.class, reader);
673 * @throws org.exolab.castor.xml.ValidationException if this
674 * object is an invalid instance according to the schema
676 public void validate(
678 throws org.exolab.castor.xml.ValidationException {
679 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
680 validator.validate(this);