af23b24f2465ee1838ef87173b2f0469575ddc21
[jalview.git] / src / jalview / binding / JalviewModel.java
1 /*******************************************************************************
2  * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
3  * Copyright (C) $(date) The Jalview Authors
4  *
5  * This file is part of Jalview.
6  *  
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.
11  *   
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.
16  *
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.
20  *******************************************************************************/
21 /*
22  * This class was automatically generated with 
23  * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
24  * Schema.
25  * $Id$
26  */
27
28 package jalview.binding;
29
30 //---------------------------------/
31 //- Imported classes and packages -/
32 //---------------------------------/
33
34 import org.exolab.castor.xml.Marshaller;
35 import org.exolab.castor.xml.Unmarshaller;
36
37 /**
38  * Class JalviewModel.
39  * 
40  * @version $Revision$ $Date$
41  */
42 public class JalviewModel implements java.io.Serializable
43 {
44
45   // --------------------------/
46   // - Class/Member Variables -/
47   // --------------------------/
48
49   /**
50    * Field _creationDate.
51    */
52   private java.util.Date _creationDate;
53
54   /**
55    * Field _version.
56    */
57   private java.lang.String _version;
58
59   /**
60    * Field _vamsasModel.
61    */
62   private jalview.binding.VamsasModel _vamsasModel;
63
64   /**
65    * Field _jalviewModelSequence.
66    */
67   private jalview.binding.JalviewModelSequence _jalviewModelSequence;
68
69   // ----------------/
70   // - Constructors -/
71   // ----------------/
72
73   public JalviewModel()
74   {
75     super();
76   }
77
78   // -----------/
79   // - Methods -/
80   // -----------/
81
82   /**
83    * Returns the value of field 'creationDate'.
84    * 
85    * @return the value of field 'CreationDate'.
86    */
87   public java.util.Date getCreationDate()
88   {
89     return this._creationDate;
90   }
91
92   /**
93    * Returns the value of field 'jalviewModelSequence'.
94    * 
95    * @return the value of field 'JalviewModelSequence'.
96    */
97   public jalview.binding.JalviewModelSequence getJalviewModelSequence()
98   {
99     return this._jalviewModelSequence;
100   }
101
102   /**
103    * Returns the value of field 'vamsasModel'.
104    * 
105    * @return the value of field 'VamsasModel'.
106    */
107   public jalview.binding.VamsasModel getVamsasModel()
108   {
109     return this._vamsasModel;
110   }
111
112   /**
113    * Returns the value of field 'version'.
114    * 
115    * @return the value of field 'Version'.
116    */
117   public java.lang.String getVersion()
118   {
119     return this._version;
120   }
121
122   /**
123    * Method isValid.
124    * 
125    * @return true if this object is valid according to the schema
126    */
127   public boolean isValid()
128   {
129     try
130     {
131       validate();
132     } catch (org.exolab.castor.xml.ValidationException vex)
133     {
134       return false;
135     }
136     return true;
137   }
138
139   /**
140    * 
141    * 
142    * @param out
143    * @throws org.exolab.castor.xml.MarshalException
144    *           if object is null or if any SAXException is thrown during
145    *           marshaling
146    * @throws org.exolab.castor.xml.ValidationException
147    *           if this object is an invalid instance according to the schema
148    */
149   public void marshal(final java.io.Writer out)
150           throws org.exolab.castor.xml.MarshalException,
151           org.exolab.castor.xml.ValidationException
152   {
153     Marshaller.marshal(this, out);
154   }
155
156   /**
157    * 
158    * 
159    * @param handler
160    * @throws java.io.IOException
161    *           if an IOException occurs during marshaling
162    * @throws org.exolab.castor.xml.ValidationException
163    *           if this object is an invalid instance according to the schema
164    * @throws org.exolab.castor.xml.MarshalException
165    *           if object is null or if any SAXException is thrown during
166    *           marshaling
167    */
168   public void marshal(final org.xml.sax.ContentHandler handler)
169           throws java.io.IOException,
170           org.exolab.castor.xml.MarshalException,
171           org.exolab.castor.xml.ValidationException
172   {
173     Marshaller.marshal(this, handler);
174   }
175
176   /**
177    * Sets the value of field 'creationDate'.
178    * 
179    * @param creationDate
180    *          the value of field 'creationDate'.
181    */
182   public void setCreationDate(final java.util.Date creationDate)
183   {
184     this._creationDate = creationDate;
185   }
186
187   /**
188    * Sets the value of field 'jalviewModelSequence'.
189    * 
190    * @param jalviewModelSequence
191    *          the value of field 'jalviewModelSequence'.
192    */
193   public void setJalviewModelSequence(
194           final jalview.binding.JalviewModelSequence jalviewModelSequence)
195   {
196     this._jalviewModelSequence = jalviewModelSequence;
197   }
198
199   /**
200    * Sets the value of field 'vamsasModel'.
201    * 
202    * @param vamsasModel
203    *          the value of field 'vamsasModel'.
204    */
205   public void setVamsasModel(final jalview.binding.VamsasModel vamsasModel)
206   {
207     this._vamsasModel = vamsasModel;
208   }
209
210   /**
211    * Sets the value of field 'version'.
212    * 
213    * @param version
214    *          the value of field 'version'.
215    */
216   public void setVersion(final java.lang.String version)
217   {
218     this._version = version;
219   }
220
221   /**
222    * Method unmarshal.
223    * 
224    * @param reader
225    * @throws org.exolab.castor.xml.MarshalException
226    *           if object is null or if any SAXException is thrown during
227    *           marshaling
228    * @throws org.exolab.castor.xml.ValidationException
229    *           if this object is an invalid instance according to the schema
230    * @return the unmarshaled jalview.binding.JalviewModel
231    */
232   public static jalview.binding.JalviewModel unmarshal(
233           final java.io.Reader reader)
234           throws org.exolab.castor.xml.MarshalException,
235           org.exolab.castor.xml.ValidationException
236   {
237     return (jalview.binding.JalviewModel) Unmarshaller
238             .unmarshal(jalview.binding.JalviewModel.class, reader);
239   }
240
241   /**
242    * 
243    * 
244    * @throws org.exolab.castor.xml.ValidationException
245    *           if this object is an invalid instance according to the schema
246    */
247   public void validate() throws org.exolab.castor.xml.ValidationException
248   {
249     org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
250     validator.validate(this);
251   }
252
253 }