1 /*******************************************************************************
2 * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
3 * Copyright (C) $(date) The Jalview Authors
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
10 * of the License, or (at your option) any later version.
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.
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 *******************************************************************************/
22 * This class was automatically generated with
23 * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
28 package jalview.binding;
30 //---------------------------------/
31 //- Imported classes and packages -/
32 //---------------------------------/
34 import org.exolab.castor.xml.Marshaller;
35 import org.exolab.castor.xml.Unmarshaller;
40 * @version $Revision$ $Date$
42 public class Setting implements java.io.Serializable
45 // --------------------------/
46 // - Class/Member Variables -/
47 // --------------------------/
52 private java.lang.String _type;
60 * keeps track of state for field: _colour
62 private boolean _has_colour;
67 private boolean _display;
70 * keeps track of state for field: _display
72 private boolean _has_display;
89 public void deleteColour()
91 this._has_colour = false;
96 public void deleteDisplay()
98 this._has_display = false;
102 * Returns the value of field 'colour'.
104 * @return the value of field 'Colour'.
106 public int getColour()
112 * Returns the value of field 'display'.
114 * @return the value of field 'Display'.
116 public boolean getDisplay()
118 return this._display;
122 * Returns the value of field 'type'.
124 * @return the value of field 'Type'.
126 public java.lang.String getType()
134 * @return true if at least one Colour has been added
136 public boolean hasColour()
138 return this._has_colour;
144 * @return true if at least one Display has been added
146 public boolean hasDisplay()
148 return this._has_display;
152 * Returns the value of field 'display'.
154 * @return the value of field 'Display'.
156 public boolean isDisplay()
158 return this._display;
164 * @return true if this object is valid according to the schema
166 public boolean isValid()
171 } catch (org.exolab.castor.xml.ValidationException vex)
182 * @throws org.exolab.castor.xml.MarshalException
183 * if object is null or if any SAXException is thrown during
185 * @throws org.exolab.castor.xml.ValidationException
186 * if this object is an invalid instance according to the schema
188 public void marshal(final java.io.Writer out)
189 throws org.exolab.castor.xml.MarshalException,
190 org.exolab.castor.xml.ValidationException
192 Marshaller.marshal(this, out);
199 * @throws java.io.IOException
200 * if an IOException occurs during marshaling
201 * @throws org.exolab.castor.xml.ValidationException
202 * if this object is an invalid instance according to the schema
203 * @throws org.exolab.castor.xml.MarshalException
204 * if object is null or if any SAXException is thrown during
207 public void marshal(final org.xml.sax.ContentHandler handler)
208 throws java.io.IOException,
209 org.exolab.castor.xml.MarshalException,
210 org.exolab.castor.xml.ValidationException
212 Marshaller.marshal(this, handler);
216 * Sets the value of field 'colour'.
219 * the value of field 'colour'.
221 public void setColour(final int colour)
223 this._colour = colour;
224 this._has_colour = true;
228 * Sets the value of field 'display'.
231 * the value of field 'display'.
233 public void setDisplay(final boolean display)
235 this._display = display;
236 this._has_display = true;
240 * Sets the value of field 'type'.
243 * the value of field 'type'.
245 public void setType(final java.lang.String type)
254 * @throws org.exolab.castor.xml.MarshalException
255 * if object is null or if any SAXException is thrown during
257 * @throws org.exolab.castor.xml.ValidationException
258 * if this object is an invalid instance according to the schema
259 * @return the unmarshaled jalview.binding.Setting
261 public static jalview.binding.Setting unmarshal(
262 final java.io.Reader reader)
263 throws org.exolab.castor.xml.MarshalException,
264 org.exolab.castor.xml.ValidationException
266 return (jalview.binding.Setting) Unmarshaller
267 .unmarshal(jalview.binding.Setting.class, reader);
273 * @throws org.exolab.castor.xml.ValidationException
274 * if this object is an invalid instance according to the schema
276 public void validate() throws org.exolab.castor.xml.ValidationException
278 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
279 validator.validate(this);