2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
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. If not, see <http://www.gnu.org/licenses/>.
17 * The Jalview Authors are detailed in the 'AUTHORS' file.
19 package jalview.schemabinding.version2;
21 //---------------------------------/
22 //- Imported classes and packages -/
23 //---------------------------------/
25 import org.exolab.castor.xml.Marshaller;
26 import org.exolab.castor.xml.Unmarshaller;
31 * @version $Revision$ $Date$
33 public class Alcodon implements java.io.Serializable
36 // --------------------------/
37 // - Class/Member Variables -/
38 // --------------------------/
46 * keeps track of state for field: _pos1
48 private boolean _has_pos1;
56 * keeps track of state for field: _pos2
58 private boolean _has_pos2;
66 * keeps track of state for field: _pos3
68 private boolean _has_pos3;
85 public void deletePos1()
87 this._has_pos1 = false;
92 public void deletePos2()
94 this._has_pos2 = false;
99 public void deletePos3()
101 this._has_pos3 = false;
105 * Returns the value of field 'pos1'.
107 * @return the value of field 'Pos1'.
109 public long getPos1()
115 * Returns the value of field 'pos2'.
117 * @return the value of field 'Pos2'.
119 public long getPos2()
125 * Returns the value of field 'pos3'.
127 * @return the value of field 'Pos3'.
129 public long getPos3()
137 * @return true if at least one Pos1 has been added
139 public boolean hasPos1()
141 return this._has_pos1;
147 * @return true if at least one Pos2 has been added
149 public boolean hasPos2()
151 return this._has_pos2;
157 * @return true if at least one Pos3 has been added
159 public boolean hasPos3()
161 return this._has_pos3;
167 * @return true if this object is valid according to the schema
169 public boolean isValid()
174 } catch (org.exolab.castor.xml.ValidationException vex)
185 * @throws org.exolab.castor.xml.MarshalException
186 * if object is null or if any SAXException is thrown during
188 * @throws org.exolab.castor.xml.ValidationException
189 * if this object is an invalid instance according to the schema
191 public void marshal(final java.io.Writer out)
192 throws org.exolab.castor.xml.MarshalException,
193 org.exolab.castor.xml.ValidationException
195 Marshaller.marshal(this, out);
202 * @throws java.io.IOException
203 * if an IOException occurs during marshaling
204 * @throws org.exolab.castor.xml.ValidationException
205 * if this object is an invalid instance according to the schema
206 * @throws org.exolab.castor.xml.MarshalException
207 * if object is null or if any SAXException is thrown during
210 public void marshal(final org.xml.sax.ContentHandler handler)
211 throws java.io.IOException,
212 org.exolab.castor.xml.MarshalException,
213 org.exolab.castor.xml.ValidationException
215 Marshaller.marshal(this, handler);
219 * Sets the value of field 'pos1'.
222 * the value of field 'pos1'.
224 public void setPos1(final long pos1)
227 this._has_pos1 = true;
231 * Sets the value of field 'pos2'.
234 * the value of field 'pos2'.
236 public void setPos2(final long pos2)
239 this._has_pos2 = true;
243 * Sets the value of field 'pos3'.
246 * the value of field 'pos3'.
248 public void setPos3(final long pos3)
251 this._has_pos3 = true;
258 * @throws org.exolab.castor.xml.MarshalException
259 * if object is null or if any SAXException is thrown during
261 * @throws org.exolab.castor.xml.ValidationException
262 * if this object is an invalid instance according to the schema
263 * @return the unmarshaled jalview.schemabinding.version2.Alcodo
265 public static jalview.schemabinding.version2.Alcodon unmarshal(
266 final java.io.Reader reader)
267 throws org.exolab.castor.xml.MarshalException,
268 org.exolab.castor.xml.ValidationException
270 return (jalview.schemabinding.version2.Alcodon) Unmarshaller.unmarshal(
271 jalview.schemabinding.version2.Alcodon.class, reader);
277 * @throws org.exolab.castor.xml.ValidationException
278 * if this object is an invalid instance according to the schema
280 public void validate() throws org.exolab.castor.xml.ValidationException
282 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
283 validator.validate(this);