apply gpl development license
[jalview.git] / src / jalview / schemabinding / version2 / Alcodon.java
1 /*\r
2  * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1)\r
3  * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle\r
4  * \r
5  * This program is free software; you can redistribute it and/or\r
6  * modify it under the terms of the GNU General Public License\r
7  * as published by the Free Software Foundation; either version 2\r
8  * of the License, or (at your option) any later version.\r
9  * \r
10  * This program is distributed in the hope that it will be useful,\r
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
13  * GNU General Public License for more details.\r
14  * \r
15  * You should have received a copy of the GNU General Public License\r
16  * along with this program; if not, write to the Free Software\r
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA\r
18  */\r
19 package jalview.schemabinding.version2;\r
20 \r
21   //---------------------------------/\r
22  //- Imported classes and packages -/\r
23 //---------------------------------/\r
24 \r
25 import org.exolab.castor.xml.Marshaller;\r
26 import org.exolab.castor.xml.Unmarshaller;\r
27 \r
28 /**\r
29  * Class Alcodon.\r
30  * \r
31  * @version $Revision$ $Date$\r
32  */\r
33 public class Alcodon implements java.io.Serializable {\r
34 \r
35 \r
36       //--------------------------/\r
37      //- Class/Member Variables -/\r
38     //--------------------------/\r
39 \r
40     /**\r
41      * Field _pos1.\r
42      */\r
43     private long _pos1;\r
44 \r
45     /**\r
46      * keeps track of state for field: _pos1\r
47      */\r
48     private boolean _has_pos1;\r
49 \r
50     /**\r
51      * Field _pos2.\r
52      */\r
53     private long _pos2;\r
54 \r
55     /**\r
56      * keeps track of state for field: _pos2\r
57      */\r
58     private boolean _has_pos2;\r
59 \r
60     /**\r
61      * Field _pos3.\r
62      */\r
63     private long _pos3;\r
64 \r
65     /**\r
66      * keeps track of state for field: _pos3\r
67      */\r
68     private boolean _has_pos3;\r
69 \r
70 \r
71       //----------------/\r
72      //- Constructors -/\r
73     //----------------/\r
74 \r
75     public Alcodon() {\r
76         super();\r
77     }\r
78 \r
79 \r
80       //-----------/\r
81      //- Methods -/\r
82     //-----------/\r
83 \r
84     /**\r
85      */\r
86     public void deletePos1(\r
87     ) {\r
88         this._has_pos1= false;\r
89     }\r
90 \r
91     /**\r
92      */\r
93     public void deletePos2(\r
94     ) {\r
95         this._has_pos2= false;\r
96     }\r
97 \r
98     /**\r
99      */\r
100     public void deletePos3(\r
101     ) {\r
102         this._has_pos3= false;\r
103     }\r
104 \r
105     /**\r
106      * Returns the value of field 'pos1'.\r
107      * \r
108      * @return the value of field 'Pos1'.\r
109      */\r
110     public long getPos1(\r
111     ) {\r
112         return this._pos1;\r
113     }\r
114 \r
115     /**\r
116      * Returns the value of field 'pos2'.\r
117      * \r
118      * @return the value of field 'Pos2'.\r
119      */\r
120     public long getPos2(\r
121     ) {\r
122         return this._pos2;\r
123     }\r
124 \r
125     /**\r
126      * Returns the value of field 'pos3'.\r
127      * \r
128      * @return the value of field 'Pos3'.\r
129      */\r
130     public long getPos3(\r
131     ) {\r
132         return this._pos3;\r
133     }\r
134 \r
135     /**\r
136      * Method hasPos1.\r
137      * \r
138      * @return true if at least one Pos1 has been added\r
139      */\r
140     public boolean hasPos1(\r
141     ) {\r
142         return this._has_pos1;\r
143     }\r
144 \r
145     /**\r
146      * Method hasPos2.\r
147      * \r
148      * @return true if at least one Pos2 has been added\r
149      */\r
150     public boolean hasPos2(\r
151     ) {\r
152         return this._has_pos2;\r
153     }\r
154 \r
155     /**\r
156      * Method hasPos3.\r
157      * \r
158      * @return true if at least one Pos3 has been added\r
159      */\r
160     public boolean hasPos3(\r
161     ) {\r
162         return this._has_pos3;\r
163     }\r
164 \r
165     /**\r
166      * Method isValid.\r
167      * \r
168      * @return true if this object is valid according to the schema\r
169      */\r
170     public boolean isValid(\r
171     ) {\r
172         try {\r
173             validate();\r
174         } catch (org.exolab.castor.xml.ValidationException vex) {\r
175             return false;\r
176         }\r
177         return true;\r
178     }\r
179 \r
180     /**\r
181      * \r
182      * \r
183      * @param out\r
184      * @throws org.exolab.castor.xml.MarshalException if object is\r
185      * null or if any SAXException is thrown during marshaling\r
186      * @throws org.exolab.castor.xml.ValidationException if this\r
187      * object is an invalid instance according to the schema\r
188      */\r
189     public void marshal(\r
190             final java.io.Writer out)\r
191     throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
192         Marshaller.marshal(this, out);\r
193     }\r
194 \r
195     /**\r
196      * \r
197      * \r
198      * @param handler\r
199      * @throws java.io.IOException if an IOException occurs during\r
200      * marshaling\r
201      * @throws org.exolab.castor.xml.ValidationException if this\r
202      * object is an invalid instance according to the schema\r
203      * @throws org.exolab.castor.xml.MarshalException if object is\r
204      * null or if any SAXException is thrown during marshaling\r
205      */\r
206     public void marshal(\r
207             final org.xml.sax.ContentHandler handler)\r
208     throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
209         Marshaller.marshal(this, handler);\r
210     }\r
211 \r
212     /**\r
213      * Sets the value of field 'pos1'.\r
214      * \r
215      * @param pos1 the value of field 'pos1'.\r
216      */\r
217     public void setPos1(\r
218             final long pos1) {\r
219         this._pos1 = pos1;\r
220         this._has_pos1 = true;\r
221     }\r
222 \r
223     /**\r
224      * Sets the value of field 'pos2'.\r
225      * \r
226      * @param pos2 the value of field 'pos2'.\r
227      */\r
228     public void setPos2(\r
229             final long pos2) {\r
230         this._pos2 = pos2;\r
231         this._has_pos2 = true;\r
232     }\r
233 \r
234     /**\r
235      * Sets the value of field 'pos3'.\r
236      * \r
237      * @param pos3 the value of field 'pos3'.\r
238      */\r
239     public void setPos3(\r
240             final long pos3) {\r
241         this._pos3 = pos3;\r
242         this._has_pos3 = true;\r
243     }\r
244 \r
245     /**\r
246      * Method unmarshal.\r
247      * \r
248      * @param reader\r
249      * @throws org.exolab.castor.xml.MarshalException if object is\r
250      * null or if any SAXException is thrown during marshaling\r
251      * @throws org.exolab.castor.xml.ValidationException if this\r
252      * object is an invalid instance according to the schema\r
253      * @return the unmarshaled jalview.schemabinding.version2.Alcodo\r
254      */\r
255     public static jalview.schemabinding.version2.Alcodon unmarshal(\r
256             final java.io.Reader reader)\r
257     throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
258         return (jalview.schemabinding.version2.Alcodon) Unmarshaller.unmarshal(jalview.schemabinding.version2.Alcodon.class, reader);\r
259     }\r
260 \r
261     /**\r
262      * \r
263      * \r
264      * @throws org.exolab.castor.xml.ValidationException if this\r
265      * object is an invalid instance according to the schema\r
266      */\r
267     public void validate(\r
268     )\r
269     throws org.exolab.castor.xml.ValidationException {\r
270         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();\r
271         validator.validate(this);\r
272     }\r
273 \r
274 }\r