2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4)
\r
3 * Copyright (C) 2008 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle
\r
5 * This program is free software; you can redistribute it and/or
\r
6 * modify it under the terms of the GNU General Public License
\r
7 * as published by the Free Software Foundation; either version 2
\r
8 * of the License, or (at your option) any later version.
\r
10 * This program is distributed in the hope that it will be useful,
\r
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
13 * GNU General Public License for more details.
\r
15 * You should have received a copy of the GNU General Public License
\r
16 * along with this program; if not, write to the Free Software
\r
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
\r
19 package jalview.schemabinding.version2;
\r
21 // ---------------------------------/
\r
22 // - Imported classes and packages -/
\r
23 // ---------------------------------/
\r
25 import org.exolab.castor.xml.Marshaller;
\r
26 import org.exolab.castor.xml.Unmarshaller;
\r
31 * @version $Revision$ $Date$
\r
33 public class Alcodon implements java.io.Serializable
\r
36 // --------------------------/
\r
37 // - Class/Member Variables -/
\r
38 // --------------------------/
\r
46 * keeps track of state for field: _pos1
\r
48 private boolean _has_pos1;
\r
56 * keeps track of state for field: _pos2
\r
58 private boolean _has_pos2;
\r
66 * keeps track of state for field: _pos3
\r
68 private boolean _has_pos3;
\r
70 // ----------------/
\r
71 // - Constructors -/
\r
72 // ----------------/
\r
85 public void deletePos1()
\r
87 this._has_pos1 = false;
\r
92 public void deletePos2()
\r
94 this._has_pos2 = false;
\r
99 public void deletePos3()
\r
101 this._has_pos3 = false;
\r
105 * Returns the value of field 'pos1'.
\r
107 * @return the value of field 'Pos1'.
\r
109 public long getPos1()
\r
115 * Returns the value of field 'pos2'.
\r
117 * @return the value of field 'Pos2'.
\r
119 public long getPos2()
\r
125 * Returns the value of field 'pos3'.
\r
127 * @return the value of field 'Pos3'.
\r
129 public long getPos3()
\r
137 * @return true if at least one Pos1 has been added
\r
139 public boolean hasPos1()
\r
141 return this._has_pos1;
\r
147 * @return true if at least one Pos2 has been added
\r
149 public boolean hasPos2()
\r
151 return this._has_pos2;
\r
157 * @return true if at least one Pos3 has been added
\r
159 public boolean hasPos3()
\r
161 return this._has_pos3;
\r
167 * @return true if this object is valid according to the schema
\r
169 public boolean isValid()
\r
174 } catch (org.exolab.castor.xml.ValidationException vex)
\r
185 * @throws org.exolab.castor.xml.MarshalException
\r
186 * if object is null or if any SAXException is thrown during
\r
188 * @throws org.exolab.castor.xml.ValidationException
\r
189 * if this object is an invalid instance according to the
\r
192 public void marshal(final java.io.Writer out)
\r
193 throws org.exolab.castor.xml.MarshalException,
\r
194 org.exolab.castor.xml.ValidationException
\r
196 Marshaller.marshal(this, out);
\r
203 * @throws java.io.IOException
\r
204 * if an IOException occurs during marshaling
\r
205 * @throws org.exolab.castor.xml.ValidationException
\r
206 * if this object is an invalid instance according to the
\r
208 * @throws org.exolab.castor.xml.MarshalException
\r
209 * if object is null or if any SAXException is thrown during
\r
212 public void marshal(final org.xml.sax.ContentHandler handler)
\r
213 throws java.io.IOException,
\r
214 org.exolab.castor.xml.MarshalException,
\r
215 org.exolab.castor.xml.ValidationException
\r
217 Marshaller.marshal(this, handler);
\r
221 * Sets the value of field 'pos1'.
\r
224 * the value of field 'pos1'.
\r
226 public void setPos1(final long pos1)
\r
229 this._has_pos1 = true;
\r
233 * Sets the value of field 'pos2'.
\r
236 * the value of field 'pos2'.
\r
238 public void setPos2(final long pos2)
\r
241 this._has_pos2 = true;
\r
245 * Sets the value of field 'pos3'.
\r
248 * the value of field 'pos3'.
\r
250 public void setPos3(final long pos3)
\r
253 this._has_pos3 = true;
\r
257 * Method unmarshal.
\r
260 * @throws org.exolab.castor.xml.MarshalException
\r
261 * if object is null or if any SAXException is thrown during
\r
263 * @throws org.exolab.castor.xml.ValidationException
\r
264 * if this object is an invalid instance according to the
\r
266 * @return the unmarshaled jalview.schemabinding.version2.Alcodo
\r
268 public static jalview.schemabinding.version2.Alcodon unmarshal(
\r
269 final java.io.Reader reader)
\r
270 throws org.exolab.castor.xml.MarshalException,
\r
271 org.exolab.castor.xml.ValidationException
\r
273 return (jalview.schemabinding.version2.Alcodon) Unmarshaller.unmarshal(
\r
274 jalview.schemabinding.version2.Alcodon.class, reader);
\r
280 * @throws org.exolab.castor.xml.ValidationException
\r
281 * if this object is an invalid instance according to the
\r
284 public void validate() throws org.exolab.castor.xml.ValidationException
\r
286 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
\r
287 validator.validate(this);
\r