63ea943cb5ebc1043f34cf5a091c0d237da30de4
[jalview.git] / src / jalview / schemabinding / version2 / Alcodon.java
1 /*******************************************************************************
2  * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
3  * Copyright (C) $(date) The Jalview Authors
4  *
5  * This file is part of Jalview.
6  *  
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.
11  *   
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.
16  *
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  *******************************************************************************/
21 /*
22  * This class was automatically generated with 
23  * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
24  * Schema.
25  * $Id$
26  */
27
28 package jalview.schemabinding.version2;
29
30 //---------------------------------/
31 //- Imported classes and packages -/
32 //---------------------------------/
33
34 import org.exolab.castor.xml.Marshaller;
35 import org.exolab.castor.xml.Unmarshaller;
36
37 /**
38  * Class Alcodon.
39  * 
40  * @version $Revision$ $Date$
41  */
42 public class Alcodon implements java.io.Serializable
43 {
44
45   // --------------------------/
46   // - Class/Member Variables -/
47   // --------------------------/
48
49   /**
50    * Field _pos1.
51    */
52   private long _pos1;
53
54   /**
55    * keeps track of state for field: _pos1
56    */
57   private boolean _has_pos1;
58
59   /**
60    * Field _pos2.
61    */
62   private long _pos2;
63
64   /**
65    * keeps track of state for field: _pos2
66    */
67   private boolean _has_pos2;
68
69   /**
70    * Field _pos3.
71    */
72   private long _pos3;
73
74   /**
75    * keeps track of state for field: _pos3
76    */
77   private boolean _has_pos3;
78
79   // ----------------/
80   // - Constructors -/
81   // ----------------/
82
83   public Alcodon()
84   {
85     super();
86   }
87
88   // -----------/
89   // - Methods -/
90   // -----------/
91
92   /**
93      */
94   public void deletePos1()
95   {
96     this._has_pos1 = false;
97   }
98
99   /**
100      */
101   public void deletePos2()
102   {
103     this._has_pos2 = false;
104   }
105
106   /**
107      */
108   public void deletePos3()
109   {
110     this._has_pos3 = false;
111   }
112
113   /**
114    * Returns the value of field 'pos1'.
115    * 
116    * @return the value of field 'Pos1'.
117    */
118   public long getPos1()
119   {
120     return this._pos1;
121   }
122
123   /**
124    * Returns the value of field 'pos2'.
125    * 
126    * @return the value of field 'Pos2'.
127    */
128   public long getPos2()
129   {
130     return this._pos2;
131   }
132
133   /**
134    * Returns the value of field 'pos3'.
135    * 
136    * @return the value of field 'Pos3'.
137    */
138   public long getPos3()
139   {
140     return this._pos3;
141   }
142
143   /**
144    * Method hasPos1.
145    * 
146    * @return true if at least one Pos1 has been added
147    */
148   public boolean hasPos1()
149   {
150     return this._has_pos1;
151   }
152
153   /**
154    * Method hasPos2.
155    * 
156    * @return true if at least one Pos2 has been added
157    */
158   public boolean hasPos2()
159   {
160     return this._has_pos2;
161   }
162
163   /**
164    * Method hasPos3.
165    * 
166    * @return true if at least one Pos3 has been added
167    */
168   public boolean hasPos3()
169   {
170     return this._has_pos3;
171   }
172
173   /**
174    * Method isValid.
175    * 
176    * @return true if this object is valid according to the schema
177    */
178   public boolean isValid()
179   {
180     try
181     {
182       validate();
183     } catch (org.exolab.castor.xml.ValidationException vex)
184     {
185       return false;
186     }
187     return true;
188   }
189
190   /**
191    * 
192    * 
193    * @param out
194    * @throws org.exolab.castor.xml.MarshalException
195    *           if object is null or if any SAXException is thrown during
196    *           marshaling
197    * @throws org.exolab.castor.xml.ValidationException
198    *           if this object is an invalid instance according to the schema
199    */
200   public void marshal(final java.io.Writer out)
201           throws org.exolab.castor.xml.MarshalException,
202           org.exolab.castor.xml.ValidationException
203   {
204     Marshaller.marshal(this, out);
205   }
206
207   /**
208    * 
209    * 
210    * @param handler
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
217    *           marshaling
218    */
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
223   {
224     Marshaller.marshal(this, handler);
225   }
226
227   /**
228    * Sets the value of field 'pos1'.
229    * 
230    * @param pos1
231    *          the value of field 'pos1'.
232    */
233   public void setPos1(final long pos1)
234   {
235     this._pos1 = pos1;
236     this._has_pos1 = true;
237   }
238
239   /**
240    * Sets the value of field 'pos2'.
241    * 
242    * @param pos2
243    *          the value of field 'pos2'.
244    */
245   public void setPos2(final long pos2)
246   {
247     this._pos2 = pos2;
248     this._has_pos2 = true;
249   }
250
251   /**
252    * Sets the value of field 'pos3'.
253    * 
254    * @param pos3
255    *          the value of field 'pos3'.
256    */
257   public void setPos3(final long pos3)
258   {
259     this._pos3 = pos3;
260     this._has_pos3 = true;
261   }
262
263   /**
264    * Method unmarshal.
265    * 
266    * @param reader
267    * @throws org.exolab.castor.xml.MarshalException
268    *           if object is null or if any SAXException is thrown during
269    *           marshaling
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
273    */
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
278   {
279     return (jalview.schemabinding.version2.Alcodon) Unmarshaller.unmarshal(
280             jalview.schemabinding.version2.Alcodon.class, reader);
281   }
282
283   /**
284    * 
285    * 
286    * @throws org.exolab.castor.xml.ValidationException
287    *           if this object is an invalid instance according to the schema
288    */
289   public void validate() throws org.exolab.castor.xml.ValidationException
290   {
291     org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
292     validator.validate(this);
293   }
294
295 }