2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4)
3 * Copyright (C) 2008 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version 2
8 * of the License, or (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
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 Sequence extends SequenceType implements java.io.Serializable
52 * @return true if this object is valid according to the schema
54 public boolean isValid()
59 } catch (org.exolab.castor.xml.ValidationException vex)
70 * @throws org.exolab.castor.xml.MarshalException
71 * if object is null or if any SAXException is thrown during
73 * @throws org.exolab.castor.xml.ValidationException
74 * if this object is an invalid instance according to the
77 public void marshal(final java.io.Writer out)
78 throws org.exolab.castor.xml.MarshalException,
79 org.exolab.castor.xml.ValidationException
81 Marshaller.marshal(this, out);
88 * @throws java.io.IOException
89 * if an IOException occurs during marshaling
90 * @throws org.exolab.castor.xml.ValidationException
91 * if this object is an invalid instance according to the
93 * @throws org.exolab.castor.xml.MarshalException
94 * if object is null or if any SAXException is thrown during
97 public void marshal(final org.xml.sax.ContentHandler handler)
98 throws java.io.IOException,
99 org.exolab.castor.xml.MarshalException,
100 org.exolab.castor.xml.ValidationException
102 Marshaller.marshal(this, handler);
109 * @throws org.exolab.castor.xml.MarshalException
110 * if object is null or if any SAXException is thrown during
112 * @throws org.exolab.castor.xml.ValidationException
113 * if this object is an invalid instance according to the
115 * @return the unmarshaled jalview.binding.SequenceType
117 public static jalview.binding.SequenceType unmarshal(
118 final java.io.Reader reader)
119 throws org.exolab.castor.xml.MarshalException,
120 org.exolab.castor.xml.ValidationException
122 return (jalview.binding.SequenceType) Unmarshaller.unmarshal(
123 jalview.binding.Sequence.class, reader);
129 * @throws org.exolab.castor.xml.ValidationException
130 * if this object is an invalid instance according to the
133 public void validate() throws org.exolab.castor.xml.ValidationException
135 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
136 validator.validate(this);