Formatted source
[jalview.git] / src / jalview / binding / UserColours.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 UserColours.\r
45  *\r
46  * @version $Revision$ $Date$\r
47  */\r
48 public class UserColours implements java.io.Serializable {\r
49     //--------------------------/\r
50     //- Class/Member Variables -/\r
51     //--------------------------/\r
52 \r
53     /**\r
54      * Field _id\r
55      */\r
56     private java.lang.String _id;\r
57 \r
58     /**\r
59      * Field _userColourScheme\r
60      */\r
61     private jalview.binding.UserColourScheme _userColourScheme;\r
62 \r
63     //----------------/\r
64     //- Constructors -/\r
65     //----------------/\r
66     public UserColours() {\r
67         super();\r
68     }\r
69      //-- jalview.binding.UserColours()\r
70  //-----------/\r
71 \r
72     public java.lang.String getId() {\r
73         return this._id;\r
74     }\r
75      //-- java.lang.String getId()\r
76 \r
77     /**\r
78      * Returns the value of field 'userColourScheme'.\r
79      *\r
80      * @return UserColourScheme\r
81      * @return the value of field 'userColourScheme'.\r
82      */\r
83     public jalview.binding.UserColourScheme getUserColourScheme() {\r
84         return this._userColourScheme;\r
85     }\r
86      //-- jalview.binding.UserColourScheme getUserColourScheme()\r
87 \r
88     /**\r
89      * Method isValid\r
90      *\r
91      *\r
92      *\r
93      * @return boolean\r
94      */\r
95     public boolean isValid() {\r
96         try {\r
97             validate();\r
98         } catch (org.exolab.castor.xml.ValidationException vex) {\r
99             return false;\r
100         }\r
101 \r
102         return true;\r
103     }\r
104      //-- boolean isValid()\r
105 \r
106     /**\r
107      * Method marshal\r
108      *\r
109      *\r
110      *\r
111      * @param out\r
112      */\r
113     public void marshal(java.io.Writer out)\r
114         throws org.exolab.castor.xml.MarshalException, \r
115             org.exolab.castor.xml.ValidationException {\r
116         Marshaller.marshal(this, out);\r
117     }\r
118      //-- void marshal(java.io.Writer)\r
119 \r
120     /**\r
121      * Method marshal\r
122      *\r
123      *\r
124      *\r
125      * @param handler\r
126      */\r
127     public void marshal(org.xml.sax.ContentHandler handler)\r
128         throws java.io.IOException, org.exolab.castor.xml.MarshalException, \r
129             org.exolab.castor.xml.ValidationException {\r
130         Marshaller.marshal(this, handler);\r
131     }\r
132      //-- void marshal(org.xml.sax.ContentHandler)\r
133 \r
134     /**\r
135      * Sets the value of field 'id'.\r
136      *\r
137      * @param id the value of field 'id'.\r
138      */\r
139     public void setId(java.lang.String id) {\r
140         this._id = id;\r
141     }\r
142      //-- void setId(java.lang.String)\r
143 \r
144     /**\r
145      * Sets the value of field 'userColourScheme'.\r
146      *\r
147      * @param userColourScheme the value of field 'userColourScheme'\r
148      */\r
149     public void setUserColourScheme(\r
150         jalview.binding.UserColourScheme userColourScheme) {\r
151         this._userColourScheme = userColourScheme;\r
152     }\r
153      //-- void setUserColourScheme(jalview.binding.UserColourScheme)\r
154 \r
155     /**\r
156      * Method unmarshal\r
157      *\r
158      *\r
159      *\r
160      * @param reader\r
161      * @return Object\r
162      */\r
163     public static java.lang.Object unmarshal(java.io.Reader reader)\r
164         throws org.exolab.castor.xml.MarshalException, \r
165             org.exolab.castor.xml.ValidationException {\r
166         return (jalview.binding.UserColours) Unmarshaller.unmarshal(jalview.binding.UserColours.class,\r
167             reader);\r
168     }\r
169      //-- java.lang.Object unmarshal(java.io.Reader)\r
170 \r
171     /**\r
172      * Method validate\r
173      *\r
174      */\r
175     public void validate() throws org.exolab.castor.xml.ValidationException {\r
176         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();\r
177         validator.validate(this);\r
178     }\r
179      //-- void validate()\r
180 }\r