2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.1)
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.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 schema
125 public void marshal(final java.io.Writer out)
126 throws org.exolab.castor.xml.MarshalException,
127 org.exolab.castor.xml.ValidationException
129 Marshaller.marshal(this, out);
136 * @throws java.io.IOException
137 * if an IOException occurs during marshaling
138 * @throws org.exolab.castor.xml.ValidationException
139 * if this object is an invalid instance according to the schema
140 * @throws org.exolab.castor.xml.MarshalException
141 * if object is null or if any SAXException is thrown during
144 public void marshal(final org.xml.sax.ContentHandler handler)
145 throws java.io.IOException,
146 org.exolab.castor.xml.MarshalException,
147 org.exolab.castor.xml.ValidationException
149 Marshaller.marshal(this, handler);
153 * Sets the value of field 'id'.
156 * the value of field 'id'.
158 public void setId(final java.lang.String id)
164 * Sets the value of field 'name'.
167 * the value of field 'name'.
169 public void setName(final java.lang.String name)
175 * Sets the value of field 'sequence'.
178 * the value of field 'sequence'.
180 public void setSequence(final java.lang.String sequence)
182 this._sequence = sequence;
189 * @throws org.exolab.castor.xml.MarshalException
190 * if object is null or if any SAXException is thrown during
192 * @throws org.exolab.castor.xml.ValidationException
193 * if this object is an invalid instance according to the schema
194 * @return the unmarshaled jalview.binding.SequenceType
196 public static jalview.binding.SequenceType unmarshal(
197 final java.io.Reader reader)
198 throws org.exolab.castor.xml.MarshalException,
199 org.exolab.castor.xml.ValidationException
201 return (jalview.binding.SequenceType) Unmarshaller.unmarshal(
202 jalview.binding.SequenceType.class, reader);
208 * @throws org.exolab.castor.xml.ValidationException
209 * if this object is an invalid instance according to the schema
211 public void validate() throws org.exolab.castor.xml.ValidationException
213 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
214 validator.validate(this);