2 * This class was automatically generated with
\r
3 * <a href="http://www.castor.org">Castor 0.9.6</a>, using an XML
\r
8 * Jalview - A Sequence Alignment Editor and Viewer
\r
9 * Copyright (C) 2005 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle
\r
11 * This program is free software; you can redistribute it and/or
\r
12 * modify it under the terms of the GNU General Public License
\r
13 * as published by the Free Software Foundation; either version 2
\r
14 * of the License, or (at your option) any later version.
\r
16 * This program is distributed in the hope that it will be useful,
\r
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
19 * GNU General Public License for more details.
\r
21 * You should have received a copy of the GNU General Public License
\r
22 * along with this program; if not, write to the Free Software
\r
23 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
\r
25 package jalview.binding;
\r
27 import org.exolab.castor.xml.MarshalException;
\r
28 import org.exolab.castor.xml.Marshaller;
\r
29 import org.exolab.castor.xml.Unmarshaller;
\r
30 import org.exolab.castor.xml.ValidationException;
\r
32 import org.xml.sax.ContentHandler;
\r
34 //---------------------------------/
\r
35 //- Imported classes and packages -/
\r
36 //---------------------------------/
\r
37 import java.io.IOException;
\r
38 import java.io.Reader;
\r
39 import java.io.Serializable;
\r
40 import java.io.Writer;
\r
46 * @version $Revision$ $Date$
\r
48 public class Residue implements java.io.Serializable {
\r
49 //--------------------------/
\r
50 //- Class/Member Variables -/
\r
51 //--------------------------/
\r
56 private java.lang.String _name;
\r
64 * keeps track of state for field: _RGB
\r
66 private boolean _has_RGB;
\r
74 //-- jalview.binding.Residue()
\r
77 public void deleteRGB() {
\r
78 this._has_RGB = false;
\r
80 //-- void deleteRGB()
\r
83 * Returns the value of field 'name'.
\r
86 * @return the value of field 'name'.
\r
88 public java.lang.String getName() {
\r
91 //-- java.lang.String getName()
\r
94 * Returns the value of field 'RGB'.
\r
97 * @return the value of field 'RGB'.
\r
99 public int getRGB() {
\r
111 public boolean hasRGB() {
\r
112 return this._has_RGB;
\r
114 //-- boolean hasRGB()
\r
123 public boolean isValid() {
\r
126 } catch (org.exolab.castor.xml.ValidationException vex) {
\r
132 //-- boolean isValid()
\r
141 public void marshal(java.io.Writer out)
\r
142 throws org.exolab.castor.xml.MarshalException,
\r
143 org.exolab.castor.xml.ValidationException {
\r
144 Marshaller.marshal(this, out);
\r
146 //-- void marshal(java.io.Writer)
\r
155 public void marshal(org.xml.sax.ContentHandler handler)
\r
156 throws java.io.IOException, org.exolab.castor.xml.MarshalException,
\r
157 org.exolab.castor.xml.ValidationException {
\r
158 Marshaller.marshal(this, handler);
\r
160 //-- void marshal(org.xml.sax.ContentHandler)
\r
163 * Sets the value of field 'name'.
\r
165 * @param name the value of field 'name'.
\r
167 public void setName(java.lang.String name) {
\r
170 //-- void setName(java.lang.String)
\r
173 * Sets the value of field 'RGB'.
\r
175 * @param RGB the value of field 'RGB'.
\r
177 public void setRGB(int RGB) {
\r
179 this._has_RGB = true;
\r
181 //-- void setRGB(int)
\r
191 public static java.lang.Object unmarshal(java.io.Reader reader)
\r
192 throws org.exolab.castor.xml.MarshalException,
\r
193 org.exolab.castor.xml.ValidationException {
\r
194 return (jalview.binding.Residue) Unmarshaller.unmarshal(jalview.binding.Residue.class,
\r
197 //-- java.lang.Object unmarshal(java.io.Reader)
\r
203 public void validate() throws org.exolab.castor.xml.ValidationException {
\r
204 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
\r
205 validator.validate(this);
\r
207 //-- void validate()
\r