584f6e4730f75733eb76e0ce0c06efaca2531aec
[jalview.git] / src / jalview / schemabinding / version2 / JalviewModel.java
1 /*\r
2  * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1)\r
3  * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle\r
4  * \r
5  * This program is free software; you can redistribute it and/or\r
6  * modify it under the terms of the GNU General Public License\r
7  * as published by the Free Software Foundation; either version 2\r
8  * of the License, or (at your option) any later version.\r
9  * \r
10  * This program is distributed in the hope that it will be useful,\r
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
13  * GNU General Public License for more details.\r
14  * \r
15  * You should have received a copy of the GNU General Public License\r
16  * along with this program; if not, write to the Free Software\r
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA\r
18  */\r
19 package jalview.schemabinding.version2;\r
20 \r
21   //---------------------------------/\r
22  //- Imported classes and packages -/\r
23 //---------------------------------/\r
24 \r
25 import org.exolab.castor.xml.Marshaller;\r
26 import org.exolab.castor.xml.Unmarshaller;\r
27 \r
28 /**\r
29  * Class JalviewModel.\r
30  * \r
31  * @version $Revision$ $Date$\r
32  */\r
33 public class JalviewModel implements java.io.Serializable {\r
34 \r
35 \r
36       //--------------------------/\r
37      //- Class/Member Variables -/\r
38     //--------------------------/\r
39 \r
40     /**\r
41      * Field _creationDate.\r
42      */\r
43     private java.util.Date _creationDate;\r
44 \r
45     /**\r
46      * Field _version.\r
47      */\r
48     private java.lang.String _version;\r
49 \r
50     /**\r
51      * Field _vamsasModel.\r
52      */\r
53     private jalview.schemabinding.version2.VamsasModel _vamsasModel;\r
54 \r
55     /**\r
56      * Field _jalviewModelSequence.\r
57      */\r
58     private jalview.schemabinding.version2.JalviewModelSequence _jalviewModelSequence;\r
59 \r
60 \r
61       //----------------/\r
62      //- Constructors -/\r
63     //----------------/\r
64 \r
65     public JalviewModel() {\r
66         super();\r
67     }\r
68 \r
69 \r
70       //-----------/\r
71      //- Methods -/\r
72     //-----------/\r
73 \r
74     /**\r
75      * Returns the value of field 'creationDate'.\r
76      * \r
77      * @return the value of field 'CreationDate'.\r
78      */\r
79     public java.util.Date getCreationDate(\r
80     ) {\r
81         return this._creationDate;\r
82     }\r
83 \r
84     /**\r
85      * Returns the value of field 'jalviewModelSequence'.\r
86      * \r
87      * @return the value of field 'JalviewModelSequence'.\r
88      */\r
89     public jalview.schemabinding.version2.JalviewModelSequence getJalviewModelSequence(\r
90     ) {\r
91         return this._jalviewModelSequence;\r
92     }\r
93 \r
94     /**\r
95      * Returns the value of field 'vamsasModel'.\r
96      * \r
97      * @return the value of field 'VamsasModel'.\r
98      */\r
99     public jalview.schemabinding.version2.VamsasModel getVamsasModel(\r
100     ) {\r
101         return this._vamsasModel;\r
102     }\r
103 \r
104     /**\r
105      * Returns the value of field 'version'.\r
106      * \r
107      * @return the value of field 'Version'.\r
108      */\r
109     public java.lang.String getVersion(\r
110     ) {\r
111         return this._version;\r
112     }\r
113 \r
114     /**\r
115      * Method isValid.\r
116      * \r
117      * @return true if this object is valid according to the schema\r
118      */\r
119     public boolean isValid(\r
120     ) {\r
121         try {\r
122             validate();\r
123         } catch (org.exolab.castor.xml.ValidationException vex) {\r
124             return false;\r
125         }\r
126         return true;\r
127     }\r
128 \r
129     /**\r
130      * \r
131      * \r
132      * @param out\r
133      * @throws org.exolab.castor.xml.MarshalException if object is\r
134      * null or if any SAXException is thrown during marshaling\r
135      * @throws org.exolab.castor.xml.ValidationException if this\r
136      * object is an invalid instance according to the schema\r
137      */\r
138     public void marshal(\r
139             final java.io.Writer out)\r
140     throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
141         Marshaller.marshal(this, out);\r
142     }\r
143 \r
144     /**\r
145      * \r
146      * \r
147      * @param handler\r
148      * @throws java.io.IOException if an IOException occurs during\r
149      * marshaling\r
150      * @throws org.exolab.castor.xml.ValidationException if this\r
151      * object is an invalid instance according to the schema\r
152      * @throws org.exolab.castor.xml.MarshalException if object is\r
153      * null or if any SAXException is thrown during marshaling\r
154      */\r
155     public void marshal(\r
156             final org.xml.sax.ContentHandler handler)\r
157     throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
158         Marshaller.marshal(this, handler);\r
159     }\r
160 \r
161     /**\r
162      * Sets the value of field 'creationDate'.\r
163      * \r
164      * @param creationDate the value of field 'creationDate'.\r
165      */\r
166     public void setCreationDate(\r
167             final java.util.Date creationDate) {\r
168         this._creationDate = creationDate;\r
169     }\r
170 \r
171     /**\r
172      * Sets the value of field 'jalviewModelSequence'.\r
173      * \r
174      * @param jalviewModelSequence the value of field\r
175      * 'jalviewModelSequence'.\r
176      */\r
177     public void setJalviewModelSequence(\r
178             final jalview.schemabinding.version2.JalviewModelSequence jalviewModelSequence) {\r
179         this._jalviewModelSequence = jalviewModelSequence;\r
180     }\r
181 \r
182     /**\r
183      * Sets the value of field 'vamsasModel'.\r
184      * \r
185      * @param vamsasModel the value of field 'vamsasModel'.\r
186      */\r
187     public void setVamsasModel(\r
188             final jalview.schemabinding.version2.VamsasModel vamsasModel) {\r
189         this._vamsasModel = vamsasModel;\r
190     }\r
191 \r
192     /**\r
193      * Sets the value of field 'version'.\r
194      * \r
195      * @param version the value of field 'version'.\r
196      */\r
197     public void setVersion(\r
198             final java.lang.String version) {\r
199         this._version = version;\r
200     }\r
201 \r
202     /**\r
203      * Method unmarshal.\r
204      * \r
205      * @param reader\r
206      * @throws org.exolab.castor.xml.MarshalException if object is\r
207      * null or if any SAXException is thrown during marshaling\r
208      * @throws org.exolab.castor.xml.ValidationException if this\r
209      * object is an invalid instance according to the schema\r
210      * @return the unmarshaled\r
211      * jalview.schemabinding.version2.JalviewModel\r
212      */\r
213     public static jalview.schemabinding.version2.JalviewModel unmarshal(\r
214             final java.io.Reader reader)\r
215     throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
216         return (jalview.schemabinding.version2.JalviewModel) Unmarshaller.unmarshal(jalview.schemabinding.version2.JalviewModel.class, reader);\r
217     }\r
218 \r
219     /**\r
220      * \r
221      * \r
222      * @throws org.exolab.castor.xml.ValidationException if this\r
223      * object is an invalid instance according to the schema\r
224      */\r
225     public void validate(\r
226     )\r
227     throws org.exolab.castor.xml.ValidationException {\r
228         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();\r
229         validator.validate(this);\r
230     }\r
231 \r
232 }\r