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
5 * This file is part of Jalview.
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.
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.
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 *******************************************************************************/
19 * This class was automatically generated with
20 * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
25 package jalview.binding;
27 //---------------------------------/
28 //- Imported classes and packages -/
29 //---------------------------------/
31 import org.exolab.castor.xml.Marshaller;
32 import org.exolab.castor.xml.Unmarshaller;
37 * @version $Revision$ $Date$
39 public class Setting implements java.io.Serializable {
42 //--------------------------/
43 //- Class/Member Variables -/
44 //--------------------------/
49 private java.lang.String _type;
57 * keeps track of state for field: _colour
59 private boolean _has_colour;
64 private boolean _display;
67 * keeps track of state for field: _display
69 private boolean _has_display;
87 public void deleteColour(
89 this._has_colour= false;
94 public void deleteDisplay(
96 this._has_display= false;
100 * Returns the value of field 'colour'.
102 * @return the value of field 'Colour'.
104 public int getColour(
110 * Returns the value of field 'display'.
112 * @return the value of field 'Display'.
114 public boolean getDisplay(
116 return this._display;
120 * Returns the value of field 'type'.
122 * @return the value of field 'Type'.
124 public java.lang.String getType(
132 * @return true if at least one Colour has been added
134 public boolean hasColour(
136 return this._has_colour;
142 * @return true if at least one Display has been added
144 public boolean hasDisplay(
146 return this._has_display;
150 * Returns the value of field 'display'.
152 * @return the value of field 'Display'.
154 public boolean isDisplay(
156 return this._display;
162 * @return true if this object is valid according to the schema
164 public boolean isValid(
168 } catch (org.exolab.castor.xml.ValidationException vex) {
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
184 final java.io.Writer out)
185 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
186 Marshaller.marshal(this, out);
193 * @throws java.io.IOException if an IOException occurs during
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
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);
207 * Sets the value of field 'colour'.
209 * @param colour the value of field 'colour'.
211 public void setColour(
213 this._colour = colour;
214 this._has_colour = true;
218 * Sets the value of field 'display'.
220 * @param display the value of field 'display'.
222 public void setDisplay(
223 final boolean display) {
224 this._display = display;
225 this._has_display = true;
229 * Sets the value of field 'type'.
231 * @param type the value of field 'type'.
234 final java.lang.String type) {
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
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);
257 * @throws org.exolab.castor.xml.ValidationException if this
258 * object is an invalid instance according to the schema
260 public void validate(
262 throws org.exolab.castor.xml.ValidationException {
263 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
264 validator.validate(this);