2 * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1)
\r
3 * Copyright (C) 2009 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
86 public void deletePos1(
\r
88 this._has_pos1= false;
\r
93 public void deletePos2(
\r
95 this._has_pos2= false;
\r
100 public void deletePos3(
\r
102 this._has_pos3= false;
\r
106 * Returns the value of field 'pos1'.
\r
108 * @return the value of field 'Pos1'.
\r
110 public long getPos1(
\r
116 * Returns the value of field 'pos2'.
\r
118 * @return the value of field 'Pos2'.
\r
120 public long getPos2(
\r
126 * Returns the value of field 'pos3'.
\r
128 * @return the value of field 'Pos3'.
\r
130 public long getPos3(
\r
138 * @return true if at least one Pos1 has been added
\r
140 public boolean hasPos1(
\r
142 return this._has_pos1;
\r
148 * @return true if at least one Pos2 has been added
\r
150 public boolean hasPos2(
\r
152 return this._has_pos2;
\r
158 * @return true if at least one Pos3 has been added
\r
160 public boolean hasPos3(
\r
162 return this._has_pos3;
\r
168 * @return true if this object is valid according to the schema
\r
170 public boolean isValid(
\r
174 } catch (org.exolab.castor.xml.ValidationException vex) {
\r
184 * @throws org.exolab.castor.xml.MarshalException if object is
\r
185 * null or if any SAXException is thrown during marshaling
\r
186 * @throws org.exolab.castor.xml.ValidationException if this
\r
187 * object is an invalid instance according to the schema
\r
189 public void marshal(
\r
190 final java.io.Writer out)
\r
191 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
\r
192 Marshaller.marshal(this, out);
\r
199 * @throws java.io.IOException if an IOException occurs during
\r
201 * @throws org.exolab.castor.xml.ValidationException if this
\r
202 * object is an invalid instance according to the schema
\r
203 * @throws org.exolab.castor.xml.MarshalException if object is
\r
204 * null or if any SAXException is thrown during marshaling
\r
206 public void marshal(
\r
207 final org.xml.sax.ContentHandler handler)
\r
208 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
\r
209 Marshaller.marshal(this, handler);
\r
213 * Sets the value of field 'pos1'.
\r
215 * @param pos1 the value of field 'pos1'.
\r
217 public void setPos1(
\r
220 this._has_pos1 = true;
\r
224 * Sets the value of field 'pos2'.
\r
226 * @param pos2 the value of field 'pos2'.
\r
228 public void setPos2(
\r
231 this._has_pos2 = true;
\r
235 * Sets the value of field 'pos3'.
\r
237 * @param pos3 the value of field 'pos3'.
\r
239 public void setPos3(
\r
242 this._has_pos3 = true;
\r
246 * Method unmarshal.
\r
249 * @throws org.exolab.castor.xml.MarshalException if object is
\r
250 * null or if any SAXException is thrown during marshaling
\r
251 * @throws org.exolab.castor.xml.ValidationException if this
\r
252 * object is an invalid instance according to the schema
\r
253 * @return the unmarshaled jalview.schemabinding.version2.Alcodo
\r
255 public static jalview.schemabinding.version2.Alcodon unmarshal(
\r
256 final java.io.Reader reader)
\r
257 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
\r
258 return (jalview.schemabinding.version2.Alcodon) Unmarshaller.unmarshal(jalview.schemabinding.version2.Alcodon.class, reader);
\r
264 * @throws org.exolab.castor.xml.ValidationException if this
\r
265 * object is an invalid instance according to the schema
\r
267 public void validate(
\r
269 throws org.exolab.castor.xml.ValidationException {
\r
270 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
\r
271 validator.validate(this);
\r