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