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