9cd84b431d038cedc2132665c22d947cd9cc4ada
[jalview.git] / src / jalview / binding / 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.binding;
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       //----------------/
56      //- Constructors -/
57     //----------------/
58
59     public Setting() {
60         super();
61     }
62
63
64       //-----------/
65      //- Methods -/
66     //-----------/
67
68     /**
69      */
70     public void deleteColour(
71     ) {
72         this._has_colour= false;
73     }
74
75     /**
76      */
77     public void deleteDisplay(
78     ) {
79         this._has_display= false;
80     }
81
82     /**
83      * Returns the value of field 'colour'.
84      * 
85      * @return the value of field 'Colour'.
86      */
87     public int getColour(
88     ) {
89         return this._colour;
90     }
91
92     /**
93      * Returns the value of field 'display'.
94      * 
95      * @return the value of field 'Display'.
96      */
97     public boolean getDisplay(
98     ) {
99         return this._display;
100     }
101
102     /**
103      * Returns the value of field 'type'.
104      * 
105      * @return the value of field 'Type'.
106      */
107     public java.lang.String getType(
108     ) {
109         return this._type;
110     }
111
112     /**
113      * Method hasColour.
114      * 
115      * @return true if at least one Colour has been added
116      */
117     public boolean hasColour(
118     ) {
119         return this._has_colour;
120     }
121
122     /**
123      * Method hasDisplay.
124      * 
125      * @return true if at least one Display has been added
126      */
127     public boolean hasDisplay(
128     ) {
129         return this._has_display;
130     }
131
132     /**
133      * Returns the value of field 'display'.
134      * 
135      * @return the value of field 'Display'.
136      */
137     public boolean isDisplay(
138     ) {
139         return this._display;
140     }
141
142     /**
143      * Method isValid.
144      * 
145      * @return true if this object is valid according to the schema
146      */
147     public boolean isValid(
148     ) {
149         try {
150             validate();
151         } catch (org.exolab.castor.xml.ValidationException vex) {
152             return false;
153         }
154         return true;
155     }
156
157     /**
158      * 
159      * 
160      * @param out
161      * @throws org.exolab.castor.xml.MarshalException if object is
162      * null or if any SAXException is thrown during marshaling
163      * @throws org.exolab.castor.xml.ValidationException if this
164      * object is an invalid instance according to the schema
165      */
166     public void marshal(
167             final java.io.Writer out)
168     throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
169         Marshaller.marshal(this, out);
170     }
171
172     /**
173      * 
174      * 
175      * @param handler
176      * @throws java.io.IOException if an IOException occurs during
177      * marshaling
178      * @throws org.exolab.castor.xml.ValidationException if this
179      * object is an invalid instance according to the schema
180      * @throws org.exolab.castor.xml.MarshalException if object is
181      * null or if any SAXException is thrown during marshaling
182      */
183     public void marshal(
184             final org.xml.sax.ContentHandler handler)
185     throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
186         Marshaller.marshal(this, handler);
187     }
188
189     /**
190      * Sets the value of field 'colour'.
191      * 
192      * @param colour the value of field 'colour'.
193      */
194     public void setColour(
195             final int colour) {
196         this._colour = colour;
197         this._has_colour = true;
198     }
199
200     /**
201      * Sets the value of field 'display'.
202      * 
203      * @param display the value of field 'display'.
204      */
205     public void setDisplay(
206             final boolean display) {
207         this._display = display;
208         this._has_display = true;
209     }
210
211     /**
212      * Sets the value of field 'type'.
213      * 
214      * @param type the value of field 'type'.
215      */
216     public void setType(
217             final java.lang.String type) {
218         this._type = type;
219     }
220
221     /**
222      * Method unmarshal.
223      * 
224      * @param reader
225      * @throws org.exolab.castor.xml.MarshalException if object is
226      * null or if any SAXException is thrown during marshaling
227      * @throws org.exolab.castor.xml.ValidationException if this
228      * object is an invalid instance according to the schema
229      * @return the unmarshaled jalview.binding.Setting
230      */
231     public static jalview.binding.Setting unmarshal(
232             final java.io.Reader reader)
233     throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
234         return (jalview.binding.Setting) Unmarshaller.unmarshal(jalview.binding.Setting.class, reader);
235     }
236
237     /**
238      * 
239      * 
240      * @throws org.exolab.castor.xml.ValidationException if this
241      * object is an invalid instance according to the schema
242      */
243     public void validate(
244     )
245     throws org.exolab.castor.xml.ValidationException {
246         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
247         validator.validate(this);
248     }
249
250 }