Formatting changes
[jalview.git] / src / jalview / binding / Residue.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 Residue.\r
18  *\r
19  * @version $Revision$ $Date$\r
20  */\r
21 public class Residue\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 _name\r
31    */\r
32   private java.lang.String _name;\r
33 \r
34   /**\r
35    * Field _RGB\r
36    */\r
37   private int _RGB;\r
38 \r
39   /**\r
40    * keeps track of state for field: _RGB\r
41    */\r
42   private boolean _has_RGB;\r
43 \r
44   //----------------/\r
45   //- Constructors -/\r
46   //----------------/\r
47 \r
48   public Residue()\r
49   {\r
50     super();\r
51   } //-- jalview.binding.Residue()\r
52 \r
53   //-----------/\r
54   //- Methods -/\r
55   //-----------/\r
56 \r
57   /**\r
58    * Method deleteRGB\r
59    *\r
60    */\r
61   public void deleteRGB()\r
62   {\r
63     this._has_RGB = false;\r
64   } //-- void deleteRGB()\r
65 \r
66   /**\r
67    * Returns the value of field 'name'.\r
68    *\r
69    * @return String\r
70    * @return the value of field 'name'.\r
71    */\r
72   public java.lang.String getName()\r
73   {\r
74     return this._name;\r
75   } //-- java.lang.String getName()\r
76 \r
77   /**\r
78    * Returns the value of field 'RGB'.\r
79    *\r
80    * @return int\r
81    * @return the value of field 'RGB'.\r
82    */\r
83   public int getRGB()\r
84   {\r
85     return this._RGB;\r
86   } //-- int getRGB()\r
87 \r
88   /**\r
89    * Method hasRGB\r
90    *\r
91    *\r
92    *\r
93    * @return boolean\r
94    */\r
95   public boolean hasRGB()\r
96   {\r
97     return this._has_RGB;\r
98   } //-- boolean hasRGB()\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 'name'.\r
152    *\r
153    * @param name the value of field 'name'.\r
154    */\r
155   public void setName(java.lang.String name)\r
156   {\r
157     this._name = name;\r
158   } //-- void setName(java.lang.String)\r
159 \r
160   /**\r
161    * Sets the value of field 'RGB'.\r
162    *\r
163    * @param RGB the value of field 'RGB'.\r
164    */\r
165   public void setRGB(int RGB)\r
166   {\r
167     this._RGB = RGB;\r
168     this._has_RGB = true;\r
169   } //-- void setRGB(int)\r
170 \r
171   /**\r
172    * Method unmarshal\r
173    *\r
174    *\r
175    *\r
176    * @param reader\r
177    * @return Object\r
178    */\r
179   public static java.lang.Object unmarshal(java.io.Reader reader)\r
180       throws org.exolab.castor.xml.MarshalException,\r
181       org.exolab.castor.xml.ValidationException\r
182   {\r
183     return (jalview.binding.Residue) Unmarshaller.unmarshal(jalview.binding.\r
184         Residue.class, reader);\r
185   } //-- java.lang.Object unmarshal(java.io.Reader)\r
186 \r
187   /**\r
188    * Method validate\r
189    *\r
190    */\r
191   public void validate()\r
192       throws org.exolab.castor.xml.ValidationException\r
193   {\r
194     org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.\r
195         Validator();\r
196     validator.validate(this);\r
197   } //-- void validate()\r
198 \r
199 }\r