2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2)
3 * Copyright (C) 2014 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.
21 package jalview.binding;
23 //---------------------------------/
24 //- Imported classes and packages -/
25 //---------------------------------/
27 import org.exolab.castor.xml.Marshaller;
28 import org.exolab.castor.xml.Unmarshaller;
33 * @version $Revision$ $Date$
35 public class Feature implements java.io.Serializable
38 // --------------------------/
39 // - Class/Member Variables -/
40 // --------------------------/
48 * keeps track of state for field: _begin
50 private boolean _has_begin;
58 * keeps track of state for field: _end
60 private boolean _has_end;
65 private java.lang.String _type;
70 private java.lang.String _description;
75 private java.lang.String _status;
92 public void deleteBegin()
94 this._has_begin = false;
99 public void deleteEnd()
101 this._has_end = false;
105 * Returns the value of field 'begin'.
107 * @return the value of field 'Begin'.
109 public int getBegin()
115 * Returns the value of field 'description'.
117 * @return the value of field 'Description'.
119 public java.lang.String getDescription()
121 return this._description;
125 * Returns the value of field 'end'.
127 * @return the value of field 'End'.
135 * Returns the value of field 'status'.
137 * @return the value of field 'Status'.
139 public java.lang.String getStatus()
145 * Returns the value of field 'type'.
147 * @return the value of field 'Type'.
149 public java.lang.String getType()
157 * @return true if at least one Begin has been added
159 public boolean hasBegin()
161 return this._has_begin;
167 * @return true if at least one End has been added
169 public boolean hasEnd()
171 return this._has_end;
177 * @return true if this object is valid according to the schema
179 public boolean isValid()
184 } catch (org.exolab.castor.xml.ValidationException vex)
195 * @throws org.exolab.castor.xml.MarshalException
196 * if object is null or if any SAXException is thrown during
198 * @throws org.exolab.castor.xml.ValidationException
199 * if this object is an invalid instance according to the schema
201 public void marshal(final java.io.Writer out)
202 throws org.exolab.castor.xml.MarshalException,
203 org.exolab.castor.xml.ValidationException
205 Marshaller.marshal(this, out);
212 * @throws java.io.IOException
213 * if an IOException occurs during marshaling
214 * @throws org.exolab.castor.xml.ValidationException
215 * if this object is an invalid instance according to the schema
216 * @throws org.exolab.castor.xml.MarshalException
217 * if object is null or if any SAXException is thrown during
220 public void marshal(final org.xml.sax.ContentHandler handler)
221 throws java.io.IOException,
222 org.exolab.castor.xml.MarshalException,
223 org.exolab.castor.xml.ValidationException
225 Marshaller.marshal(this, handler);
229 * Sets the value of field 'begin'.
232 * the value of field 'begin'.
234 public void setBegin(final int begin)
237 this._has_begin = true;
241 * Sets the value of field 'description'.
244 * the value of field 'description'.
246 public void setDescription(final java.lang.String description)
248 this._description = description;
252 * Sets the value of field 'end'.
255 * the value of field 'end'.
257 public void setEnd(final int end)
260 this._has_end = true;
264 * Sets the value of field 'status'.
267 * the value of field 'status'.
269 public void setStatus(final java.lang.String status)
271 this._status = status;
275 * Sets the value of field 'type'.
278 * the value of field 'type'.
280 public void setType(final java.lang.String type)
289 * @throws org.exolab.castor.xml.MarshalException
290 * if object is null or if any SAXException is thrown during
292 * @throws org.exolab.castor.xml.ValidationException
293 * if this object is an invalid instance according to the schema
294 * @return the unmarshaled jalview.binding.Feature
296 public static jalview.binding.Feature unmarshal(
297 final java.io.Reader reader)
298 throws org.exolab.castor.xml.MarshalException,
299 org.exolab.castor.xml.ValidationException
301 return (jalview.binding.Feature) Unmarshaller.unmarshal(
302 jalview.binding.Feature.class, reader);
308 * @throws org.exolab.castor.xml.ValidationException
309 * if this object is an invalid instance according to the schema
311 public void validate() throws org.exolab.castor.xml.ValidationException
313 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
314 validator.validate(this);