Formatted source
[jalview.git] / src / jalview / binding / UserColourScheme.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 \r
43 /**\r
44  * Class UserColourScheme.\r
45  *\r
46  * @version $Revision$ $Date$\r
47  */\r
48 public class UserColourScheme extends JalviewUserColours\r
49     implements java.io.Serializable {\r
50     //----------------/\r
51     //- Constructors -/\r
52     //----------------/\r
53     public UserColourScheme() {\r
54         super();\r
55     }\r
56      //-- jalview.binding.UserColourScheme()\r
57  //-----------/\r
58 \r
59     public boolean isValid() {\r
60         try {\r
61             validate();\r
62         } catch (org.exolab.castor.xml.ValidationException vex) {\r
63             return false;\r
64         }\r
65 \r
66         return true;\r
67     }\r
68      //-- boolean isValid()\r
69 \r
70     /**\r
71      * Method marshal\r
72      *\r
73      *\r
74      *\r
75      * @param out\r
76      */\r
77     public void marshal(java.io.Writer out)\r
78         throws org.exolab.castor.xml.MarshalException, \r
79             org.exolab.castor.xml.ValidationException {\r
80         Marshaller.marshal(this, out);\r
81     }\r
82      //-- void marshal(java.io.Writer)\r
83 \r
84     /**\r
85      * Method marshal\r
86      *\r
87      *\r
88      *\r
89      * @param handler\r
90      */\r
91     public void marshal(org.xml.sax.ContentHandler handler)\r
92         throws java.io.IOException, org.exolab.castor.xml.MarshalException, \r
93             org.exolab.castor.xml.ValidationException {\r
94         Marshaller.marshal(this, handler);\r
95     }\r
96      //-- void marshal(org.xml.sax.ContentHandler)\r
97 \r
98     /**\r
99      * Method unmarshal\r
100      *\r
101      *\r
102      *\r
103      * @param reader\r
104      * @return Object\r
105      */\r
106     public static java.lang.Object unmarshal(java.io.Reader reader)\r
107         throws org.exolab.castor.xml.MarshalException, \r
108             org.exolab.castor.xml.ValidationException {\r
109         return (jalview.binding.UserColourScheme) Unmarshaller.unmarshal(jalview.binding.UserColourScheme.class,\r
110             reader);\r
111     }\r
112      //-- java.lang.Object unmarshal(java.io.Reader)\r
113 \r
114     /**\r
115      * Method validate\r
116      *\r
117      */\r
118     public void validate() throws org.exolab.castor.xml.ValidationException {\r
119         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();\r
120         validator.validate(this);\r
121     }\r
122      //-- void validate()\r
123 }\r