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