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 JSeq implements java.io.Serializable {
\r
49 //--------------------------/
\r
50 //- Class/Member Variables -/
\r
51 //--------------------------/
\r
56 private int _colour;
\r
59 * keeps track of state for field: _colour
\r
61 private boolean _has_colour;
\r
69 * keeps track of state for field: _start
\r
71 private boolean _has_start;
\r
79 * keeps track of state for field: _end
\r
81 private boolean _has_end;
\r
89 * keeps track of state for field: _id
\r
91 private boolean _has_id;
\r
99 //-- jalview.binding.JSeq()
\r
102 public void deleteColour() {
\r
103 this._has_colour = false;
\r
105 //-- void deleteColour()
\r
111 public void deleteEnd() {
\r
112 this._has_end = false;
\r
114 //-- void deleteEnd()
\r
120 public void deleteId() {
\r
121 this._has_id = false;
\r
123 //-- void deleteId()
\r
126 * Method deleteStart
\r
129 public void deleteStart() {
\r
130 this._has_start = false;
\r
132 //-- void deleteStart()
\r
135 * Returns the value of field 'colour'.
\r
138 * @return the value of field 'colour'.
\r
140 public int getColour() {
\r
141 return this._colour;
\r
143 //-- int getColour()
\r
146 * Returns the value of field 'end'.
\r
149 * @return the value of field 'end'.
\r
151 public int getEnd() {
\r
157 * Returns the value of field 'id'.
\r
160 * @return the value of field 'id'.
\r
162 public int getId() {
\r
168 * Returns the value of field 'start'.
\r
171 * @return the value of field 'start'.
\r
173 public int getStart() {
\r
174 return this._start;
\r
176 //-- int getStart()
\r
185 public boolean hasColour() {
\r
186 return this._has_colour;
\r
188 //-- boolean hasColour()
\r
197 public boolean hasEnd() {
\r
198 return this._has_end;
\r
200 //-- boolean hasEnd()
\r
209 public boolean hasId() {
\r
210 return this._has_id;
\r
212 //-- boolean hasId()
\r
221 public boolean hasStart() {
\r
222 return this._has_start;
\r
224 //-- boolean hasStart()
\r
233 public boolean isValid() {
\r
236 } catch (org.exolab.castor.xml.ValidationException vex) {
\r
242 //-- boolean isValid()
\r
251 public void marshal(java.io.Writer out)
\r
252 throws org.exolab.castor.xml.MarshalException,
\r
253 org.exolab.castor.xml.ValidationException {
\r
254 Marshaller.marshal(this, out);
\r
256 //-- void marshal(java.io.Writer)
\r
265 public void marshal(org.xml.sax.ContentHandler handler)
\r
266 throws java.io.IOException, org.exolab.castor.xml.MarshalException,
\r
267 org.exolab.castor.xml.ValidationException {
\r
268 Marshaller.marshal(this, handler);
\r
270 //-- void marshal(org.xml.sax.ContentHandler)
\r
273 * Sets the value of field 'colour'.
\r
275 * @param colour the value of field 'colour'.
\r
277 public void setColour(int colour) {
\r
278 this._colour = colour;
\r
279 this._has_colour = true;
\r
281 //-- void setColour(int)
\r
284 * Sets the value of field 'end'.
\r
286 * @param end the value of field 'end'.
\r
288 public void setEnd(int end) {
\r
290 this._has_end = true;
\r
292 //-- void setEnd(int)
\r
295 * Sets the value of field 'id'.
\r
297 * @param id the value of field 'id'.
\r
299 public void setId(int id) {
\r
301 this._has_id = true;
\r
303 //-- void setId(int)
\r
306 * Sets the value of field 'start'.
\r
308 * @param start the value of field 'start'.
\r
310 public void setStart(int start) {
\r
311 this._start = start;
\r
312 this._has_start = true;
\r
314 //-- void setStart(int)
\r
324 public static java.lang.Object unmarshal(java.io.Reader reader)
\r
325 throws org.exolab.castor.xml.MarshalException,
\r
326 org.exolab.castor.xml.ValidationException {
\r
327 return (jalview.binding.JSeq) Unmarshaller.unmarshal(jalview.binding.JSeq.class,
\r
330 //-- java.lang.Object unmarshal(java.io.Reader)
\r
336 public void validate() throws org.exolab.castor.xml.ValidationException {
\r
337 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
\r
338 validator.validate(this);
\r
340 //-- void validate()
\r