Formatting changes
[jalview.git] / src / jalview / binding / Colour.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 package jalview.binding;\r
8 \r
9 import org.exolab.castor.xml.MarshalException;\r
10 import org.exolab.castor.xml.Marshaller;\r
11 import org.exolab.castor.xml.Unmarshaller;\r
12 import org.exolab.castor.xml.ValidationException;\r
13 \r
14 import org.xml.sax.ContentHandler;\r
15 \r
16 //---------------------------------/\r
17 //- Imported classes and packages -/\r
18 //---------------------------------/\r
19 import java.io.IOException;\r
20 import java.io.Reader;\r
21 import java.io.Serializable;\r
22 import java.io.Writer;\r
23 \r
24 \r
25 /**\r
26  * Class Colour.\r
27  *\r
28  * @version $Revision$ $Date$\r
29  */\r
30 public class Colour implements java.io.Serializable\r
31 {\r
32     //--------------------------/\r
33     //- Class/Member Variables -/\r
34     //--------------------------/\r
35 \r
36     /**\r
37      * Field _name\r
38      */\r
39     private java.lang.String _name;\r
40 \r
41     /**\r
42      * Field _RGB\r
43      */\r
44     private java.lang.String _RGB;\r
45 \r
46     //----------------/\r
47     //- Constructors -/\r
48     //----------------/\r
49     public Colour()\r
50     {\r
51         super();\r
52     }\r
53 \r
54     //-- jalview.binding.Colour()\r
55     //-----------/\r
56 \r
57     /**\r
58      * DOCUMENT ME!\r
59      *\r
60      * @return DOCUMENT ME!\r
61      */\r
62     public java.lang.String getName()\r
63     {\r
64         return this._name;\r
65     }\r
66 \r
67     //-- java.lang.String getName() \r
68 \r
69     /**\r
70      * Returns the value of field 'RGB'.\r
71      *\r
72      * @return String\r
73      * @return the value of field 'RGB'.\r
74      */\r
75     public java.lang.String getRGB()\r
76     {\r
77         return this._RGB;\r
78     }\r
79 \r
80     //-- java.lang.String getRGB() \r
81 \r
82     /**\r
83      * Method isValid\r
84      *\r
85      *\r
86      *\r
87      * @return boolean\r
88      */\r
89     public boolean isValid()\r
90     {\r
91         try\r
92         {\r
93             validate();\r
94         }\r
95         catch (org.exolab.castor.xml.ValidationException vex)\r
96         {\r
97             return false;\r
98         }\r
99 \r
100         return true;\r
101     }\r
102 \r
103     //-- boolean isValid() \r
104 \r
105     /**\r
106      * Method marshal\r
107      *\r
108      *\r
109      *\r
110      * @param out\r
111      */\r
112     public void marshal(java.io.Writer out)\r
113         throws org.exolab.castor.xml.MarshalException, \r
114             org.exolab.castor.xml.ValidationException\r
115     {\r
116         Marshaller.marshal(this, out);\r
117     }\r
118 \r
119     //-- void marshal(java.io.Writer) \r
120 \r
121     /**\r
122      * Method marshal\r
123      *\r
124      *\r
125      *\r
126      * @param handler\r
127      */\r
128     public void marshal(org.xml.sax.ContentHandler handler)\r
129         throws java.io.IOException, org.exolab.castor.xml.MarshalException, \r
130             org.exolab.castor.xml.ValidationException\r
131     {\r
132         Marshaller.marshal(this, handler);\r
133     }\r
134 \r
135     //-- void marshal(org.xml.sax.ContentHandler) \r
136 \r
137     /**\r
138      * Sets the value of field 'name'.\r
139      *\r
140      * @param name the value of field 'name'.\r
141      */\r
142     public void setName(java.lang.String name)\r
143     {\r
144         this._name = name;\r
145     }\r
146 \r
147     //-- void setName(java.lang.String) \r
148 \r
149     /**\r
150      * Sets the value of field 'RGB'.\r
151      *\r
152      * @param RGB the value of field 'RGB'.\r
153      */\r
154     public void setRGB(java.lang.String RGB)\r
155     {\r
156         this._RGB = RGB;\r
157     }\r
158 \r
159     //-- void setRGB(java.lang.String) \r
160 \r
161     /**\r
162      * Method unmarshal\r
163      *\r
164      *\r
165      *\r
166      * @param reader\r
167      * @return Object\r
168      */\r
169     public static java.lang.Object unmarshal(java.io.Reader reader)\r
170         throws org.exolab.castor.xml.MarshalException, \r
171             org.exolab.castor.xml.ValidationException\r
172     {\r
173         return (jalview.binding.Colour) Unmarshaller.unmarshal(jalview.binding.Colour.class,\r
174             reader);\r
175     }\r
176 \r
177     //-- java.lang.Object unmarshal(java.io.Reader) \r
178 \r
179     /**\r
180      * Method validate\r
181      *\r
182      */\r
183     public void validate() throws org.exolab.castor.xml.ValidationException\r
184     {\r
185         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();\r
186         validator.validate(this);\r
187     }\r
188 \r
189     //-- void validate() \r
190 }\r