1 /*******************************************************************************
2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.1)
3 * Copyright (C) 2014 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 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.
17 * If not, see <http://www.gnu.org/licenses/>.
18 * The Jalview Authors are detailed in the 'AUTHORS' file.
19 ******************************************************************************/
21 * This class was automatically generated with
22 * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
27 package jalview.schemabinding.version2;
29 //---------------------------------/
30 //- Imported classes and packages -/
31 //---------------------------------/
33 import org.exolab.castor.xml.Marshaller;
34 import org.exolab.castor.xml.Unmarshaller;
39 * @version $Revision$ $Date$
41 public class Alcodon implements java.io.Serializable
44 // --------------------------/
45 // - Class/Member Variables -/
46 // --------------------------/
54 * keeps track of state for field: _pos1
56 private boolean _has_pos1;
64 * keeps track of state for field: _pos2
66 private boolean _has_pos2;
74 * keeps track of state for field: _pos3
76 private boolean _has_pos3;
93 public void deletePos1()
95 this._has_pos1 = false;
100 public void deletePos2()
102 this._has_pos2 = false;
107 public void deletePos3()
109 this._has_pos3 = false;
113 * Returns the value of field 'pos1'.
115 * @return the value of field 'Pos1'.
117 public long getPos1()
123 * Returns the value of field 'pos2'.
125 * @return the value of field 'Pos2'.
127 public long getPos2()
133 * Returns the value of field 'pos3'.
135 * @return the value of field 'Pos3'.
137 public long getPos3()
145 * @return true if at least one Pos1 has been added
147 public boolean hasPos1()
149 return this._has_pos1;
155 * @return true if at least one Pos2 has been added
157 public boolean hasPos2()
159 return this._has_pos2;
165 * @return true if at least one Pos3 has been added
167 public boolean hasPos3()
169 return this._has_pos3;
175 * @return true if this object is valid according to the schema
177 public boolean isValid()
182 } catch (org.exolab.castor.xml.ValidationException vex)
193 * @throws org.exolab.castor.xml.MarshalException
194 * if object is null or if any SAXException is thrown during
196 * @throws org.exolab.castor.xml.ValidationException
197 * if this object is an invalid instance according to the schema
199 public void marshal(final java.io.Writer out)
200 throws org.exolab.castor.xml.MarshalException,
201 org.exolab.castor.xml.ValidationException
203 Marshaller.marshal(this, out);
210 * @throws java.io.IOException
211 * if an IOException occurs during marshaling
212 * @throws org.exolab.castor.xml.ValidationException
213 * if this object is an invalid instance according to the schema
214 * @throws org.exolab.castor.xml.MarshalException
215 * if object is null or if any SAXException is thrown during
218 public void marshal(final org.xml.sax.ContentHandler handler)
219 throws java.io.IOException,
220 org.exolab.castor.xml.MarshalException,
221 org.exolab.castor.xml.ValidationException
223 Marshaller.marshal(this, handler);
227 * Sets the value of field 'pos1'.
230 * the value of field 'pos1'.
232 public void setPos1(final long pos1)
235 this._has_pos1 = true;
239 * Sets the value of field 'pos2'.
242 * the value of field 'pos2'.
244 public void setPos2(final long pos2)
247 this._has_pos2 = true;
251 * Sets the value of field 'pos3'.
254 * the value of field 'pos3'.
256 public void setPos3(final long pos3)
259 this._has_pos3 = true;
266 * @throws org.exolab.castor.xml.MarshalException
267 * if object is null or if any SAXException is thrown during
269 * @throws org.exolab.castor.xml.ValidationException
270 * if this object is an invalid instance according to the schema
271 * @return the unmarshaled jalview.schemabinding.version2.Alcodo
273 public static jalview.schemabinding.version2.Alcodon unmarshal(
274 final java.io.Reader reader)
275 throws org.exolab.castor.xml.MarshalException,
276 org.exolab.castor.xml.ValidationException
278 return (jalview.schemabinding.version2.Alcodon) Unmarshaller.unmarshal(
279 jalview.schemabinding.version2.Alcodon.class, reader);
285 * @throws org.exolab.castor.xml.ValidationException
286 * if this object is an invalid instance according to the schema
288 public void validate() throws org.exolab.castor.xml.ValidationException
290 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
291 validator.validate(this);