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