2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
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 of the License, or (at your option) any later version.
11 * Jalview is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty
13 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 * PURPOSE. See the GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License along with Jalview. If not, see <http://www.gnu.org/licenses/>.
17 * The Jalview Authors are detailed in the 'AUTHORS' file.
19 package jalview.schemabinding.version2;
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 _description;
53 private java.lang.String _sequence;
58 private java.lang.String _name;
74 * Returns the value of field 'description'.
76 * @return the value of field 'Description'.
78 public java.lang.String getDescription()
80 return this._description;
84 * Returns the value of field 'id'.
86 * @return the value of field 'Id'.
88 public java.lang.String getId()
94 * Returns the value of field 'name'.
96 * @return the value of field 'Name'.
98 public java.lang.String getName()
104 * Returns the value of field 'sequence'.
106 * @return the value of field 'Sequence'.
108 public java.lang.String getSequence()
110 return this._sequence;
116 * @return true if this object is valid according to the schema
118 public boolean isValid()
123 } catch (org.exolab.castor.xml.ValidationException vex)
134 * @throws org.exolab.castor.xml.MarshalException
135 * if object is null or if any SAXException is thrown during
137 * @throws org.exolab.castor.xml.ValidationException
138 * if this object is an invalid instance according to the schema
140 public void marshal(final java.io.Writer out)
141 throws org.exolab.castor.xml.MarshalException,
142 org.exolab.castor.xml.ValidationException
144 Marshaller.marshal(this, out);
151 * @throws java.io.IOException
152 * if an IOException occurs during marshaling
153 * @throws org.exolab.castor.xml.ValidationException
154 * if this object is an invalid instance according to the schema
155 * @throws org.exolab.castor.xml.MarshalException
156 * if object is null or if any SAXException is thrown during
159 public void marshal(final org.xml.sax.ContentHandler handler)
160 throws java.io.IOException,
161 org.exolab.castor.xml.MarshalException,
162 org.exolab.castor.xml.ValidationException
164 Marshaller.marshal(this, handler);
168 * Sets the value of field 'description'.
171 * the value of field 'description'.
173 public void setDescription(final java.lang.String description)
175 this._description = description;
179 * Sets the value of field 'id'.
182 * the value of field 'id'.
184 public void setId(final java.lang.String id)
190 * Sets the value of field 'name'.
193 * the value of field 'name'.
195 public void setName(final java.lang.String name)
201 * Sets the value of field 'sequence'.
204 * the value of field 'sequence'.
206 public void setSequence(final java.lang.String sequence)
208 this._sequence = sequence;
215 * @throws org.exolab.castor.xml.MarshalException
216 * if object is null or if any SAXException is thrown during
218 * @throws org.exolab.castor.xml.ValidationException
219 * if this object is an invalid instance according to the schema
220 * @return the unmarshaled jalview.schemabinding.version2.SequenceType
222 public static jalview.schemabinding.version2.SequenceType unmarshal(
223 final java.io.Reader reader)
224 throws org.exolab.castor.xml.MarshalException,
225 org.exolab.castor.xml.ValidationException
227 return (jalview.schemabinding.version2.SequenceType) Unmarshaller
228 .unmarshal(jalview.schemabinding.version2.SequenceType.class,
235 * @throws org.exolab.castor.xml.ValidationException
236 * if this object is an invalid instance according to the schema
238 public void validate() throws org.exolab.castor.xml.ValidationException
240 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
241 validator.validate(this);