update author list in license for (JAL-826)
[jalview.git] / src / jalview / binding / Setting.java
1 /*******************************************************************************
2  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
3  * Copyright (C) 2011 J Procter, AM Waterhouse, J Engelhardt, LM Lui, G Barton, M Clamp, S Searle
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.  If not, see <http://www.gnu.org/licenses/>.
17  *******************************************************************************/
18 /*
19  * This class was automatically generated with 
20  * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
21  * Schema.
22  * $Id$
23  */
24
25 package jalview.binding;
26
27   //---------------------------------/
28  //- Imported classes and packages -/
29 //---------------------------------/
30
31 import org.exolab.castor.xml.Marshaller;
32 import org.exolab.castor.xml.Unmarshaller;
33
34 /**
35  * Class Setting.
36  * 
37  * @version $Revision$ $Date$
38  */
39 public class Setting implements java.io.Serializable {
40
41
42       //--------------------------/
43      //- Class/Member Variables -/
44     //--------------------------/
45
46     /**
47      * Field _type.
48      */
49     private java.lang.String _type;
50
51     /**
52      * Field _colour.
53      */
54     private int _colour;
55
56     /**
57      * keeps track of state for field: _colour
58      */
59     private boolean _has_colour;
60
61     /**
62      * Field _display.
63      */
64     private boolean _display;
65
66     /**
67      * keeps track of state for field: _display
68      */
69     private boolean _has_display;
70
71
72       //----------------/
73      //- Constructors -/
74     //----------------/
75
76     public Setting() {
77         super();
78     }
79
80
81       //-----------/
82      //- Methods -/
83     //-----------/
84
85     /**
86      */
87     public void deleteColour(
88     ) {
89         this._has_colour= false;
90     }
91
92     /**
93      */
94     public void deleteDisplay(
95     ) {
96         this._has_display= false;
97     }
98
99     /**
100      * Returns the value of field 'colour'.
101      * 
102      * @return the value of field 'Colour'.
103      */
104     public int getColour(
105     ) {
106         return this._colour;
107     }
108
109     /**
110      * Returns the value of field 'display'.
111      * 
112      * @return the value of field 'Display'.
113      */
114     public boolean getDisplay(
115     ) {
116         return this._display;
117     }
118
119     /**
120      * Returns the value of field 'type'.
121      * 
122      * @return the value of field 'Type'.
123      */
124     public java.lang.String getType(
125     ) {
126         return this._type;
127     }
128
129     /**
130      * Method hasColour.
131      * 
132      * @return true if at least one Colour has been added
133      */
134     public boolean hasColour(
135     ) {
136         return this._has_colour;
137     }
138
139     /**
140      * Method hasDisplay.
141      * 
142      * @return true if at least one Display has been added
143      */
144     public boolean hasDisplay(
145     ) {
146         return this._has_display;
147     }
148
149     /**
150      * Returns the value of field 'display'.
151      * 
152      * @return the value of field 'Display'.
153      */
154     public boolean isDisplay(
155     ) {
156         return this._display;
157     }
158
159     /**
160      * Method isValid.
161      * 
162      * @return true if this object is valid according to the schema
163      */
164     public boolean isValid(
165     ) {
166         try {
167             validate();
168         } catch (org.exolab.castor.xml.ValidationException vex) {
169             return false;
170         }
171         return true;
172     }
173
174     /**
175      * 
176      * 
177      * @param out
178      * @throws org.exolab.castor.xml.MarshalException if object is
179      * null or if any SAXException is thrown during marshaling
180      * @throws org.exolab.castor.xml.ValidationException if this
181      * object is an invalid instance according to the schema
182      */
183     public void marshal(
184             final java.io.Writer out)
185     throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
186         Marshaller.marshal(this, out);
187     }
188
189     /**
190      * 
191      * 
192      * @param handler
193      * @throws java.io.IOException if an IOException occurs during
194      * marshaling
195      * @throws org.exolab.castor.xml.ValidationException if this
196      * object is an invalid instance according to the schema
197      * @throws org.exolab.castor.xml.MarshalException if object is
198      * null or if any SAXException is thrown during marshaling
199      */
200     public void marshal(
201             final org.xml.sax.ContentHandler handler)
202     throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
203         Marshaller.marshal(this, handler);
204     }
205
206     /**
207      * Sets the value of field 'colour'.
208      * 
209      * @param colour the value of field 'colour'.
210      */
211     public void setColour(
212             final int colour) {
213         this._colour = colour;
214         this._has_colour = true;
215     }
216
217     /**
218      * Sets the value of field 'display'.
219      * 
220      * @param display the value of field 'display'.
221      */
222     public void setDisplay(
223             final boolean display) {
224         this._display = display;
225         this._has_display = true;
226     }
227
228     /**
229      * Sets the value of field 'type'.
230      * 
231      * @param type the value of field 'type'.
232      */
233     public void setType(
234             final java.lang.String type) {
235         this._type = type;
236     }
237
238     /**
239      * Method unmarshal.
240      * 
241      * @param reader
242      * @throws org.exolab.castor.xml.MarshalException if object is
243      * null or if any SAXException is thrown during marshaling
244      * @throws org.exolab.castor.xml.ValidationException if this
245      * object is an invalid instance according to the schema
246      * @return the unmarshaled jalview.binding.Setting
247      */
248     public static jalview.binding.Setting unmarshal(
249             final java.io.Reader reader)
250     throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
251         return (jalview.binding.Setting) Unmarshaller.unmarshal(jalview.binding.Setting.class, reader);
252     }
253
254     /**
255      * 
256      * 
257      * @throws org.exolab.castor.xml.ValidationException if this
258      * object is an invalid instance according to the schema
259      */
260     public void validate(
261     )
262     throws org.exolab.castor.xml.ValidationException {
263         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
264         validator.validate(this);
265     }
266
267 }