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