1 /*******************************************************************************
2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
3 * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
5 * This file is part of Jalview.
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.
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.
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 *******************************************************************************/
19 * This class was automatically generated with
20 * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
25 package jalview.binding;
27 //---------------------------------/
28 //- Imported classes and packages -/
29 //---------------------------------/
31 import org.exolab.castor.xml.Marshaller;
32 import org.exolab.castor.xml.Unmarshaller;
37 * @version $Revision$ $Date$
39 public class Feature implements java.io.Serializable {
42 //--------------------------/
43 //- Class/Member Variables -/
44 //--------------------------/
52 * keeps track of state for field: _begin
54 private boolean _has_begin;
62 * keeps track of state for field: _end
64 private boolean _has_end;
69 private java.lang.String _type;
74 private java.lang.String _description;
79 private java.lang.String _status;
97 public void deleteBegin(
99 this._has_begin= false;
104 public void deleteEnd(
106 this._has_end= false;
110 * Returns the value of field 'begin'.
112 * @return the value of field 'Begin'.
120 * Returns the value of field 'description'.
122 * @return the value of field 'Description'.
124 public java.lang.String getDescription(
126 return this._description;
130 * Returns the value of field 'end'.
132 * @return the value of field 'End'.
140 * Returns the value of field 'status'.
142 * @return the value of field 'Status'.
144 public java.lang.String getStatus(
150 * Returns the value of field 'type'.
152 * @return the value of field 'Type'.
154 public java.lang.String getType(
162 * @return true if at least one Begin has been added
164 public boolean hasBegin(
166 return this._has_begin;
172 * @return true if at least one End has been added
174 public boolean hasEnd(
176 return this._has_end;
182 * @return true if this object is valid according to the schema
184 public boolean isValid(
188 } catch (org.exolab.castor.xml.ValidationException vex) {
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
204 final java.io.Writer out)
205 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
206 Marshaller.marshal(this, out);
213 * @throws java.io.IOException if an IOException occurs during
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
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);
227 * Sets the value of field 'begin'.
229 * @param begin the value of field 'begin'.
231 public void setBegin(
234 this._has_begin = true;
238 * Sets the value of field 'description'.
240 * @param description the value of field 'description'.
242 public void setDescription(
243 final java.lang.String description) {
244 this._description = description;
248 * Sets the value of field 'end'.
250 * @param end the value of field 'end'.
255 this._has_end = true;
259 * Sets the value of field 'status'.
261 * @param status the value of field 'status'.
263 public void setStatus(
264 final java.lang.String status) {
265 this._status = status;
269 * Sets the value of field 'type'.
271 * @param type the value of field 'type'.
274 final java.lang.String type) {
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
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);
297 * @throws org.exolab.castor.xml.ValidationException if this
298 * object is an invalid instance according to the schema
300 public void validate(
302 throws org.exolab.castor.xml.ValidationException {
303 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
304 validator.validate(this);