2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4)
3 * Copyright (C) 2008 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;
69 * Returns the value of field 'id'.
71 * @return the value of field 'Id'.
73 public java.lang.String getId()
79 * Returns the value of field 'name'.
81 * @return the value of field 'Name'.
83 public java.lang.String getName()
89 * Returns the value of field 'sequence'.
91 * @return the value of field 'Sequence'.
93 public java.lang.String getSequence()
95 return this._sequence;
101 * @return true if this object is valid according to the schema
103 public boolean isValid()
108 } catch (org.exolab.castor.xml.ValidationException vex)
119 * @throws org.exolab.castor.xml.MarshalException
120 * if object is null or if any SAXException is thrown during
122 * @throws org.exolab.castor.xml.ValidationException
123 * if this object is an invalid instance according to the
126 public void marshal(final java.io.Writer out)
127 throws org.exolab.castor.xml.MarshalException,
128 org.exolab.castor.xml.ValidationException
130 Marshaller.marshal(this, out);
137 * @throws java.io.IOException
138 * if an IOException occurs during marshaling
139 * @throws org.exolab.castor.xml.ValidationException
140 * if this object is an invalid instance according to the
142 * @throws org.exolab.castor.xml.MarshalException
143 * if object is null or if any SAXException is thrown during
146 public void marshal(final org.xml.sax.ContentHandler handler)
147 throws java.io.IOException,
148 org.exolab.castor.xml.MarshalException,
149 org.exolab.castor.xml.ValidationException
151 Marshaller.marshal(this, handler);
155 * Sets the value of field 'id'.
158 * the value of field 'id'.
160 public void setId(final java.lang.String id)
166 * Sets the value of field 'name'.
169 * the value of field 'name'.
171 public void setName(final java.lang.String name)
177 * Sets the value of field 'sequence'.
180 * the value of field 'sequence'.
182 public void setSequence(final java.lang.String sequence)
184 this._sequence = sequence;
191 * @throws org.exolab.castor.xml.MarshalException
192 * if object is null or if any SAXException is thrown during
194 * @throws org.exolab.castor.xml.ValidationException
195 * if this object is an invalid instance according to the
197 * @return the unmarshaled jalview.binding.SequenceType
199 public static jalview.binding.SequenceType unmarshal(
200 final java.io.Reader reader)
201 throws org.exolab.castor.xml.MarshalException,
202 org.exolab.castor.xml.ValidationException
204 return (jalview.binding.SequenceType) Unmarshaller.unmarshal(
205 jalview.binding.SequenceType.class, reader);
211 * @throws org.exolab.castor.xml.ValidationException
212 * if this object is an invalid instance according to the
215 public void validate() throws org.exolab.castor.xml.ValidationException
217 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
218 validator.validate(this);