Rebuilt with new schema
[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 \r
8 package jalview.binding;\r
9 \r
10   //---------------------------------/\r
11  //- Imported classes and packages -/\r
12 //---------------------------------/\r
13 \r
14 import java.io.IOException;\r
15 import java.io.Reader;\r
16 import java.io.Serializable;\r
17 import java.io.Writer;\r
18 import org.exolab.castor.xml.MarshalException;\r
19 import org.exolab.castor.xml.Marshaller;\r
20 import org.exolab.castor.xml.Unmarshaller;\r
21 import org.exolab.castor.xml.ValidationException;\r
22 import org.xml.sax.ContentHandler;\r
23 \r
24 /**\r
25  * Class Colour.\r
26  * \r
27  * @version $Revision$ $Date$\r
28  */\r
29 public class Colour implements java.io.Serializable {\r
30 \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       //----------------/\r
48      //- Constructors -/\r
49     //----------------/\r
50 \r
51     public Colour() {\r
52         super();\r
53     } //-- jalview.binding.Colour()\r
54 \r
55 \r
56       //-----------/\r
57      //- Methods -/\r
58     //-----------/\r
59 \r
60     /**\r
61      * Returns the value of field 'name'.\r
62      * \r
63      * @return String\r
64      * @return the value of field 'name'.\r
65      */\r
66     public java.lang.String getName()\r
67     {\r
68         return this._name;\r
69     } //-- java.lang.String getName() \r
70 \r
71     /**\r
72      * Returns the value of field 'RGB'.\r
73      * \r
74      * @return String\r
75      * @return the value of field 'RGB'.\r
76      */\r
77     public java.lang.String getRGB()\r
78     {\r
79         return this._RGB;\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             validate();\r
93         }\r
94         catch (org.exolab.castor.xml.ValidationException vex) {\r
95             return false;\r
96         }\r
97         return true;\r
98     } //-- boolean isValid() \r
99 \r
100     /**\r
101      * Method marshal\r
102      * \r
103      * \r
104      * \r
105      * @param out\r
106      */\r
107     public void marshal(java.io.Writer out)\r
108         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
109     {\r
110         \r
111         Marshaller.marshal(this, out);\r
112     } //-- void marshal(java.io.Writer) \r
113 \r
114     /**\r
115      * Method marshal\r
116      * \r
117      * \r
118      * \r
119      * @param handler\r
120      */\r
121     public void marshal(org.xml.sax.ContentHandler handler)\r
122         throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
123     {\r
124         \r
125         Marshaller.marshal(this, handler);\r
126     } //-- void marshal(org.xml.sax.ContentHandler) \r
127 \r
128     /**\r
129      * Sets the value of field 'name'.\r
130      * \r
131      * @param name the value of field 'name'.\r
132      */\r
133     public void setName(java.lang.String name)\r
134     {\r
135         this._name = name;\r
136     } //-- void setName(java.lang.String) \r
137 \r
138     /**\r
139      * Sets the value of field 'RGB'.\r
140      * \r
141      * @param RGB the value of field 'RGB'.\r
142      */\r
143     public void setRGB(java.lang.String RGB)\r
144     {\r
145         this._RGB = RGB;\r
146     } //-- void setRGB(java.lang.String) \r
147 \r
148     /**\r
149      * Method unmarshal\r
150      * \r
151      * \r
152      * \r
153      * @param reader\r
154      * @return Object\r
155      */\r
156     public static java.lang.Object unmarshal(java.io.Reader reader)\r
157         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
158     {\r
159         return (jalview.binding.Colour) Unmarshaller.unmarshal(jalview.binding.Colour.class, reader);\r
160     } //-- java.lang.Object unmarshal(java.io.Reader) \r
161 \r
162     /**\r
163      * Method validate\r
164      * \r
165      */\r
166     public void validate()\r
167         throws org.exolab.castor.xml.ValidationException\r
168     {\r
169         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();\r
170         validator.validate(this);\r
171     } //-- void validate() \r
172 \r
173 }\r