1 /*******************************************************************************
2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
3 * Copyright (C) 2011 J Procter, AM Waterhouse, J Engelhardt, LM Lui, 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/>.
17 *******************************************************************************/
19 * This class was automatically generated with
20 * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
25 package jalview.schemabinding.version2;
27 //---------------------------------/
28 //- Imported classes and packages -/
29 //---------------------------------/
31 import org.exolab.castor.xml.Marshaller;
32 import org.exolab.castor.xml.Unmarshaller;
37 * @version $Revision$ $Date$
39 public class Alcodon implements java.io.Serializable {
42 //--------------------------/
43 //- Class/Member Variables -/
44 //--------------------------/
52 * keeps track of state for field: _pos1
54 private boolean _has_pos1;
62 * keeps track of state for field: _pos2
64 private boolean _has_pos2;
72 * keeps track of state for field: _pos3
74 private boolean _has_pos3;
92 public void deletePos1(
94 this._has_pos1= false;
99 public void deletePos2(
101 this._has_pos2= false;
106 public void deletePos3(
108 this._has_pos3= false;
112 * Returns the value of field 'pos1'.
114 * @return the value of field 'Pos1'.
122 * Returns the value of field 'pos2'.
124 * @return the value of field 'Pos2'.
132 * Returns the value of field 'pos3'.
134 * @return the value of field 'Pos3'.
144 * @return true if at least one Pos1 has been added
146 public boolean hasPos1(
148 return this._has_pos1;
154 * @return true if at least one Pos2 has been added
156 public boolean hasPos2(
158 return this._has_pos2;
164 * @return true if at least one Pos3 has been added
166 public boolean hasPos3(
168 return this._has_pos3;
174 * @return true if this object is valid according to the schema
176 public boolean isValid(
180 } catch (org.exolab.castor.xml.ValidationException vex) {
190 * @throws org.exolab.castor.xml.MarshalException if object is
191 * null or if any SAXException is thrown during marshaling
192 * @throws org.exolab.castor.xml.ValidationException if this
193 * object is an invalid instance according to the schema
196 final java.io.Writer out)
197 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
198 Marshaller.marshal(this, out);
205 * @throws java.io.IOException if an IOException occurs during
207 * @throws org.exolab.castor.xml.ValidationException if this
208 * object is an invalid instance according to the schema
209 * @throws org.exolab.castor.xml.MarshalException if object is
210 * null or if any SAXException is thrown during marshaling
213 final org.xml.sax.ContentHandler handler)
214 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
215 Marshaller.marshal(this, handler);
219 * Sets the value of field 'pos1'.
221 * @param pos1 the value of field 'pos1'.
226 this._has_pos1 = true;
230 * Sets the value of field 'pos2'.
232 * @param pos2 the value of field 'pos2'.
237 this._has_pos2 = true;
241 * Sets the value of field 'pos3'.
243 * @param pos3 the value of field 'pos3'.
248 this._has_pos3 = true;
255 * @throws org.exolab.castor.xml.MarshalException if object is
256 * null or if any SAXException is thrown during marshaling
257 * @throws org.exolab.castor.xml.ValidationException if this
258 * object is an invalid instance according to the schema
259 * @return the unmarshaled jalview.schemabinding.version2.Alcodo
261 public static jalview.schemabinding.version2.Alcodon unmarshal(
262 final java.io.Reader reader)
263 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
264 return (jalview.schemabinding.version2.Alcodon) Unmarshaller.unmarshal(jalview.schemabinding.version2.Alcodon.class, reader);
270 * @throws org.exolab.castor.xml.ValidationException if this
271 * object is an invalid instance according to the schema
273 public void validate(
275 throws org.exolab.castor.xml.ValidationException {
276 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
277 validator.validate(this);