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 JalviewModel implements java.io.Serializable
36 // --------------------------/
37 // - Class/Member Variables -/
38 // --------------------------/
41 * Field _creationDate.
43 private java.util.Date _creationDate;
48 private java.lang.String _version;
53 private jalview.binding.VamsasModel _vamsasModel;
56 * Field _jalviewModelSequence.
58 private jalview.binding.JalviewModelSequence _jalviewModelSequence;
74 * Returns the value of field 'creationDate'.
76 * @return the value of field 'CreationDate'.
78 public java.util.Date getCreationDate()
80 return this._creationDate;
84 * Returns the value of field 'jalviewModelSequence'.
86 * @return the value of field 'JalviewModelSequence'.
88 public jalview.binding.JalviewModelSequence getJalviewModelSequence()
90 return this._jalviewModelSequence;
94 * Returns the value of field 'vamsasModel'.
96 * @return the value of field 'VamsasModel'.
98 public jalview.binding.VamsasModel getVamsasModel()
100 return this._vamsasModel;
104 * Returns the value of field 'version'.
106 * @return the value of field 'Version'.
108 public java.lang.String getVersion()
110 return this._version;
116 * @return true if this object is valid according to the schema
118 public boolean isValid()
123 } catch (org.exolab.castor.xml.ValidationException vex)
134 * @throws org.exolab.castor.xml.MarshalException
135 * if object is null or if any SAXException is thrown during
137 * @throws org.exolab.castor.xml.ValidationException
138 * if this object is an invalid instance according to the
141 public void marshal(final java.io.Writer out)
142 throws org.exolab.castor.xml.MarshalException,
143 org.exolab.castor.xml.ValidationException
145 Marshaller.marshal(this, out);
152 * @throws java.io.IOException
153 * if an IOException occurs during marshaling
154 * @throws org.exolab.castor.xml.ValidationException
155 * if this object is an invalid instance according to the
157 * @throws org.exolab.castor.xml.MarshalException
158 * if object is null or if any SAXException is thrown during
161 public void marshal(final org.xml.sax.ContentHandler handler)
162 throws java.io.IOException,
163 org.exolab.castor.xml.MarshalException,
164 org.exolab.castor.xml.ValidationException
166 Marshaller.marshal(this, handler);
170 * Sets the value of field 'creationDate'.
172 * @param creationDate
173 * the value of field 'creationDate'.
175 public void setCreationDate(final java.util.Date creationDate)
177 this._creationDate = creationDate;
181 * Sets the value of field 'jalviewModelSequence'.
183 * @param jalviewModelSequence
184 * the value of field 'jalviewModelSequence'.
186 public void setJalviewModelSequence(
187 final jalview.binding.JalviewModelSequence jalviewModelSequence)
189 this._jalviewModelSequence = jalviewModelSequence;
193 * Sets the value of field 'vamsasModel'.
196 * the value of field 'vamsasModel'.
198 public void setVamsasModel(final jalview.binding.VamsasModel vamsasModel)
200 this._vamsasModel = vamsasModel;
204 * Sets the value of field 'version'.
207 * the value of field 'version'.
209 public void setVersion(final java.lang.String version)
211 this._version = version;
218 * @throws org.exolab.castor.xml.MarshalException
219 * if object is null or if any SAXException is thrown during
221 * @throws org.exolab.castor.xml.ValidationException
222 * if this object is an invalid instance according to the
224 * @return the unmarshaled jalview.binding.JalviewModel
226 public static jalview.binding.JalviewModel unmarshal(
227 final java.io.Reader reader)
228 throws org.exolab.castor.xml.MarshalException,
229 org.exolab.castor.xml.ValidationException
231 return (jalview.binding.JalviewModel) Unmarshaller.unmarshal(
232 jalview.binding.JalviewModel.class, reader);
238 * @throws org.exolab.castor.xml.ValidationException
239 * if this object is an invalid instance according to the
242 public void validate() throws org.exolab.castor.xml.ValidationException
244 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
245 validator.validate(this);