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 Alignment implements java.io.Serializable
38 // --------------------------/
39 // - Class/Member Variables -/
40 // --------------------------/
45 private jalview.binding.Annotation _annotation;
50 private jalview.binding.SequenceSet _sequenceSet;
66 * Returns the value of field 'annotation'.
68 * @return the value of field 'Annotation'.
70 public jalview.binding.Annotation getAnnotation()
72 return this._annotation;
76 * Returns the value of field 'sequenceSet'.
78 * @return the value of field 'SequenceSet'.
80 public jalview.binding.SequenceSet getSequenceSet()
82 return this._sequenceSet;
88 * @return true if this object is valid according to the schema
90 public boolean isValid()
95 } catch (org.exolab.castor.xml.ValidationException vex)
106 * @throws org.exolab.castor.xml.MarshalException
107 * if object is null or if any SAXException is thrown during
109 * @throws org.exolab.castor.xml.ValidationException
110 * if this object is an invalid instance according to the schema
112 public void marshal(final java.io.Writer out)
113 throws org.exolab.castor.xml.MarshalException,
114 org.exolab.castor.xml.ValidationException
116 Marshaller.marshal(this, out);
123 * @throws java.io.IOException
124 * if an IOException occurs during marshaling
125 * @throws org.exolab.castor.xml.ValidationException
126 * if this object is an invalid instance according to the schema
127 * @throws org.exolab.castor.xml.MarshalException
128 * if object is null or if any SAXException is thrown during
131 public void marshal(final org.xml.sax.ContentHandler handler)
132 throws java.io.IOException,
133 org.exolab.castor.xml.MarshalException,
134 org.exolab.castor.xml.ValidationException
136 Marshaller.marshal(this, handler);
140 * Sets the value of field 'annotation'.
143 * the value of field 'annotation'.
145 public void setAnnotation(final jalview.binding.Annotation annotation)
147 this._annotation = annotation;
151 * Sets the value of field 'sequenceSet'.
154 * the value of field 'sequenceSet'.
156 public void setSequenceSet(final jalview.binding.SequenceSet sequenceSet)
158 this._sequenceSet = sequenceSet;
165 * @throws org.exolab.castor.xml.MarshalException
166 * if object is null or if any SAXException is thrown during
168 * @throws org.exolab.castor.xml.ValidationException
169 * if this object is an invalid instance according to the schema
170 * @return the unmarshaled jalview.binding.Alignment
172 public static jalview.binding.Alignment unmarshal(
173 final java.io.Reader reader)
174 throws org.exolab.castor.xml.MarshalException,
175 org.exolab.castor.xml.ValidationException
177 return (jalview.binding.Alignment) Unmarshaller.unmarshal(
178 jalview.binding.Alignment.class, reader);
184 * @throws org.exolab.castor.xml.ValidationException
185 * if this object is an invalid instance according to the schema
187 public void validate() throws org.exolab.castor.xml.ValidationException
189 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
190 validator.validate(this);