JAL-2418 source formatting
[jalview.git] / src / jalview / binding / Feature.java
1 /*
2  * This class was automatically generated with 
3  * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
4  * Schema.
5  * $Id$
6  */
7
8 package jalview.binding;
9
10 //---------------------------------/
11 //- Imported classes and packages -/
12 //---------------------------------/
13
14 import org.exolab.castor.xml.Marshaller;
15 import org.exolab.castor.xml.Unmarshaller;
16
17 /**
18  * Class Feature.
19  * 
20  * @version $Revision$ $Date$
21  */
22 public class Feature implements java.io.Serializable
23 {
24
25   // --------------------------/
26   // - Class/Member Variables -/
27   // --------------------------/
28
29   /**
30    * Field _begin.
31    */
32   private int _begin;
33
34   /**
35    * keeps track of state for field: _begin
36    */
37   private boolean _has_begin;
38
39   /**
40    * Field _end.
41    */
42   private int _end;
43
44   /**
45    * keeps track of state for field: _end
46    */
47   private boolean _has_end;
48
49   /**
50    * Field _type.
51    */
52   private java.lang.String _type;
53
54   /**
55    * Field _description.
56    */
57   private java.lang.String _description;
58
59   /**
60    * Field _status.
61    */
62   private java.lang.String _status;
63
64   // ----------------/
65   // - Constructors -/
66   // ----------------/
67
68   public Feature()
69   {
70     super();
71   }
72
73   // -----------/
74   // - Methods -/
75   // -----------/
76
77   /**
78      */
79   public void deleteBegin()
80   {
81     this._has_begin = false;
82   }
83
84   /**
85      */
86   public void deleteEnd()
87   {
88     this._has_end = false;
89   }
90
91   /**
92    * Returns the value of field 'begin'.
93    * 
94    * @return the value of field 'Begin'.
95    */
96   public int getBegin()
97   {
98     return this._begin;
99   }
100
101   /**
102    * Returns the value of field 'description'.
103    * 
104    * @return the value of field 'Description'.
105    */
106   public java.lang.String getDescription()
107   {
108     return this._description;
109   }
110
111   /**
112    * Returns the value of field 'end'.
113    * 
114    * @return the value of field 'End'.
115    */
116   public int getEnd()
117   {
118     return this._end;
119   }
120
121   /**
122    * Returns the value of field 'status'.
123    * 
124    * @return the value of field 'Status'.
125    */
126   public java.lang.String getStatus()
127   {
128     return this._status;
129   }
130
131   /**
132    * Returns the value of field 'type'.
133    * 
134    * @return the value of field 'Type'.
135    */
136   public java.lang.String getType()
137   {
138     return this._type;
139   }
140
141   /**
142    * Method hasBegin.
143    * 
144    * @return true if at least one Begin has been added
145    */
146   public boolean hasBegin()
147   {
148     return this._has_begin;
149   }
150
151   /**
152    * Method hasEnd.
153    * 
154    * @return true if at least one End has been added
155    */
156   public boolean hasEnd()
157   {
158     return this._has_end;
159   }
160
161   /**
162    * Method isValid.
163    * 
164    * @return true if this object is valid according to the schema
165    */
166   public boolean isValid()
167   {
168     try
169     {
170       validate();
171     } catch (org.exolab.castor.xml.ValidationException vex)
172     {
173       return false;
174     }
175     return true;
176   }
177
178   /**
179    * 
180    * 
181    * @param out
182    * @throws org.exolab.castor.xml.MarshalException
183    *           if object is null or if any SAXException is thrown during
184    *           marshaling
185    * @throws org.exolab.castor.xml.ValidationException
186    *           if this object is an invalid instance according to the schema
187    */
188   public void marshal(final java.io.Writer out)
189           throws org.exolab.castor.xml.MarshalException,
190           org.exolab.castor.xml.ValidationException
191   {
192     Marshaller.marshal(this, out);
193   }
194
195   /**
196    * 
197    * 
198    * @param handler
199    * @throws java.io.IOException
200    *           if an IOException occurs during marshaling
201    * @throws org.exolab.castor.xml.ValidationException
202    *           if this object is an invalid instance according to the schema
203    * @throws org.exolab.castor.xml.MarshalException
204    *           if object is null or if any SAXException is thrown during
205    *           marshaling
206    */
207   public void marshal(final org.xml.sax.ContentHandler handler)
208           throws java.io.IOException,
209           org.exolab.castor.xml.MarshalException,
210           org.exolab.castor.xml.ValidationException
211   {
212     Marshaller.marshal(this, handler);
213   }
214
215   /**
216    * Sets the value of field 'begin'.
217    * 
218    * @param begin
219    *          the value of field 'begin'.
220    */
221   public void setBegin(final int begin)
222   {
223     this._begin = begin;
224     this._has_begin = true;
225   }
226
227   /**
228    * Sets the value of field 'description'.
229    * 
230    * @param description
231    *          the value of field 'description'.
232    */
233   public void setDescription(final java.lang.String description)
234   {
235     this._description = description;
236   }
237
238   /**
239    * Sets the value of field 'end'.
240    * 
241    * @param end
242    *          the value of field 'end'.
243    */
244   public void setEnd(final int end)
245   {
246     this._end = end;
247     this._has_end = true;
248   }
249
250   /**
251    * Sets the value of field 'status'.
252    * 
253    * @param status
254    *          the value of field 'status'.
255    */
256   public void setStatus(final java.lang.String status)
257   {
258     this._status = status;
259   }
260
261   /**
262    * Sets the value of field 'type'.
263    * 
264    * @param type
265    *          the value of field 'type'.
266    */
267   public void setType(final java.lang.String type)
268   {
269     this._type = type;
270   }
271
272   /**
273    * Method unmarshal.
274    * 
275    * @param reader
276    * @throws org.exolab.castor.xml.MarshalException
277    *           if object is null or if any SAXException is thrown during
278    *           marshaling
279    * @throws org.exolab.castor.xml.ValidationException
280    *           if this object is an invalid instance according to the schema
281    * @return the unmarshaled jalview.binding.Feature
282    */
283   public static jalview.binding.Feature unmarshal(
284           final java.io.Reader reader)
285           throws org.exolab.castor.xml.MarshalException,
286           org.exolab.castor.xml.ValidationException
287   {
288     return (jalview.binding.Feature) Unmarshaller
289             .unmarshal(jalview.binding.Feature.class, reader);
290   }
291
292   /**
293    * 
294    * 
295    * @throws org.exolab.castor.xml.ValidationException
296    *           if this object is an invalid instance according to the schema
297    */
298   public void validate() throws org.exolab.castor.xml.ValidationException
299   {
300     org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
301     validator.validate(this);
302   }
303
304 }