GPL license added
[jalview.git] / src / jalview / binding / JSeq.java
1 /*\r
2  * This class was automatically generated with\r
3  * <a href="http://www.castor.org">Castor 0.9.6</a>, using an XML\r
4  * Schema.\r
5  * $Id$\r
6  */\r
7 \r
8 /*\r
9 * Jalview - A Sequence Alignment Editor and Viewer\r
10 * Copyright (C) 2005 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle\r
11 *\r
12 * This program is free software; you can redistribute it and/or\r
13 * modify it under the terms of the GNU General Public License\r
14 * as published by the Free Software Foundation; either version 2\r
15 * of the License, or (at your option) any later version.\r
16 *\r
17 * This program is distributed in the hope that it will be useful,\r
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
20 * GNU General Public License for more details.\r
21 *\r
22 * You should have received a copy of the GNU General Public License\r
23 * along with this program; if not, write to the Free Software\r
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA\r
25 */\r
26 \r
27 package jalview.binding;\r
28 \r
29   //---------------------------------/\r
30  //- Imported classes and packages -/\r
31 //---------------------------------/\r
32 \r
33 import java.io.IOException;\r
34 import java.io.Reader;\r
35 import java.io.Serializable;\r
36 import java.io.Writer;\r
37 import org.exolab.castor.xml.MarshalException;\r
38 import org.exolab.castor.xml.Marshaller;\r
39 import org.exolab.castor.xml.Unmarshaller;\r
40 import org.exolab.castor.xml.ValidationException;\r
41 import org.xml.sax.ContentHandler;\r
42 \r
43 /**\r
44  * Class JSeq.\r
45  *\r
46  * @version $Revision$ $Date$\r
47  */\r
48 public class JSeq implements java.io.Serializable {\r
49 \r
50 \r
51       //--------------------------/\r
52      //- Class/Member Variables -/\r
53     //--------------------------/\r
54 \r
55     /**\r
56      * Field _colour\r
57      */\r
58     private int _colour;\r
59 \r
60     /**\r
61      * keeps track of state for field: _colour\r
62      */\r
63     private boolean _has_colour;\r
64 \r
65     /**\r
66      * Field _start\r
67      */\r
68     private int _start;\r
69 \r
70     /**\r
71      * keeps track of state for field: _start\r
72      */\r
73     private boolean _has_start;\r
74 \r
75     /**\r
76      * Field _end\r
77      */\r
78     private int _end;\r
79 \r
80     /**\r
81      * keeps track of state for field: _end\r
82      */\r
83     private boolean _has_end;\r
84 \r
85     /**\r
86      * Field _id\r
87      */\r
88     private int _id;\r
89 \r
90     /**\r
91      * keeps track of state for field: _id\r
92      */\r
93     private boolean _has_id;\r
94 \r
95 \r
96       //----------------/\r
97      //- Constructors -/\r
98     //----------------/\r
99 \r
100     public JSeq() {\r
101         super();\r
102     } //-- jalview.binding.JSeq()\r
103 \r
104 \r
105       //-----------/\r
106      //- Methods -/\r
107     //-----------/\r
108 \r
109     /**\r
110      * Method deleteColour\r
111      *\r
112      */\r
113     public void deleteColour()\r
114     {\r
115         this._has_colour= false;\r
116     } //-- void deleteColour()\r
117 \r
118     /**\r
119      * Method deleteEnd\r
120      *\r
121      */\r
122     public void deleteEnd()\r
123     {\r
124         this._has_end= false;\r
125     } //-- void deleteEnd()\r
126 \r
127     /**\r
128      * Method deleteId\r
129      *\r
130      */\r
131     public void deleteId()\r
132     {\r
133         this._has_id= false;\r
134     } //-- void deleteId()\r
135 \r
136     /**\r
137      * Method deleteStart\r
138      *\r
139      */\r
140     public void deleteStart()\r
141     {\r
142         this._has_start= false;\r
143     } //-- void deleteStart()\r
144 \r
145     /**\r
146      * Returns the value of field 'colour'.\r
147      *\r
148      * @return int\r
149      * @return the value of field 'colour'.\r
150      */\r
151     public int getColour()\r
152     {\r
153         return this._colour;\r
154     } //-- int getColour()\r
155 \r
156     /**\r
157      * Returns the value of field 'end'.\r
158      *\r
159      * @return int\r
160      * @return the value of field 'end'.\r
161      */\r
162     public int getEnd()\r
163     {\r
164         return this._end;\r
165     } //-- int getEnd()\r
166 \r
167     /**\r
168      * Returns the value of field 'id'.\r
169      *\r
170      * @return int\r
171      * @return the value of field 'id'.\r
172      */\r
173     public int getId()\r
174     {\r
175         return this._id;\r
176     } //-- int getId()\r
177 \r
178     /**\r
179      * Returns the value of field 'start'.\r
180      *\r
181      * @return int\r
182      * @return the value of field 'start'.\r
183      */\r
184     public int getStart()\r
185     {\r
186         return this._start;\r
187     } //-- int getStart()\r
188 \r
189     /**\r
190      * Method hasColour\r
191      *\r
192      *\r
193      *\r
194      * @return boolean\r
195      */\r
196     public boolean hasColour()\r
197     {\r
198         return this._has_colour;\r
199     } //-- boolean hasColour()\r
200 \r
201     /**\r
202      * Method hasEnd\r
203      *\r
204      *\r
205      *\r
206      * @return boolean\r
207      */\r
208     public boolean hasEnd()\r
209     {\r
210         return this._has_end;\r
211     } //-- boolean hasEnd()\r
212 \r
213     /**\r
214      * Method hasId\r
215      *\r
216      *\r
217      *\r
218      * @return boolean\r
219      */\r
220     public boolean hasId()\r
221     {\r
222         return this._has_id;\r
223     } //-- boolean hasId()\r
224 \r
225     /**\r
226      * Method hasStart\r
227      *\r
228      *\r
229      *\r
230      * @return boolean\r
231      */\r
232     public boolean hasStart()\r
233     {\r
234         return this._has_start;\r
235     } //-- boolean hasStart()\r
236 \r
237     /**\r
238      * Method isValid\r
239      *\r
240      *\r
241      *\r
242      * @return boolean\r
243      */\r
244     public boolean isValid()\r
245     {\r
246         try {\r
247             validate();\r
248         }\r
249         catch (org.exolab.castor.xml.ValidationException vex) {\r
250             return false;\r
251         }\r
252         return true;\r
253     } //-- boolean isValid()\r
254 \r
255     /**\r
256      * Method marshal\r
257      *\r
258      *\r
259      *\r
260      * @param out\r
261      */\r
262     public void marshal(java.io.Writer out)\r
263         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
264     {\r
265 \r
266         Marshaller.marshal(this, out);\r
267     } //-- void marshal(java.io.Writer)\r
268 \r
269     /**\r
270      * Method marshal\r
271      *\r
272      *\r
273      *\r
274      * @param handler\r
275      */\r
276     public void marshal(org.xml.sax.ContentHandler handler)\r
277         throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
278     {\r
279 \r
280         Marshaller.marshal(this, handler);\r
281     } //-- void marshal(org.xml.sax.ContentHandler)\r
282 \r
283     /**\r
284      * Sets the value of field 'colour'.\r
285      *\r
286      * @param colour the value of field 'colour'.\r
287      */\r
288     public void setColour(int colour)\r
289     {\r
290         this._colour = colour;\r
291         this._has_colour = true;\r
292     } //-- void setColour(int)\r
293 \r
294     /**\r
295      * Sets the value of field 'end'.\r
296      *\r
297      * @param end the value of field 'end'.\r
298      */\r
299     public void setEnd(int end)\r
300     {\r
301         this._end = end;\r
302         this._has_end = true;\r
303     } //-- void setEnd(int)\r
304 \r
305     /**\r
306      * Sets the value of field 'id'.\r
307      *\r
308      * @param id the value of field 'id'.\r
309      */\r
310     public void setId(int id)\r
311     {\r
312         this._id = id;\r
313         this._has_id = true;\r
314     } //-- void setId(int)\r
315 \r
316     /**\r
317      * Sets the value of field 'start'.\r
318      *\r
319      * @param start the value of field 'start'.\r
320      */\r
321     public void setStart(int start)\r
322     {\r
323         this._start = start;\r
324         this._has_start = true;\r
325     } //-- void setStart(int)\r
326 \r
327     /**\r
328      * Method unmarshal\r
329      *\r
330      *\r
331      *\r
332      * @param reader\r
333      * @return Object\r
334      */\r
335     public static java.lang.Object unmarshal(java.io.Reader reader)\r
336         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
337     {\r
338         return (jalview.binding.JSeq) Unmarshaller.unmarshal(jalview.binding.JSeq.class, reader);\r
339     } //-- java.lang.Object unmarshal(java.io.Reader)\r
340 \r
341     /**\r
342      * Method validate\r
343      *\r
344      */\r
345     public void validate()\r
346         throws org.exolab.castor.xml.ValidationException\r
347     {\r
348         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();\r
349         validator.validate(this);\r
350     } //-- void validate()\r
351 \r
352 }\r