Formatting changes
[jalview.git] / src / jalview / binding / UserColour.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 org.exolab.castor.xml.*;\r
15 \r
16 /**\r
17  * Class UserColour.\r
18  *\r
19  * @version $Revision$ $Date$\r
20  */\r
21 public class UserColour\r
22     implements java.io.Serializable\r
23 {\r
24 \r
25   //--------------------------/\r
26   //- Class/Member Variables -/\r
27   //--------------------------/\r
28 \r
29   /**\r
30    * Field _id\r
31    */\r
32   private int _id;\r
33 \r
34   /**\r
35    * keeps track of state for field: _id\r
36    */\r
37   private boolean _has_id;\r
38 \r
39   /**\r
40    * Field _userColourScheme\r
41    */\r
42   private jalview.binding.UserColourScheme _userColourScheme;\r
43 \r
44   //----------------/\r
45   //- Constructors -/\r
46   //----------------/\r
47 \r
48   public UserColour()\r
49   {\r
50     super();\r
51   } //-- jalview.binding.UserColour()\r
52 \r
53   //-----------/\r
54   //- Methods -/\r
55   //-----------/\r
56 \r
57   /**\r
58    * Method deleteId\r
59    *\r
60    */\r
61   public void deleteId()\r
62   {\r
63     this._has_id = false;\r
64   } //-- void deleteId()\r
65 \r
66   /**\r
67    * Returns the value of field 'id'.\r
68    *\r
69    * @return int\r
70    * @return the value of field 'id'.\r
71    */\r
72   public int getId()\r
73   {\r
74     return this._id;\r
75   } //-- int 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   {\r
85     return this._userColourScheme;\r
86   } //-- jalview.binding.UserColourScheme getUserColourScheme()\r
87 \r
88   /**\r
89    * Method hasId\r
90    *\r
91    *\r
92    *\r
93    * @return boolean\r
94    */\r
95   public boolean hasId()\r
96   {\r
97     return this._has_id;\r
98   } //-- boolean hasId()\r
99 \r
100   /**\r
101    * Method isValid\r
102    *\r
103    *\r
104    *\r
105    * @return boolean\r
106    */\r
107   public boolean isValid()\r
108   {\r
109     try\r
110     {\r
111       validate();\r
112     }\r
113     catch (org.exolab.castor.xml.ValidationException vex)\r
114     {\r
115       return false;\r
116     }\r
117     return true;\r
118   } //-- boolean isValid()\r
119 \r
120   /**\r
121    * Method marshal\r
122    *\r
123    *\r
124    *\r
125    * @param out\r
126    */\r
127   public void marshal(java.io.Writer out)\r
128       throws org.exolab.castor.xml.MarshalException,\r
129       org.exolab.castor.xml.ValidationException\r
130   {\r
131 \r
132     Marshaller.marshal(this, out);\r
133   } //-- void marshal(java.io.Writer)\r
134 \r
135   /**\r
136    * Method marshal\r
137    *\r
138    *\r
139    *\r
140    * @param handler\r
141    */\r
142   public void marshal(org.xml.sax.ContentHandler handler)\r
143       throws java.io.IOException, org.exolab.castor.xml.MarshalException,\r
144       org.exolab.castor.xml.ValidationException\r
145   {\r
146 \r
147     Marshaller.marshal(this, handler);\r
148   } //-- void marshal(org.xml.sax.ContentHandler)\r
149 \r
150   /**\r
151    * Sets the value of field 'id'.\r
152    *\r
153    * @param id the value of field 'id'.\r
154    */\r
155   public void setId(int id)\r
156   {\r
157     this._id = id;\r
158     this._has_id = true;\r
159   } //-- void setId(int)\r
160 \r
161   /**\r
162    * Sets the value of field 'userColourScheme'.\r
163    *\r
164    * @param userColourScheme the value of field 'userColourScheme'\r
165    */\r
166   public void setUserColourScheme(jalview.binding.UserColourScheme\r
167                                   userColourScheme)\r
168   {\r
169     this._userColourScheme = userColourScheme;\r
170   } //-- void setUserColourScheme(jalview.binding.UserColourScheme)\r
171 \r
172   /**\r
173    * Method unmarshal\r
174    *\r
175    *\r
176    *\r
177    * @param reader\r
178    * @return Object\r
179    */\r
180   public static java.lang.Object unmarshal(java.io.Reader reader)\r
181       throws org.exolab.castor.xml.MarshalException,\r
182       org.exolab.castor.xml.ValidationException\r
183   {\r
184     return (jalview.binding.UserColour) Unmarshaller.unmarshal(jalview.binding.\r
185         UserColour.class, reader);\r
186   } //-- java.lang.Object unmarshal(java.io.Reader)\r
187 \r
188   /**\r
189    * Method validate\r
190    *\r
191    */\r
192   public void validate()\r
193       throws org.exolab.castor.xml.ValidationException\r
194   {\r
195     org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.\r
196         Validator();\r
197     validator.validate(this);\r
198   } //-- void validate()\r
199 \r
200 }\r