2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
\r
3 * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
\r
5 * This file is part of Jalview.
\r
7 * Jalview is free software: you can redistribute it and/or
\r
8 * modify it under the terms of the GNU General Public License
\r
9 * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
\r
11 * Jalview is distributed in the hope that it will be useful, but
\r
12 * WITHOUT ANY WARRANTY; without even the implied warranty
\r
13 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
\r
14 * PURPOSE. See the GNU General Public License for more details.
\r
16 * You should have received a copy of the GNU General Public License along with Jalview. If not, see <http://www.gnu.org/licenses/>.
\r
18 package jalview.schemabinding.version2;
\r
20 //---------------------------------/
\r
21 //- Imported classes and packages -/
\r
22 //---------------------------------/
\r
24 import org.exolab.castor.xml.Marshaller;
\r
25 import org.exolab.castor.xml.Unmarshaller;
\r
30 * @version $Revision$ $Date$
\r
32 public class Alcodon implements java.io.Serializable
\r
35 // --------------------------/
\r
36 // - Class/Member Variables -/
\r
37 // --------------------------/
\r
45 * keeps track of state for field: _pos1
\r
47 private boolean _has_pos1;
\r
55 * keeps track of state for field: _pos2
\r
57 private boolean _has_pos2;
\r
65 * keeps track of state for field: _pos3
\r
67 private boolean _has_pos3;
\r
69 // ----------------/
\r
70 // - Constructors -/
\r
71 // ----------------/
\r
84 public void deletePos1()
\r
86 this._has_pos1 = false;
\r
91 public void deletePos2()
\r
93 this._has_pos2 = false;
\r
98 public void deletePos3()
\r
100 this._has_pos3 = false;
\r
104 * Returns the value of field 'pos1'.
\r
106 * @return the value of field 'Pos1'.
\r
108 public long getPos1()
\r
114 * Returns the value of field 'pos2'.
\r
116 * @return the value of field 'Pos2'.
\r
118 public long getPos2()
\r
124 * Returns the value of field 'pos3'.
\r
126 * @return the value of field 'Pos3'.
\r
128 public long getPos3()
\r
136 * @return true if at least one Pos1 has been added
\r
138 public boolean hasPos1()
\r
140 return this._has_pos1;
\r
146 * @return true if at least one Pos2 has been added
\r
148 public boolean hasPos2()
\r
150 return this._has_pos2;
\r
156 * @return true if at least one Pos3 has been added
\r
158 public boolean hasPos3()
\r
160 return this._has_pos3;
\r
166 * @return true if this object is valid according to the schema
\r
168 public boolean isValid()
\r
173 } catch (org.exolab.castor.xml.ValidationException vex)
\r
184 * @throws org.exolab.castor.xml.MarshalException
\r
185 * if object is null or if any SAXException is thrown during
\r
187 * @throws org.exolab.castor.xml.ValidationException
\r
188 * if this object is an invalid instance according to the schema
\r
190 public void marshal(final java.io.Writer out)
\r
191 throws org.exolab.castor.xml.MarshalException,
\r
192 org.exolab.castor.xml.ValidationException
\r
194 Marshaller.marshal(this, out);
\r
201 * @throws java.io.IOException
\r
202 * if an IOException occurs during marshaling
\r
203 * @throws org.exolab.castor.xml.ValidationException
\r
204 * if this object is an invalid instance according to the schema
\r
205 * @throws org.exolab.castor.xml.MarshalException
\r
206 * if object is null or if any SAXException is thrown during
\r
209 public void marshal(final org.xml.sax.ContentHandler handler)
\r
210 throws java.io.IOException,
\r
211 org.exolab.castor.xml.MarshalException,
\r
212 org.exolab.castor.xml.ValidationException
\r
214 Marshaller.marshal(this, handler);
\r
218 * Sets the value of field 'pos1'.
\r
221 * the value of field 'pos1'.
\r
223 public void setPos1(final long pos1)
\r
226 this._has_pos1 = true;
\r
230 * Sets the value of field 'pos2'.
\r
233 * the value of field 'pos2'.
\r
235 public void setPos2(final long pos2)
\r
238 this._has_pos2 = true;
\r
242 * Sets the value of field 'pos3'.
\r
245 * the value of field 'pos3'.
\r
247 public void setPos3(final long pos3)
\r
250 this._has_pos3 = true;
\r
254 * Method unmarshal.
\r
257 * @throws org.exolab.castor.xml.MarshalException
\r
258 * if object is null or if any SAXException is thrown during
\r
260 * @throws org.exolab.castor.xml.ValidationException
\r
261 * if this object is an invalid instance according to the schema
\r
262 * @return the unmarshaled jalview.schemabinding.version2.Alcodo
\r
264 public static jalview.schemabinding.version2.Alcodon unmarshal(
\r
265 final java.io.Reader reader)
\r
266 throws org.exolab.castor.xml.MarshalException,
\r
267 org.exolab.castor.xml.ValidationException
\r
269 return (jalview.schemabinding.version2.Alcodon) Unmarshaller.unmarshal(
\r
270 jalview.schemabinding.version2.Alcodon.class, reader);
\r
276 * @throws org.exolab.castor.xml.ValidationException
\r
277 * if this object is an invalid instance according to the schema
\r
279 public void validate() throws org.exolab.castor.xml.ValidationException
\r
281 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
\r
282 validator.validate(this);
\r