1 /*******************************************************************************
2 * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
3 * Copyright (C) $(date) The Jalview Authors
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
10 * of the License, or (at your option) any later version.
12 * Jalview is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty
14 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with Jalview. If not, see <http://www.gnu.org/licenses/>.
19 * The Jalview Authors are detailed in the 'AUTHORS' file.
20 *******************************************************************************/
22 * This class was automatically generated with
23 * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
28 package jalview.schemabinding.version2;
30 //---------------------------------/
31 //- Imported classes and packages -/
32 //---------------------------------/
34 import org.exolab.castor.xml.Marshaller;
35 import org.exolab.castor.xml.Unmarshaller;
40 * @version $Revision$ $Date$
42 public class Alcodon implements java.io.Serializable
45 // --------------------------/
46 // - Class/Member Variables -/
47 // --------------------------/
55 * keeps track of state for field: _pos1
57 private boolean _has_pos1;
65 * keeps track of state for field: _pos2
67 private boolean _has_pos2;
75 * keeps track of state for field: _pos3
77 private boolean _has_pos3;
94 public void deletePos1()
96 this._has_pos1 = false;
101 public void deletePos2()
103 this._has_pos2 = false;
108 public void deletePos3()
110 this._has_pos3 = false;
114 * Returns the value of field 'pos1'.
116 * @return the value of field 'Pos1'.
118 public long getPos1()
124 * Returns the value of field 'pos2'.
126 * @return the value of field 'Pos2'.
128 public long getPos2()
134 * Returns the value of field 'pos3'.
136 * @return the value of field 'Pos3'.
138 public long getPos3()
146 * @return true if at least one Pos1 has been added
148 public boolean hasPos1()
150 return this._has_pos1;
156 * @return true if at least one Pos2 has been added
158 public boolean hasPos2()
160 return this._has_pos2;
166 * @return true if at least one Pos3 has been added
168 public boolean hasPos3()
170 return this._has_pos3;
176 * @return true if this object is valid according to the schema
178 public boolean isValid()
183 } catch (org.exolab.castor.xml.ValidationException vex)
194 * @throws org.exolab.castor.xml.MarshalException
195 * if object is null or if any SAXException is thrown during
197 * @throws org.exolab.castor.xml.ValidationException
198 * if this object is an invalid instance according to the schema
200 public void marshal(final java.io.Writer out)
201 throws org.exolab.castor.xml.MarshalException,
202 org.exolab.castor.xml.ValidationException
204 Marshaller.marshal(this, out);
211 * @throws java.io.IOException
212 * if an IOException occurs during marshaling
213 * @throws org.exolab.castor.xml.ValidationException
214 * if this object is an invalid instance according to the schema
215 * @throws org.exolab.castor.xml.MarshalException
216 * if object is null or if any SAXException is thrown during
219 public void marshal(final org.xml.sax.ContentHandler handler)
220 throws java.io.IOException,
221 org.exolab.castor.xml.MarshalException,
222 org.exolab.castor.xml.ValidationException
224 Marshaller.marshal(this, handler);
228 * Sets the value of field 'pos1'.
231 * the value of field 'pos1'.
233 public void setPos1(final long pos1)
236 this._has_pos1 = true;
240 * Sets the value of field 'pos2'.
243 * the value of field 'pos2'.
245 public void setPos2(final long pos2)
248 this._has_pos2 = true;
252 * Sets the value of field 'pos3'.
255 * the value of field 'pos3'.
257 public void setPos3(final long pos3)
260 this._has_pos3 = true;
267 * @throws org.exolab.castor.xml.MarshalException
268 * if object is null or if any SAXException is thrown during
270 * @throws org.exolab.castor.xml.ValidationException
271 * if this object is an invalid instance according to the schema
272 * @return the unmarshaled jalview.schemabinding.version2.Alcodo
274 public static jalview.schemabinding.version2.Alcodon unmarshal(
275 final java.io.Reader reader)
276 throws org.exolab.castor.xml.MarshalException,
277 org.exolab.castor.xml.ValidationException
279 return (jalview.schemabinding.version2.Alcodon) Unmarshaller.unmarshal(
280 jalview.schemabinding.version2.Alcodon.class, reader);
286 * @throws org.exolab.castor.xml.ValidationException
287 * if this object is an invalid instance according to the schema
289 public void validate() throws org.exolab.castor.xml.ValidationException
291 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
292 validator.validate(this);