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 Alignment implements java.io.Serializable {
36 //--------------------------/
37 //- Class/Member Variables -/
38 //--------------------------/
43 private jalview.binding.Annotation _annotation;
48 private jalview.binding.SequenceSet _sequenceSet;
65 * Returns the value of field 'annotation'.
67 * @return the value of field 'Annotation'.
69 public jalview.binding.Annotation getAnnotation(
71 return this._annotation;
75 * Returns the value of field 'sequenceSet'.
77 * @return the value of field 'SequenceSet'.
79 public jalview.binding.SequenceSet getSequenceSet(
81 return this._sequenceSet;
87 * @return true if this object is valid according to the schema
89 public boolean isValid(
93 } catch (org.exolab.castor.xml.ValidationException vex) {
103 * @throws org.exolab.castor.xml.MarshalException if object is
104 * null or if any SAXException is thrown during marshaling
105 * @throws org.exolab.castor.xml.ValidationException if this
106 * object is an invalid instance according to the schema
109 final java.io.Writer out)
110 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
111 Marshaller.marshal(this, out);
118 * @throws java.io.IOException if an IOException occurs during
120 * @throws org.exolab.castor.xml.ValidationException if this
121 * object is an invalid instance according to the schema
122 * @throws org.exolab.castor.xml.MarshalException if object is
123 * null or if any SAXException is thrown during marshaling
126 final org.xml.sax.ContentHandler handler)
127 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
128 Marshaller.marshal(this, handler);
132 * Sets the value of field 'annotation'.
134 * @param annotation the value of field 'annotation'.
136 public void setAnnotation(
137 final jalview.binding.Annotation annotation) {
138 this._annotation = annotation;
142 * Sets the value of field 'sequenceSet'.
144 * @param sequenceSet the value of field 'sequenceSet'.
146 public void setSequenceSet(
147 final jalview.binding.SequenceSet sequenceSet) {
148 this._sequenceSet = sequenceSet;
155 * @throws org.exolab.castor.xml.MarshalException if object is
156 * null or if any SAXException is thrown during marshaling
157 * @throws org.exolab.castor.xml.ValidationException if this
158 * object is an invalid instance according to the schema
159 * @return the unmarshaled jalview.binding.Alignment
161 public static jalview.binding.Alignment unmarshal(
162 final java.io.Reader reader)
163 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
164 return (jalview.binding.Alignment) Unmarshaller.unmarshal(jalview.binding.Alignment.class, reader);
170 * @throws org.exolab.castor.xml.ValidationException if this
171 * object is an invalid instance according to the schema
173 public void validate(
175 throws org.exolab.castor.xml.ValidationException {
176 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
177 validator.validate(this);