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 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;
65 public JalviewModel() {
75 * Returns the value of field 'creationDate'.
77 * @return the value of field 'CreationDate'.
79 public java.util.Date getCreationDate(
81 return this._creationDate;
85 * Returns the value of field 'jalviewModelSequence'.
87 * @return the value of field 'JalviewModelSequence'.
89 public jalview.binding.JalviewModelSequence getJalviewModelSequence(
91 return this._jalviewModelSequence;
95 * Returns the value of field 'vamsasModel'.
97 * @return the value of field 'VamsasModel'.
99 public jalview.binding.VamsasModel getVamsasModel(
101 return this._vamsasModel;
105 * Returns the value of field 'version'.
107 * @return the value of field 'Version'.
109 public java.lang.String getVersion(
111 return this._version;
117 * @return true if this object is valid according to the schema
119 public boolean isValid(
123 } catch (org.exolab.castor.xml.ValidationException vex) {
133 * @throws org.exolab.castor.xml.MarshalException if object is
134 * null or if any SAXException is thrown during marshaling
135 * @throws org.exolab.castor.xml.ValidationException if this
136 * object is an invalid instance according to the schema
139 final java.io.Writer out)
140 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
141 Marshaller.marshal(this, out);
148 * @throws java.io.IOException if an IOException occurs during
150 * @throws org.exolab.castor.xml.ValidationException if this
151 * object is an invalid instance according to the schema
152 * @throws org.exolab.castor.xml.MarshalException if object is
153 * null or if any SAXException is thrown during marshaling
156 final org.xml.sax.ContentHandler handler)
157 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
158 Marshaller.marshal(this, handler);
162 * Sets the value of field 'creationDate'.
164 * @param creationDate the value of field 'creationDate'.
166 public void setCreationDate(
167 final java.util.Date creationDate) {
168 this._creationDate = creationDate;
172 * Sets the value of field 'jalviewModelSequence'.
174 * @param jalviewModelSequence the value of field
175 * 'jalviewModelSequence'.
177 public void setJalviewModelSequence(
178 final jalview.binding.JalviewModelSequence jalviewModelSequence) {
179 this._jalviewModelSequence = jalviewModelSequence;
183 * Sets the value of field 'vamsasModel'.
185 * @param vamsasModel the value of field 'vamsasModel'.
187 public void setVamsasModel(
188 final jalview.binding.VamsasModel vamsasModel) {
189 this._vamsasModel = vamsasModel;
193 * Sets the value of field 'version'.
195 * @param version the value of field 'version'.
197 public void setVersion(
198 final java.lang.String version) {
199 this._version = version;
206 * @throws org.exolab.castor.xml.MarshalException if object is
207 * null or if any SAXException is thrown during marshaling
208 * @throws org.exolab.castor.xml.ValidationException if this
209 * object is an invalid instance according to the schema
210 * @return the unmarshaled jalview.binding.JalviewModel
212 public static jalview.binding.JalviewModel unmarshal(
213 final java.io.Reader reader)
214 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
215 return (jalview.binding.JalviewModel) Unmarshaller.unmarshal(jalview.binding.JalviewModel.class, reader);
221 * @throws org.exolab.castor.xml.ValidationException if this
222 * object is an invalid instance according to the schema
224 public void validate(
226 throws org.exolab.castor.xml.ValidationException {
227 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
228 validator.validate(this);