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 JalviewModel implements java.io.Serializable
38 // --------------------------/
39 // - Class/Member Variables -/
40 // --------------------------/
43 * Field _creationDate.
45 private java.util.Date _creationDate;
50 private java.lang.String _version;
55 private jalview.binding.VamsasModel _vamsasModel;
58 * Field _jalviewModelSequence.
60 private jalview.binding.JalviewModelSequence _jalviewModelSequence;
76 * Returns the value of field 'creationDate'.
78 * @return the value of field 'CreationDate'.
80 public java.util.Date getCreationDate()
82 return this._creationDate;
86 * Returns the value of field 'jalviewModelSequence'.
88 * @return the value of field 'JalviewModelSequence'.
90 public jalview.binding.JalviewModelSequence getJalviewModelSequence()
92 return this._jalviewModelSequence;
96 * Returns the value of field 'vamsasModel'.
98 * @return the value of field 'VamsasModel'.
100 public jalview.binding.VamsasModel getVamsasModel()
102 return this._vamsasModel;
106 * Returns the value of field 'version'.
108 * @return the value of field 'Version'.
110 public java.lang.String getVersion()
112 return this._version;
118 * @return true if this object is valid according to the schema
120 public boolean isValid()
125 } catch (org.exolab.castor.xml.ValidationException vex)
136 * @throws org.exolab.castor.xml.MarshalException
137 * if object is null or if any SAXException is thrown during
139 * @throws org.exolab.castor.xml.ValidationException
140 * if this object is an invalid instance according to the schema
142 public void marshal(final java.io.Writer out)
143 throws org.exolab.castor.xml.MarshalException,
144 org.exolab.castor.xml.ValidationException
146 Marshaller.marshal(this, out);
153 * @throws java.io.IOException
154 * if an IOException occurs during marshaling
155 * @throws org.exolab.castor.xml.ValidationException
156 * if this object is an invalid instance according to the schema
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 schema
223 * @return the unmarshaled jalview.binding.JalviewModel
225 public static jalview.binding.JalviewModel unmarshal(
226 final java.io.Reader reader)
227 throws org.exolab.castor.xml.MarshalException,
228 org.exolab.castor.xml.ValidationException
230 return (jalview.binding.JalviewModel) Unmarshaller.unmarshal(
231 jalview.binding.JalviewModel.class, reader);
237 * @throws org.exolab.castor.xml.ValidationException
238 * if this object is an invalid instance according to the schema
240 public void validate() throws org.exolab.castor.xml.ValidationException
242 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
243 validator.validate(this);