2 * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
3 * Copyright (C) $$Year-Rel$$ 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.
21 package jalview.schemabinding.version2;
23 //---------------------------------/
24 //- Imported classes and packages -/
25 //---------------------------------/
27 import org.exolab.castor.xml.Marshaller;
28 import org.exolab.castor.xml.Unmarshaller;
33 * @version $Revision$ $Date$
35 public class Alcodon implements java.io.Serializable
38 // --------------------------/
39 // - Class/Member Variables -/
40 // --------------------------/
48 * keeps track of state for field: _pos1
50 private boolean _has_pos1;
58 * keeps track of state for field: _pos2
60 private boolean _has_pos2;
68 * keeps track of state for field: _pos3
70 private boolean _has_pos3;
87 public void deletePos1()
89 this._has_pos1 = false;
94 public void deletePos2()
96 this._has_pos2 = false;
101 public void deletePos3()
103 this._has_pos3 = false;
107 * Returns the value of field 'pos1'.
109 * @return the value of field 'Pos1'.
111 public long getPos1()
117 * Returns the value of field 'pos2'.
119 * @return the value of field 'Pos2'.
121 public long getPos2()
127 * Returns the value of field 'pos3'.
129 * @return the value of field 'Pos3'.
131 public long getPos3()
139 * @return true if at least one Pos1 has been added
141 public boolean hasPos1()
143 return this._has_pos1;
149 * @return true if at least one Pos2 has been added
151 public boolean hasPos2()
153 return this._has_pos2;
159 * @return true if at least one Pos3 has been added
161 public boolean hasPos3()
163 return this._has_pos3;
169 * @return true if this object is valid according to the schema
171 public boolean isValid()
176 } catch (org.exolab.castor.xml.ValidationException vex)
187 * @throws org.exolab.castor.xml.MarshalException
188 * if object is null or if any SAXException is thrown during
190 * @throws org.exolab.castor.xml.ValidationException
191 * if this object is an invalid instance according to the schema
193 public void marshal(final java.io.Writer out)
194 throws org.exolab.castor.xml.MarshalException,
195 org.exolab.castor.xml.ValidationException
197 Marshaller.marshal(this, out);
204 * @throws java.io.IOException
205 * if an IOException occurs during marshaling
206 * @throws org.exolab.castor.xml.ValidationException
207 * if this object is an invalid instance according to the schema
208 * @throws org.exolab.castor.xml.MarshalException
209 * if object is null or if any SAXException is thrown during
212 public void marshal(final org.xml.sax.ContentHandler handler)
213 throws java.io.IOException,
214 org.exolab.castor.xml.MarshalException,
215 org.exolab.castor.xml.ValidationException
217 Marshaller.marshal(this, handler);
221 * Sets the value of field 'pos1'.
224 * the value of field 'pos1'.
226 public void setPos1(final long pos1)
229 this._has_pos1 = true;
233 * Sets the value of field 'pos2'.
236 * the value of field 'pos2'.
238 public void setPos2(final long pos2)
241 this._has_pos2 = true;
245 * Sets the value of field 'pos3'.
248 * the value of field 'pos3'.
250 public void setPos3(final long pos3)
253 this._has_pos3 = true;
260 * @throws org.exolab.castor.xml.MarshalException
261 * if object is null or if any SAXException is thrown during
263 * @throws org.exolab.castor.xml.ValidationException
264 * if this object is an invalid instance according to the schema
265 * @return the unmarshaled jalview.schemabinding.version2.Alcodo
267 public static jalview.schemabinding.version2.Alcodon unmarshal(
268 final java.io.Reader reader)
269 throws org.exolab.castor.xml.MarshalException,
270 org.exolab.castor.xml.ValidationException
272 return (jalview.schemabinding.version2.Alcodon) Unmarshaller.unmarshal(
273 jalview.schemabinding.version2.Alcodon.class, reader);
279 * @throws org.exolab.castor.xml.ValidationException
280 * if this object is an invalid instance according to the schema
282 public void validate() throws org.exolab.castor.xml.ValidationException
284 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
285 validator.validate(this);