2 * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
3 * Copyright (C) $$Year-Rel$$ 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.binding;
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 _sequence;
55 private java.lang.String _name;
71 * Returns the value of field 'id'.
73 * @return the value of field 'Id'.
75 public java.lang.String getId()
81 * Returns the value of field 'name'.
83 * @return the value of field 'Name'.
85 public java.lang.String getName()
91 * Returns the value of field 'sequence'.
93 * @return the value of field 'Sequence'.
95 public java.lang.String getSequence()
97 return this._sequence;
103 * @return true if this object is valid according to the schema
105 public boolean isValid()
110 } catch (org.exolab.castor.xml.ValidationException vex)
121 * @throws org.exolab.castor.xml.MarshalException
122 * if object is null or if any SAXException is thrown during
124 * @throws org.exolab.castor.xml.ValidationException
125 * if this object is an invalid instance according to the schema
127 public void marshal(final java.io.Writer out)
128 throws org.exolab.castor.xml.MarshalException,
129 org.exolab.castor.xml.ValidationException
131 Marshaller.marshal(this, out);
138 * @throws java.io.IOException
139 * if an IOException occurs during marshaling
140 * @throws org.exolab.castor.xml.ValidationException
141 * if this object is an invalid instance according to the schema
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 schema
196 * @return the unmarshaled jalview.binding.SequenceType
198 public static jalview.binding.SequenceType unmarshal(
199 final java.io.Reader reader)
200 throws org.exolab.castor.xml.MarshalException,
201 org.exolab.castor.xml.ValidationException
203 return (jalview.binding.SequenceType) Unmarshaller.unmarshal(
204 jalview.binding.SequenceType.class, reader);
210 * @throws org.exolab.castor.xml.ValidationException
211 * if this object is an invalid instance according to the schema
213 public void validate() throws org.exolab.castor.xml.ValidationException
215 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
216 validator.validate(this);