2 * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1)
3 * Copyright (C) 2009 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
34 implements java.io.Serializable
54 * @return true if this object is valid according to the schema
56 public boolean isValid(
60 } catch (org.exolab.castor.xml.ValidationException vex) {
70 * @throws org.exolab.castor.xml.MarshalException if object is
71 * null or if any SAXException is thrown during marshaling
72 * @throws org.exolab.castor.xml.ValidationException if this
73 * object is an invalid instance according to the schema
76 final java.io.Writer out)
77 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
78 Marshaller.marshal(this, out);
85 * @throws java.io.IOException if an IOException occurs during
87 * @throws org.exolab.castor.xml.ValidationException if this
88 * object is an invalid instance according to the schema
89 * @throws org.exolab.castor.xml.MarshalException if object is
90 * null or if any SAXException is thrown during marshaling
93 final org.xml.sax.ContentHandler handler)
94 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
95 Marshaller.marshal(this, handler);
102 * @throws org.exolab.castor.xml.MarshalException if object is
103 * null or if any SAXException is thrown during marshaling
104 * @throws org.exolab.castor.xml.ValidationException if this
105 * object is an invalid instance according to the schema
106 * @return the unmarshaled jalview.binding.SequenceType
108 public static jalview.binding.SequenceType unmarshal(
109 final java.io.Reader reader)
110 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
111 return (jalview.binding.SequenceType) Unmarshaller.unmarshal(jalview.binding.Sequence.class, reader);
117 * @throws org.exolab.castor.xml.ValidationException if this
118 * object is an invalid instance according to the schema
120 public void validate(
122 throws org.exolab.castor.xml.ValidationException {
123 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
124 validator.validate(this);