2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
3 * Copyright (C) 2014 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 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/>.
17 * The Jalview Authors are detailed in the 'AUTHORS' file.
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 schema
140 public void marshal(final java.io.Writer out)
141 throws org.exolab.castor.xml.MarshalException,
142 org.exolab.castor.xml.ValidationException
144 Marshaller.marshal(this, out);
151 * @throws java.io.IOException
152 * if an IOException occurs during marshaling
153 * @throws org.exolab.castor.xml.ValidationException
154 * if this object is an invalid instance according to the schema
155 * @throws org.exolab.castor.xml.MarshalException
156 * if object is null or if any SAXException is thrown during
159 public void marshal(final org.xml.sax.ContentHandler handler)
160 throws java.io.IOException,
161 org.exolab.castor.xml.MarshalException,
162 org.exolab.castor.xml.ValidationException
164 Marshaller.marshal(this, handler);
168 * Sets the value of field 'creationDate'.
170 * @param creationDate
171 * the value of field 'creationDate'.
173 public void setCreationDate(final java.util.Date creationDate)
175 this._creationDate = creationDate;
179 * Sets the value of field 'jalviewModelSequence'.
181 * @param jalviewModelSequence
182 * the value of field 'jalviewModelSequence'.
184 public void setJalviewModelSequence(
185 final jalview.binding.JalviewModelSequence jalviewModelSequence)
187 this._jalviewModelSequence = jalviewModelSequence;
191 * Sets the value of field 'vamsasModel'.
194 * the value of field 'vamsasModel'.
196 public void setVamsasModel(final jalview.binding.VamsasModel vamsasModel)
198 this._vamsasModel = vamsasModel;
202 * Sets the value of field 'version'.
205 * the value of field 'version'.
207 public void setVersion(final java.lang.String version)
209 this._version = version;
216 * @throws org.exolab.castor.xml.MarshalException
217 * if object is null or if any SAXException is thrown during
219 * @throws org.exolab.castor.xml.ValidationException
220 * if this object is an invalid instance according to the schema
221 * @return the unmarshaled jalview.binding.JalviewModel
223 public static jalview.binding.JalviewModel unmarshal(
224 final java.io.Reader reader)
225 throws org.exolab.castor.xml.MarshalException,
226 org.exolab.castor.xml.ValidationException
228 return (jalview.binding.JalviewModel) Unmarshaller.unmarshal(
229 jalview.binding.JalviewModel.class, reader);
235 * @throws org.exolab.castor.xml.ValidationException
236 * if this object is an invalid instance according to the schema
238 public void validate() throws org.exolab.castor.xml.ValidationException
240 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
241 validator.validate(this);