2 * This class was automatically generated with
\r
3 * <a href="http://www.castor.org">Castor 0.9.6</a>, using an XML
\r
9 * Jalview - A Sequence Alignment Editor and Viewer
\r
10 * Copyright (C) 2005 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle
\r
12 * This program is free software; you can redistribute it and/or
\r
13 * modify it under the terms of the GNU General Public License
\r
14 * as published by the Free Software Foundation; either version 2
\r
15 * of the License, or (at your option) any later version.
\r
17 * This program is distributed in the hope that it will be useful,
\r
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
20 * GNU General Public License for more details.
\r
22 * You should have received a copy of the GNU General Public License
\r
23 * along with this program; if not, write to the Free Software
\r
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
\r
27 package jalview.binding;
\r
29 //---------------------------------/
\r
30 //- Imported classes and packages -/
\r
31 //---------------------------------/
\r
33 import java.io.IOException;
\r
34 import java.io.Reader;
\r
35 import java.io.Serializable;
\r
36 import java.io.Writer;
\r
37 import org.exolab.castor.xml.MarshalException;
\r
38 import org.exolab.castor.xml.Marshaller;
\r
39 import org.exolab.castor.xml.Unmarshaller;
\r
40 import org.exolab.castor.xml.ValidationException;
\r
41 import org.xml.sax.ContentHandler;
\r
46 * @version $Revision$ $Date$
\r
48 public class Residue implements java.io.Serializable {
\r
51 //--------------------------/
\r
52 //- Class/Member Variables -/
\r
53 //--------------------------/
\r
58 private java.lang.String _name;
\r
66 * keeps track of state for field: _RGB
\r
68 private boolean _has_RGB;
\r
77 } //-- jalview.binding.Residue()
\r
88 public void deleteRGB()
\r
90 this._has_RGB= false;
\r
91 } //-- void deleteRGB()
\r
94 * Returns the value of field 'name'.
\r
97 * @return the value of field 'name'.
\r
99 public java.lang.String getName()
\r
102 } //-- java.lang.String getName()
\r
105 * Returns the value of field 'RGB'.
\r
108 * @return the value of field 'RGB'.
\r
110 public int getRGB()
\r
113 } //-- int getRGB()
\r
122 public boolean hasRGB()
\r
124 return this._has_RGB;
\r
125 } //-- boolean hasRGB()
\r
134 public boolean isValid()
\r
139 catch (org.exolab.castor.xml.ValidationException vex) {
\r
143 } //-- boolean isValid()
\r
152 public void marshal(java.io.Writer out)
\r
153 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
\r
156 Marshaller.marshal(this, out);
\r
157 } //-- void marshal(java.io.Writer)
\r
166 public void marshal(org.xml.sax.ContentHandler handler)
\r
167 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
\r
170 Marshaller.marshal(this, handler);
\r
171 } //-- void marshal(org.xml.sax.ContentHandler)
\r
174 * Sets the value of field 'name'.
\r
176 * @param name the value of field 'name'.
\r
178 public void setName(java.lang.String name)
\r
181 } //-- void setName(java.lang.String)
\r
184 * Sets the value of field 'RGB'.
\r
186 * @param RGB the value of field 'RGB'.
\r
188 public void setRGB(int RGB)
\r
191 this._has_RGB = true;
\r
192 } //-- void setRGB(int)
\r
202 public static java.lang.Object unmarshal(java.io.Reader reader)
\r
203 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
\r
205 return (jalview.binding.Residue) Unmarshaller.unmarshal(jalview.binding.Residue.class, reader);
\r
206 } //-- java.lang.Object unmarshal(java.io.Reader)
\r
212 public void validate()
\r
213 throws org.exolab.castor.xml.ValidationException
\r
215 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
\r
216 validator.validate(this);
\r
217 } //-- void validate()
\r