2 * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1)
3 * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version 2
8 * of the License, or (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
19 package jalview.binding;
21 //---------------------------------/
22 //- Imported classes and packages -/
23 //---------------------------------/
25 import org.exolab.castor.xml.Marshaller;
26 import org.exolab.castor.xml.Unmarshaller;
31 * @version $Revision$ $Date$
33 public class SequenceType implements java.io.Serializable {
36 //--------------------------/
37 //- Class/Member Variables -/
38 //--------------------------/
43 private java.lang.String _id;
48 private java.lang.String _sequence;
53 private java.lang.String _name;
60 public SequenceType() {
70 * Returns the value of field 'id'.
72 * @return the value of field 'Id'.
74 public java.lang.String getId(
80 * Returns the value of field 'name'.
82 * @return the value of field 'Name'.
84 public java.lang.String getName(
90 * Returns the value of field 'sequence'.
92 * @return the value of field 'Sequence'.
94 public java.lang.String getSequence(
96 return this._sequence;
102 * @return true if this object is valid according to the schema
104 public boolean isValid(
108 } catch (org.exolab.castor.xml.ValidationException vex) {
118 * @throws org.exolab.castor.xml.MarshalException if object is
119 * null or if any SAXException is thrown during marshaling
120 * @throws org.exolab.castor.xml.ValidationException if this
121 * object is an invalid instance according to the schema
124 final java.io.Writer out)
125 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
126 Marshaller.marshal(this, out);
133 * @throws java.io.IOException if an IOException occurs during
135 * @throws org.exolab.castor.xml.ValidationException if this
136 * object is an invalid instance according to the schema
137 * @throws org.exolab.castor.xml.MarshalException if object is
138 * null or if any SAXException is thrown during marshaling
141 final org.xml.sax.ContentHandler handler)
142 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
143 Marshaller.marshal(this, handler);
147 * Sets the value of field 'id'.
149 * @param id the value of field 'id'.
152 final java.lang.String id) {
157 * Sets the value of field 'name'.
159 * @param name the value of field 'name'.
162 final java.lang.String name) {
167 * Sets the value of field 'sequence'.
169 * @param sequence the value of field 'sequence'.
171 public void setSequence(
172 final java.lang.String sequence) {
173 this._sequence = sequence;
180 * @throws org.exolab.castor.xml.MarshalException if object is
181 * null or if any SAXException is thrown during marshaling
182 * @throws org.exolab.castor.xml.ValidationException if this
183 * object is an invalid instance according to the schema
184 * @return the unmarshaled jalview.binding.SequenceType
186 public static jalview.binding.SequenceType unmarshal(
187 final java.io.Reader reader)
188 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
189 return (jalview.binding.SequenceType) Unmarshaller.unmarshal(jalview.binding.SequenceType.class, reader);
195 * @throws org.exolab.castor.xml.ValidationException if this
196 * object is an invalid instance according to the schema
198 public void validate(
200 throws org.exolab.castor.xml.ValidationException {
201 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
202 validator.validate(this);