9de7b21aa1491ce2a93984f15618b18f6a524bb4
[jalview.git] / src / jalview / schemabinding / version2 / Setting.java
1 /*******************************************************************************
2  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
3  * Copyright (C) 2014 The Jalview Authors
4  * 
5  * This file is part of Jalview.
6  * 
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.
10  *  
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.
15  * 
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  ******************************************************************************/
20 /*
21  * This class was automatically generated with 
22  * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
23  * Schema.
24  * $Id$
25  */
26
27 package jalview.schemabinding.version2;
28
29 //---------------------------------/
30 //- Imported classes and packages -/
31 //---------------------------------/
32
33 import org.exolab.castor.xml.Marshaller;
34 import org.exolab.castor.xml.Unmarshaller;
35
36 /**
37  * Class Setting.
38  * 
39  * @version $Revision$ $Date$
40  */
41 public class Setting implements java.io.Serializable
42 {
43
44   // --------------------------/
45   // - Class/Member Variables -/
46   // --------------------------/
47
48   /**
49    * Field _type.
50    */
51   private java.lang.String _type;
52
53   /**
54    * Field _colour.
55    */
56   private int _colour;
57
58   /**
59    * keeps track of state for field: _colour
60    */
61   private boolean _has_colour;
62
63   /**
64    * Field _display.
65    */
66   private boolean _display;
67
68   /**
69    * keeps track of state for field: _display
70    */
71   private boolean _has_display;
72
73   /**
74    * Field _order.
75    */
76   private float _order;
77
78   /**
79    * keeps track of state for field: _order
80    */
81   private boolean _has_order;
82
83   /**
84    * Optional minimum colour for graduated feature colour
85    * 
86    */
87   private int _mincolour;
88
89   /**
90    * keeps track of state for field: _mincolour
91    */
92   private boolean _has_mincolour;
93
94   /**
95    * threshold value for graduated feature colour
96    * 
97    */
98   private float _threshold;
99
100   /**
101    * keeps track of state for field: _threshold
102    */
103   private boolean _has_threshold;
104
105   /**
106    * threshold type for graduated feature colour
107    * 
108    */
109   private int _threshstate;
110
111   /**
112    * keeps track of state for field: _threshstate
113    */
114   private boolean _has_threshstate;
115
116   /**
117    * Field _max.
118    */
119   private float _max;
120
121   /**
122    * keeps track of state for field: _max
123    */
124   private boolean _has_max;
125
126   /**
127    * Field _min.
128    */
129   private float _min;
130
131   /**
132    * keeps track of state for field: _min
133    */
134   private boolean _has_min;
135
136   /**
137    * Field _colourByLabel.
138    */
139   private boolean _colourByLabel;
140
141   /**
142    * keeps track of state for field: _colourByLabel
143    */
144   private boolean _has_colourByLabel;
145
146   /**
147    * Field _autoScale.
148    */
149   private boolean _autoScale;
150
151   /**
152    * keeps track of state for field: _autoScale
153    */
154   private boolean _has_autoScale;
155
156   // ----------------/
157   // - Constructors -/
158   // ----------------/
159
160   public Setting()
161   {
162     super();
163   }
164
165   // -----------/
166   // - Methods -/
167   // -----------/
168
169   /**
170      */
171   public void deleteAutoScale()
172   {
173     this._has_autoScale = false;
174   }
175
176   /**
177      */
178   public void deleteColour()
179   {
180     this._has_colour = false;
181   }
182
183   /**
184      */
185   public void deleteColourByLabel()
186   {
187     this._has_colourByLabel = false;
188   }
189
190   /**
191      */
192   public void deleteDisplay()
193   {
194     this._has_display = false;
195   }
196
197   /**
198      */
199   public void deleteMax()
200   {
201     this._has_max = false;
202   }
203
204   /**
205      */
206   public void deleteMin()
207   {
208     this._has_min = false;
209   }
210
211   /**
212      */
213   public void deleteMincolour()
214   {
215     this._has_mincolour = false;
216   }
217
218   /**
219      */
220   public void deleteOrder()
221   {
222     this._has_order = false;
223   }
224
225   /**
226      */
227   public void deleteThreshold()
228   {
229     this._has_threshold = false;
230   }
231
232   /**
233      */
234   public void deleteThreshstate()
235   {
236     this._has_threshstate = false;
237   }
238
239   /**
240    * Returns the value of field 'autoScale'.
241    * 
242    * @return the value of field 'AutoScale'.
243    */
244   public boolean getAutoScale()
245   {
246     return this._autoScale;
247   }
248
249   /**
250    * Returns the value of field 'colour'.
251    * 
252    * @return the value of field 'Colour'.
253    */
254   public int getColour()
255   {
256     return this._colour;
257   }
258
259   /**
260    * Returns the value of field 'colourByLabel'.
261    * 
262    * @return the value of field 'ColourByLabel'.
263    */
264   public boolean getColourByLabel()
265   {
266     return this._colourByLabel;
267   }
268
269   /**
270    * Returns the value of field 'display'.
271    * 
272    * @return the value of field 'Display'.
273    */
274   public boolean getDisplay()
275   {
276     return this._display;
277   }
278
279   /**
280    * Returns the value of field 'max'.
281    * 
282    * @return the value of field 'Max'.
283    */
284   public float getMax()
285   {
286     return this._max;
287   }
288
289   /**
290    * Returns the value of field 'min'.
291    * 
292    * @return the value of field 'Min'.
293    */
294   public float getMin()
295   {
296     return this._min;
297   }
298
299   /**
300    * Returns the value of field 'mincolour'. The field 'mincolour' has the
301    * following description: Optional minimum colour for graduated feature colour
302    * 
303    * 
304    * @return the value of field 'Mincolour'.
305    */
306   public int getMincolour()
307   {
308     return this._mincolour;
309   }
310
311   /**
312    * Returns the value of field 'order'.
313    * 
314    * @return the value of field 'Order'.
315    */
316   public float getOrder()
317   {
318     return this._order;
319   }
320
321   /**
322    * Returns the value of field 'threshold'. The field 'threshold' has the
323    * following description: threshold value for graduated feature colour
324    * 
325    * 
326    * @return the value of field 'Threshold'.
327    */
328   public float getThreshold()
329   {
330     return this._threshold;
331   }
332
333   /**
334    * Returns the value of field 'threshstate'. The field 'threshstate' has the
335    * following description: threshold type for graduated feature colour
336    * 
337    * 
338    * @return the value of field 'Threshstate'.
339    */
340   public int getThreshstate()
341   {
342     return this._threshstate;
343   }
344
345   /**
346    * Returns the value of field 'type'.
347    * 
348    * @return the value of field 'Type'.
349    */
350   public java.lang.String getType()
351   {
352     return this._type;
353   }
354
355   /**
356    * Method hasAutoScale.
357    * 
358    * @return true if at least one AutoScale has been added
359    */
360   public boolean hasAutoScale()
361   {
362     return this._has_autoScale;
363   }
364
365   /**
366    * Method hasColour.
367    * 
368    * @return true if at least one Colour has been added
369    */
370   public boolean hasColour()
371   {
372     return this._has_colour;
373   }
374
375   /**
376    * Method hasColourByLabel.
377    * 
378    * @return true if at least one ColourByLabel has been added
379    */
380   public boolean hasColourByLabel()
381   {
382     return this._has_colourByLabel;
383   }
384
385   /**
386    * Method hasDisplay.
387    * 
388    * @return true if at least one Display has been added
389    */
390   public boolean hasDisplay()
391   {
392     return this._has_display;
393   }
394
395   /**
396    * Method hasMax.
397    * 
398    * @return true if at least one Max has been added
399    */
400   public boolean hasMax()
401   {
402     return this._has_max;
403   }
404
405   /**
406    * Method hasMin.
407    * 
408    * @return true if at least one Min has been added
409    */
410   public boolean hasMin()
411   {
412     return this._has_min;
413   }
414
415   /**
416    * Method hasMincolour.
417    * 
418    * @return true if at least one Mincolour has been added
419    */
420   public boolean hasMincolour()
421   {
422     return this._has_mincolour;
423   }
424
425   /**
426    * Method hasOrder.
427    * 
428    * @return true if at least one Order has been added
429    */
430   public boolean hasOrder()
431   {
432     return this._has_order;
433   }
434
435   /**
436    * Method hasThreshold.
437    * 
438    * @return true if at least one Threshold has been added
439    */
440   public boolean hasThreshold()
441   {
442     return this._has_threshold;
443   }
444
445   /**
446    * Method hasThreshstate.
447    * 
448    * @return true if at least one Threshstate has been added
449    */
450   public boolean hasThreshstate()
451   {
452     return this._has_threshstate;
453   }
454
455   /**
456    * Returns the value of field 'autoScale'.
457    * 
458    * @return the value of field 'AutoScale'.
459    */
460   public boolean isAutoScale()
461   {
462     return this._autoScale;
463   }
464
465   /**
466    * Returns the value of field 'colourByLabel'.
467    * 
468    * @return the value of field 'ColourByLabel'.
469    */
470   public boolean isColourByLabel()
471   {
472     return this._colourByLabel;
473   }
474
475   /**
476    * Returns the value of field 'display'.
477    * 
478    * @return the value of field 'Display'.
479    */
480   public boolean isDisplay()
481   {
482     return this._display;
483   }
484
485   /**
486    * Method isValid.
487    * 
488    * @return true if this object is valid according to the schema
489    */
490   public boolean isValid()
491   {
492     try
493     {
494       validate();
495     } catch (org.exolab.castor.xml.ValidationException vex)
496     {
497       return false;
498     }
499     return true;
500   }
501
502   /**
503    * 
504    * 
505    * @param out
506    * @throws org.exolab.castor.xml.MarshalException
507    *           if object is null or if any SAXException is thrown during
508    *           marshaling
509    * @throws org.exolab.castor.xml.ValidationException
510    *           if this object is an invalid instance according to the schema
511    */
512   public void marshal(final java.io.Writer out)
513           throws org.exolab.castor.xml.MarshalException,
514           org.exolab.castor.xml.ValidationException
515   {
516     Marshaller.marshal(this, out);
517   }
518
519   /**
520    * 
521    * 
522    * @param handler
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
529    *           marshaling
530    */
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
535   {
536     Marshaller.marshal(this, handler);
537   }
538
539   /**
540    * Sets the value of field 'autoScale'.
541    * 
542    * @param autoScale
543    *          the value of field 'autoScale'.
544    */
545   public void setAutoScale(final boolean autoScale)
546   {
547     this._autoScale = autoScale;
548     this._has_autoScale = true;
549   }
550
551   /**
552    * Sets the value of field 'colour'.
553    * 
554    * @param colour
555    *          the value of field 'colour'.
556    */
557   public void setColour(final int colour)
558   {
559     this._colour = colour;
560     this._has_colour = true;
561   }
562
563   /**
564    * Sets the value of field 'colourByLabel'.
565    * 
566    * @param colourByLabel
567    *          the value of field 'colourByLabel'.
568    */
569   public void setColourByLabel(final boolean colourByLabel)
570   {
571     this._colourByLabel = colourByLabel;
572     this._has_colourByLabel = true;
573   }
574
575   /**
576    * Sets the value of field 'display'.
577    * 
578    * @param display
579    *          the value of field 'display'.
580    */
581   public void setDisplay(final boolean display)
582   {
583     this._display = display;
584     this._has_display = true;
585   }
586
587   /**
588    * Sets the value of field 'max'.
589    * 
590    * @param max
591    *          the value of field 'max'.
592    */
593   public void setMax(final float max)
594   {
595     this._max = max;
596     this._has_max = true;
597   }
598
599   /**
600    * Sets the value of field 'min'.
601    * 
602    * @param min
603    *          the value of field 'min'.
604    */
605   public void setMin(final float min)
606   {
607     this._min = min;
608     this._has_min = true;
609   }
610
611   /**
612    * Sets the value of field 'mincolour'. The field 'mincolour' has the
613    * following description: Optional minimum colour for graduated feature colour
614    * 
615    * 
616    * @param mincolour
617    *          the value of field 'mincolour'.
618    */
619   public void setMincolour(final int mincolour)
620   {
621     this._mincolour = mincolour;
622     this._has_mincolour = true;
623   }
624
625   /**
626    * Sets the value of field 'order'.
627    * 
628    * @param order
629    *          the value of field 'order'.
630    */
631   public void setOrder(final float order)
632   {
633     this._order = order;
634     this._has_order = true;
635   }
636
637   /**
638    * Sets the value of field 'threshold'. The field 'threshold' has the
639    * following description: threshold value for graduated feature colour
640    * 
641    * 
642    * @param threshold
643    *          the value of field 'threshold'.
644    */
645   public void setThreshold(final float threshold)
646   {
647     this._threshold = threshold;
648     this._has_threshold = true;
649   }
650
651   /**
652    * Sets the value of field 'threshstate'. The field 'threshstate' has the
653    * following description: threshold type for graduated feature colour
654    * 
655    * 
656    * @param threshstate
657    *          the value of field 'threshstate'.
658    */
659   public void setThreshstate(final int threshstate)
660   {
661     this._threshstate = threshstate;
662     this._has_threshstate = true;
663   }
664
665   /**
666    * Sets the value of field 'type'.
667    * 
668    * @param type
669    *          the value of field 'type'.
670    */
671   public void setType(final java.lang.String type)
672   {
673     this._type = type;
674   }
675
676   /**
677    * Method unmarshal.
678    * 
679    * @param reader
680    * @throws org.exolab.castor.xml.MarshalException
681    *           if object is null or if any SAXException is thrown during
682    *           marshaling
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
686    */
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
691   {
692     return (jalview.schemabinding.version2.Setting) Unmarshaller.unmarshal(
693             jalview.schemabinding.version2.Setting.class, reader);
694   }
695
696   /**
697    * 
698    * 
699    * @throws org.exolab.castor.xml.ValidationException
700    *           if this object is an invalid instance according to the schema
701    */
702   public void validate() throws org.exolab.castor.xml.ValidationException
703   {
704     org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
705     validator.validate(this);
706   }
707
708 }