2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
3 * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
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/>.
18 package jalview.binding;
20 //---------------------------------/
21 //- Imported classes and packages -/
22 //---------------------------------/
24 import org.exolab.castor.xml.Marshaller;
25 import org.exolab.castor.xml.Unmarshaller;
30 * @version $Revision$ $Date$
32 public class Alignment implements java.io.Serializable
35 // --------------------------/
36 // - Class/Member Variables -/
37 // --------------------------/
42 private jalview.binding.Annotation _annotation;
47 private jalview.binding.SequenceSet _sequenceSet;
63 * Returns the value of field 'annotation'.
65 * @return the value of field 'Annotation'.
67 public jalview.binding.Annotation getAnnotation()
69 return this._annotation;
73 * Returns the value of field 'sequenceSet'.
75 * @return the value of field 'SequenceSet'.
77 public jalview.binding.SequenceSet getSequenceSet()
79 return this._sequenceSet;
85 * @return true if this object is valid according to the schema
87 public boolean isValid()
92 } catch (org.exolab.castor.xml.ValidationException vex)
103 * @throws org.exolab.castor.xml.MarshalException
104 * if object is null or if any SAXException is thrown during
106 * @throws org.exolab.castor.xml.ValidationException
107 * if this object is an invalid instance according to the schema
109 public void marshal(final java.io.Writer out)
110 throws org.exolab.castor.xml.MarshalException,
111 org.exolab.castor.xml.ValidationException
113 Marshaller.marshal(this, out);
120 * @throws java.io.IOException
121 * if an IOException occurs during marshaling
122 * @throws org.exolab.castor.xml.ValidationException
123 * if this object is an invalid instance according to the schema
124 * @throws org.exolab.castor.xml.MarshalException
125 * if object is null or if any SAXException is thrown during
128 public void marshal(final org.xml.sax.ContentHandler handler)
129 throws java.io.IOException,
130 org.exolab.castor.xml.MarshalException,
131 org.exolab.castor.xml.ValidationException
133 Marshaller.marshal(this, handler);
137 * Sets the value of field 'annotation'.
140 * the value of field 'annotation'.
142 public void setAnnotation(final jalview.binding.Annotation annotation)
144 this._annotation = annotation;
148 * Sets the value of field 'sequenceSet'.
151 * the value of field 'sequenceSet'.
153 public void setSequenceSet(final jalview.binding.SequenceSet sequenceSet)
155 this._sequenceSet = sequenceSet;
162 * @throws org.exolab.castor.xml.MarshalException
163 * if object is null or if any SAXException is thrown during
165 * @throws org.exolab.castor.xml.ValidationException
166 * if this object is an invalid instance according to the schema
167 * @return the unmarshaled jalview.binding.Alignment
169 public static jalview.binding.Alignment unmarshal(
170 final java.io.Reader reader)
171 throws org.exolab.castor.xml.MarshalException,
172 org.exolab.castor.xml.ValidationException
174 return (jalview.binding.Alignment) Unmarshaller.unmarshal(
175 jalview.binding.Alignment.class, reader);
181 * @throws org.exolab.castor.xml.ValidationException
182 * if this object is an invalid instance according to the schema
184 public void validate() throws org.exolab.castor.xml.ValidationException
186 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
187 validator.validate(this);