2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2b1)
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.schemabinding.version2;
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 SequenceType implements java.io.Serializable
38 // --------------------------/
39 // - Class/Member Variables -/
40 // --------------------------/
45 private java.lang.String _id;
50 private java.lang.String _description;
55 private java.lang.String _sequence;
60 private java.lang.String _name;
76 * Returns the value of field 'description'.
78 * @return the value of field 'Description'.
80 public java.lang.String getDescription()
82 return this._description;
86 * Returns the value of field 'id'.
88 * @return the value of field 'Id'.
90 public java.lang.String getId()
96 * Returns the value of field 'name'.
98 * @return the value of field 'Name'.
100 public java.lang.String getName()
106 * Returns the value of field 'sequence'.
108 * @return the value of field 'Sequence'.
110 public java.lang.String getSequence()
112 return this._sequence;
118 * @return true if this object is valid according to the schema
120 public boolean isValid()
125 } catch (org.exolab.castor.xml.ValidationException vex)
136 * @throws org.exolab.castor.xml.MarshalException
137 * if object is null or if any SAXException is thrown during
139 * @throws org.exolab.castor.xml.ValidationException
140 * if this object is an invalid instance according to the schema
142 public void marshal(final java.io.Writer out)
143 throws org.exolab.castor.xml.MarshalException,
144 org.exolab.castor.xml.ValidationException
146 Marshaller.marshal(this, out);
153 * @throws java.io.IOException
154 * if an IOException occurs during marshaling
155 * @throws org.exolab.castor.xml.ValidationException
156 * if this object is an invalid instance according to the schema
157 * @throws org.exolab.castor.xml.MarshalException
158 * if object is null or if any SAXException is thrown during
161 public void marshal(final org.xml.sax.ContentHandler handler)
162 throws java.io.IOException,
163 org.exolab.castor.xml.MarshalException,
164 org.exolab.castor.xml.ValidationException
166 Marshaller.marshal(this, handler);
170 * Sets the value of field 'description'.
173 * the value of field 'description'.
175 public void setDescription(final java.lang.String description)
177 this._description = description;
181 * Sets the value of field 'id'.
184 * the value of field 'id'.
186 public void setId(final java.lang.String id)
192 * Sets the value of field 'name'.
195 * the value of field 'name'.
197 public void setName(final java.lang.String name)
203 * Sets the value of field 'sequence'.
206 * the value of field 'sequence'.
208 public void setSequence(final java.lang.String sequence)
210 this._sequence = sequence;
217 * @throws org.exolab.castor.xml.MarshalException
218 * if object is null or if any SAXException is thrown during
220 * @throws org.exolab.castor.xml.ValidationException
221 * if this object is an invalid instance according to the schema
222 * @return the unmarshaled jalview.schemabinding.version2.SequenceType
224 public static jalview.schemabinding.version2.SequenceType unmarshal(
225 final java.io.Reader reader)
226 throws org.exolab.castor.xml.MarshalException,
227 org.exolab.castor.xml.ValidationException
229 return (jalview.schemabinding.version2.SequenceType) Unmarshaller
230 .unmarshal(jalview.schemabinding.version2.SequenceType.class,
237 * @throws org.exolab.castor.xml.ValidationException
238 * if this object is an invalid instance according to the schema
240 public void validate() throws org.exolab.castor.xml.ValidationException
242 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
243 validator.validate(this);