update author list in license for (JAL-826)
[jalview.git] / src / jalview / binding / Feature.java
1 /*******************************************************************************
2  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
3  * Copyright (C) 2011 J Procter, AM Waterhouse, J Engelhardt, LM Lui, G Barton, M Clamp, S Searle
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  *******************************************************************************/
18 /*
19  * This class was automatically generated with 
20  * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
21  * Schema.
22  * $Id$
23  */
24
25 package jalview.binding;
26
27   //---------------------------------/
28  //- Imported classes and packages -/
29 //---------------------------------/
30
31 import org.exolab.castor.xml.Marshaller;
32 import org.exolab.castor.xml.Unmarshaller;
33
34 /**
35  * Class Feature.
36  * 
37  * @version $Revision$ $Date$
38  */
39 public class Feature implements java.io.Serializable {
40
41
42       //--------------------------/
43      //- Class/Member Variables -/
44     //--------------------------/
45
46     /**
47      * Field _begin.
48      */
49     private int _begin;
50
51     /**
52      * keeps track of state for field: _begin
53      */
54     private boolean _has_begin;
55
56     /**
57      * Field _end.
58      */
59     private int _end;
60
61     /**
62      * keeps track of state for field: _end
63      */
64     private boolean _has_end;
65
66     /**
67      * Field _type.
68      */
69     private java.lang.String _type;
70
71     /**
72      * Field _description.
73      */
74     private java.lang.String _description;
75
76     /**
77      * Field _status.
78      */
79     private java.lang.String _status;
80
81
82       //----------------/
83      //- Constructors -/
84     //----------------/
85
86     public Feature() {
87         super();
88     }
89
90
91       //-----------/
92      //- Methods -/
93     //-----------/
94
95     /**
96      */
97     public void deleteBegin(
98     ) {
99         this._has_begin= false;
100     }
101
102     /**
103      */
104     public void deleteEnd(
105     ) {
106         this._has_end= false;
107     }
108
109     /**
110      * Returns the value of field 'begin'.
111      * 
112      * @return the value of field 'Begin'.
113      */
114     public int getBegin(
115     ) {
116         return this._begin;
117     }
118
119     /**
120      * Returns the value of field 'description'.
121      * 
122      * @return the value of field 'Description'.
123      */
124     public java.lang.String getDescription(
125     ) {
126         return this._description;
127     }
128
129     /**
130      * Returns the value of field 'end'.
131      * 
132      * @return the value of field 'End'.
133      */
134     public int getEnd(
135     ) {
136         return this._end;
137     }
138
139     /**
140      * Returns the value of field 'status'.
141      * 
142      * @return the value of field 'Status'.
143      */
144     public java.lang.String getStatus(
145     ) {
146         return this._status;
147     }
148
149     /**
150      * Returns the value of field 'type'.
151      * 
152      * @return the value of field 'Type'.
153      */
154     public java.lang.String getType(
155     ) {
156         return this._type;
157     }
158
159     /**
160      * Method hasBegin.
161      * 
162      * @return true if at least one Begin has been added
163      */
164     public boolean hasBegin(
165     ) {
166         return this._has_begin;
167     }
168
169     /**
170      * Method hasEnd.
171      * 
172      * @return true if at least one End has been added
173      */
174     public boolean hasEnd(
175     ) {
176         return this._has_end;
177     }
178
179     /**
180      * Method isValid.
181      * 
182      * @return true if this object is valid according to the schema
183      */
184     public boolean isValid(
185     ) {
186         try {
187             validate();
188         } catch (org.exolab.castor.xml.ValidationException vex) {
189             return false;
190         }
191         return true;
192     }
193
194     /**
195      * 
196      * 
197      * @param out
198      * @throws org.exolab.castor.xml.MarshalException if object is
199      * null or if any SAXException is thrown during marshaling
200      * @throws org.exolab.castor.xml.ValidationException if this
201      * object is an invalid instance according to the schema
202      */
203     public void marshal(
204             final java.io.Writer out)
205     throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
206         Marshaller.marshal(this, out);
207     }
208
209     /**
210      * 
211      * 
212      * @param handler
213      * @throws java.io.IOException if an IOException occurs during
214      * marshaling
215      * @throws org.exolab.castor.xml.ValidationException if this
216      * object is an invalid instance according to the schema
217      * @throws org.exolab.castor.xml.MarshalException if object is
218      * null or if any SAXException is thrown during marshaling
219      */
220     public void marshal(
221             final org.xml.sax.ContentHandler handler)
222     throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
223         Marshaller.marshal(this, handler);
224     }
225
226     /**
227      * Sets the value of field 'begin'.
228      * 
229      * @param begin the value of field 'begin'.
230      */
231     public void setBegin(
232             final int begin) {
233         this._begin = begin;
234         this._has_begin = true;
235     }
236
237     /**
238      * Sets the value of field 'description'.
239      * 
240      * @param description the value of field 'description'.
241      */
242     public void setDescription(
243             final java.lang.String description) {
244         this._description = description;
245     }
246
247     /**
248      * Sets the value of field 'end'.
249      * 
250      * @param end the value of field 'end'.
251      */
252     public void setEnd(
253             final int end) {
254         this._end = end;
255         this._has_end = true;
256     }
257
258     /**
259      * Sets the value of field 'status'.
260      * 
261      * @param status the value of field 'status'.
262      */
263     public void setStatus(
264             final java.lang.String status) {
265         this._status = status;
266     }
267
268     /**
269      * Sets the value of field 'type'.
270      * 
271      * @param type the value of field 'type'.
272      */
273     public void setType(
274             final java.lang.String type) {
275         this._type = type;
276     }
277
278     /**
279      * Method unmarshal.
280      * 
281      * @param reader
282      * @throws org.exolab.castor.xml.MarshalException if object is
283      * null or if any SAXException is thrown during marshaling
284      * @throws org.exolab.castor.xml.ValidationException if this
285      * object is an invalid instance according to the schema
286      * @return the unmarshaled jalview.binding.Feature
287      */
288     public static jalview.binding.Feature unmarshal(
289             final java.io.Reader reader)
290     throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
291         return (jalview.binding.Feature) Unmarshaller.unmarshal(jalview.binding.Feature.class, reader);
292     }
293
294     /**
295      * 
296      * 
297      * @throws org.exolab.castor.xml.ValidationException if this
298      * object is an invalid instance according to the schema
299      */
300     public void validate(
301     )
302     throws org.exolab.castor.xml.ValidationException {
303         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
304         validator.validate(this);
305     }
306
307 }