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