1 /*******************************************************************************
2 * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
3 * Copyright (C) $(date) The Jalview Authors
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
10 * of the License, or (at your option) any later version.
12 * Jalview is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty
14 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with Jalview. If not, see <http://www.gnu.org/licenses/>.
19 * The Jalview Authors are detailed in the 'AUTHORS' file.
20 *******************************************************************************/
22 * This class was automatically generated with
23 * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
28 package jalview.binding;
30 //---------------------------------/
31 //- Imported classes and packages -/
32 //---------------------------------/
34 import org.exolab.castor.xml.Marshaller;
35 import org.exolab.castor.xml.Unmarshaller;
40 * @version $Revision$ $Date$
42 public class Feature implements java.io.Serializable
45 // --------------------------/
46 // - Class/Member Variables -/
47 // --------------------------/
55 * keeps track of state for field: _begin
57 private boolean _has_begin;
65 * keeps track of state for field: _end
67 private boolean _has_end;
72 private java.lang.String _type;
77 private java.lang.String _description;
82 private java.lang.String _status;
99 public void deleteBegin()
101 this._has_begin = false;
106 public void deleteEnd()
108 this._has_end = false;
112 * Returns the value of field 'begin'.
114 * @return the value of field 'Begin'.
116 public int getBegin()
122 * Returns the value of field 'description'.
124 * @return the value of field 'Description'.
126 public java.lang.String getDescription()
128 return this._description;
132 * Returns the value of field 'end'.
134 * @return the value of field 'End'.
142 * Returns the value of field 'status'.
144 * @return the value of field 'Status'.
146 public java.lang.String getStatus()
152 * Returns the value of field 'type'.
154 * @return the value of field 'Type'.
156 public java.lang.String getType()
164 * @return true if at least one Begin has been added
166 public boolean hasBegin()
168 return this._has_begin;
174 * @return true if at least one End has been added
176 public boolean hasEnd()
178 return this._has_end;
184 * @return true if this object is valid according to the schema
186 public boolean isValid()
191 } catch (org.exolab.castor.xml.ValidationException vex)
202 * @throws org.exolab.castor.xml.MarshalException
203 * if object is null or if any SAXException is thrown during
205 * @throws org.exolab.castor.xml.ValidationException
206 * if this object is an invalid instance according to the schema
208 public void marshal(final java.io.Writer out)
209 throws org.exolab.castor.xml.MarshalException,
210 org.exolab.castor.xml.ValidationException
212 Marshaller.marshal(this, out);
219 * @throws java.io.IOException
220 * if an IOException occurs during marshaling
221 * @throws org.exolab.castor.xml.ValidationException
222 * if this object is an invalid instance according to the schema
223 * @throws org.exolab.castor.xml.MarshalException
224 * if object is null or if any SAXException is thrown during
227 public void marshal(final org.xml.sax.ContentHandler handler)
228 throws java.io.IOException,
229 org.exolab.castor.xml.MarshalException,
230 org.exolab.castor.xml.ValidationException
232 Marshaller.marshal(this, handler);
236 * Sets the value of field 'begin'.
239 * the value of field 'begin'.
241 public void setBegin(final int begin)
244 this._has_begin = true;
248 * Sets the value of field 'description'.
251 * the value of field 'description'.
253 public void setDescription(final java.lang.String description)
255 this._description = description;
259 * Sets the value of field 'end'.
262 * the value of field 'end'.
264 public void setEnd(final int end)
267 this._has_end = true;
271 * Sets the value of field 'status'.
274 * the value of field 'status'.
276 public void setStatus(final java.lang.String status)
278 this._status = status;
282 * Sets the value of field 'type'.
285 * the value of field 'type'.
287 public void setType(final java.lang.String type)
296 * @throws org.exolab.castor.xml.MarshalException
297 * if object is null or if any SAXException is thrown during
299 * @throws org.exolab.castor.xml.ValidationException
300 * if this object is an invalid instance according to the schema
301 * @return the unmarshaled jalview.binding.Feature
303 public static jalview.binding.Feature unmarshal(
304 final java.io.Reader reader)
305 throws org.exolab.castor.xml.MarshalException,
306 org.exolab.castor.xml.ValidationException
308 return (jalview.binding.Feature) Unmarshaller
309 .unmarshal(jalview.binding.Feature.class, reader);
315 * @throws org.exolab.castor.xml.ValidationException
316 * if this object is an invalid instance according to the schema
318 public void validate() throws org.exolab.castor.xml.ValidationException
320 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
321 validator.validate(this);