GPL license added
[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 /*\r
9 * Jalview - A Sequence Alignment Editor and Viewer\r
10 * Copyright (C) 2005 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle\r
11 *\r
12 * This program is free software; you can redistribute it and/or\r
13 * modify it under the terms of the GNU General Public License\r
14 * as published by the Free Software Foundation; either version 2\r
15 * of the License, or (at your option) any later version.\r
16 *\r
17 * This program is distributed in the hope that it will be useful,\r
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
20 * GNU General Public License for more details.\r
21 *\r
22 * You should have received a copy of the GNU General Public License\r
23 * along with this program; if not, write to the Free Software\r
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA\r
25 */\r
26 \r
27 package jalview.binding;\r
28 \r
29   //---------------------------------/\r
30  //- Imported classes and packages -/\r
31 //---------------------------------/\r
32 \r
33 import java.io.IOException;\r
34 import java.io.Reader;\r
35 import java.io.Serializable;\r
36 import java.io.Writer;\r
37 import org.exolab.castor.xml.MarshalException;\r
38 import org.exolab.castor.xml.Marshaller;\r
39 import org.exolab.castor.xml.Unmarshaller;\r
40 import org.exolab.castor.xml.ValidationException;\r
41 import org.xml.sax.ContentHandler;\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 \r
51       //--------------------------/\r
52      //- Class/Member Variables -/\r
53     //--------------------------/\r
54 \r
55     /**\r
56      * Field _id\r
57      */\r
58     private java.lang.String _id;\r
59 \r
60     /**\r
61      * Field _userColourScheme\r
62      */\r
63     private jalview.binding.UserColourScheme _userColourScheme;\r
64 \r
65 \r
66       //----------------/\r
67      //- Constructors -/\r
68     //----------------/\r
69 \r
70     public UserColours() {\r
71         super();\r
72     } //-- jalview.binding.UserColours()\r
73 \r
74 \r
75       //-----------/\r
76      //- Methods -/\r
77     //-----------/\r
78 \r
79     /**\r
80      * Returns the value of field 'id'.\r
81      *\r
82      * @return String\r
83      * @return the value of field 'id'.\r
84      */\r
85     public java.lang.String getId()\r
86     {\r
87         return this._id;\r
88     } //-- java.lang.String getId()\r
89 \r
90     /**\r
91      * Returns the value of field 'userColourScheme'.\r
92      *\r
93      * @return UserColourScheme\r
94      * @return the value of field 'userColourScheme'.\r
95      */\r
96     public jalview.binding.UserColourScheme getUserColourScheme()\r
97     {\r
98         return this._userColourScheme;\r
99     } //-- jalview.binding.UserColourScheme getUserColourScheme()\r
100 \r
101     /**\r
102      * Method isValid\r
103      *\r
104      *\r
105      *\r
106      * @return boolean\r
107      */\r
108     public boolean isValid()\r
109     {\r
110         try {\r
111             validate();\r
112         }\r
113         catch (org.exolab.castor.xml.ValidationException vex) {\r
114             return false;\r
115         }\r
116         return true;\r
117     } //-- boolean isValid()\r
118 \r
119     /**\r
120      * Method marshal\r
121      *\r
122      *\r
123      *\r
124      * @param out\r
125      */\r
126     public void marshal(java.io.Writer out)\r
127         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
128     {\r
129 \r
130         Marshaller.marshal(this, out);\r
131     } //-- void marshal(java.io.Writer)\r
132 \r
133     /**\r
134      * Method marshal\r
135      *\r
136      *\r
137      *\r
138      * @param handler\r
139      */\r
140     public void marshal(org.xml.sax.ContentHandler handler)\r
141         throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
142     {\r
143 \r
144         Marshaller.marshal(this, handler);\r
145     } //-- void marshal(org.xml.sax.ContentHandler)\r
146 \r
147     /**\r
148      * Sets the value of field 'id'.\r
149      *\r
150      * @param id the value of field 'id'.\r
151      */\r
152     public void setId(java.lang.String id)\r
153     {\r
154         this._id = id;\r
155     } //-- void setId(java.lang.String)\r
156 \r
157     /**\r
158      * Sets the value of field 'userColourScheme'.\r
159      *\r
160      * @param userColourScheme the value of field 'userColourScheme'\r
161      */\r
162     public void setUserColourScheme(jalview.binding.UserColourScheme userColourScheme)\r
163     {\r
164         this._userColourScheme = userColourScheme;\r
165     } //-- void setUserColourScheme(jalview.binding.UserColourScheme)\r
166 \r
167     /**\r
168      * Method unmarshal\r
169      *\r
170      *\r
171      *\r
172      * @param reader\r
173      * @return Object\r
174      */\r
175     public static java.lang.Object unmarshal(java.io.Reader reader)\r
176         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
177     {\r
178         return (jalview.binding.UserColours) Unmarshaller.unmarshal(jalview.binding.UserColours.class, reader);\r
179     } //-- java.lang.Object unmarshal(java.io.Reader)\r
180 \r
181     /**\r
182      * Method validate\r
183      *\r
184      */\r
185     public void validate()\r
186         throws org.exolab.castor.xml.ValidationException\r
187     {\r
188         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();\r
189         validator.validate(this);\r
190     } //-- void validate()\r
191 \r
192 }\r