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