2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8)
3 * Copyright (C) 2012 J Procter, AM Waterhouse, LM Lui, J Engelhardt, G Barton, M Clamp, S Searle
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/>.
18 package jalview.binding;
20 //---------------------------------/
21 //- Imported classes and packages -/
22 //---------------------------------/
24 import org.exolab.castor.xml.Marshaller;
25 import org.exolab.castor.xml.Unmarshaller;
30 * @version $Revision$ $Date$
32 public class SequenceType implements java.io.Serializable
35 // --------------------------/
36 // - Class/Member Variables -/
37 // --------------------------/
42 private java.lang.String _id;
47 private java.lang.String _sequence;
52 private java.lang.String _name;
68 * Returns the value of field 'id'.
70 * @return the value of field 'Id'.
72 public java.lang.String getId()
78 * Returns the value of field 'name'.
80 * @return the value of field 'Name'.
82 public java.lang.String getName()
88 * Returns the value of field 'sequence'.
90 * @return the value of field 'Sequence'.
92 public java.lang.String getSequence()
94 return this._sequence;
100 * @return true if this object is valid according to the schema
102 public boolean isValid()
107 } catch (org.exolab.castor.xml.ValidationException vex)
118 * @throws org.exolab.castor.xml.MarshalException
119 * if object is null or if any SAXException is thrown during
121 * @throws org.exolab.castor.xml.ValidationException
122 * if this object is an invalid instance according to the schema
124 public void marshal(final java.io.Writer out)
125 throws org.exolab.castor.xml.MarshalException,
126 org.exolab.castor.xml.ValidationException
128 Marshaller.marshal(this, out);
135 * @throws java.io.IOException
136 * if an IOException occurs during marshaling
137 * @throws org.exolab.castor.xml.ValidationException
138 * if this object is an invalid instance according to the schema
139 * @throws org.exolab.castor.xml.MarshalException
140 * if object is null or if any SAXException is thrown during
143 public void marshal(final org.xml.sax.ContentHandler handler)
144 throws java.io.IOException,
145 org.exolab.castor.xml.MarshalException,
146 org.exolab.castor.xml.ValidationException
148 Marshaller.marshal(this, handler);
152 * Sets the value of field 'id'.
155 * the value of field 'id'.
157 public void setId(final java.lang.String id)
163 * Sets the value of field 'name'.
166 * the value of field 'name'.
168 public void setName(final java.lang.String name)
174 * Sets the value of field 'sequence'.
177 * the value of field 'sequence'.
179 public void setSequence(final java.lang.String sequence)
181 this._sequence = sequence;
188 * @throws org.exolab.castor.xml.MarshalException
189 * if object is null or if any SAXException is thrown during
191 * @throws org.exolab.castor.xml.ValidationException
192 * if this object is an invalid instance according to the schema
193 * @return the unmarshaled jalview.binding.SequenceType
195 public static jalview.binding.SequenceType unmarshal(
196 final java.io.Reader reader)
197 throws org.exolab.castor.xml.MarshalException,
198 org.exolab.castor.xml.ValidationException
200 return (jalview.binding.SequenceType) Unmarshaller.unmarshal(
201 jalview.binding.SequenceType.class, reader);
207 * @throws org.exolab.castor.xml.ValidationException
208 * if this object is an invalid instance according to the schema
210 public void validate() throws org.exolab.castor.xml.ValidationException
212 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
213 validator.validate(this);