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