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