latest schema.
[vamsas.git] / src / org / vamsas / objects / core / SequenceType.java
1 /*
2  * This class was automatically generated with 
3  * <a href="http://www.castor.org">Castor 0.9.9M2</a>, using an XML
4  * Schema.
5  * $Id$
6  */
7
8 package org.vamsas.objects.core;
9
10   //---------------------------------/
11  //- Imported classes and packages -/
12 //---------------------------------/
13
14 import java.io.IOException;
15 import java.io.Reader;
16 import java.io.Serializable;
17 import java.io.Writer;
18 import org.exolab.castor.xml.MarshalException;
19 import org.exolab.castor.xml.Marshaller;
20 import org.exolab.castor.xml.Unmarshaller;
21 import org.exolab.castor.xml.ValidationException;
22 import org.xml.sax.ContentHandler;
23
24 /**
25  * Class SequenceType.
26  * 
27  * @version $Revision$ $Date$
28  */
29 public class SequenceType extends org.vamsas.client.object 
30 implements java.io.Serializable
31 {
32
33
34       //--------------------------/
35      //- Class/Member Variables -/
36     //--------------------------/
37
38     /**
39      * Field _start
40      */
41     private int _start;
42
43     /**
44      * keeps track of state for field: _start
45      */
46     private boolean _has_start;
47
48     /**
49      * Field _end
50      */
51     private int _end;
52
53     /**
54      * keeps track of state for field: _end
55      */
56     private boolean _has_end;
57
58     /**
59      * Field _sequence
60      */
61     private java.lang.String _sequence;
62
63     /**
64      * Field _name
65      */
66     private java.lang.String _name;
67
68
69       //----------------/
70      //- Constructors -/
71     //----------------/
72
73     public SequenceType() 
74      {
75         super();
76     } //-- org.vamsas.objects.core.SequenceType()
77
78
79       //-----------/
80      //- Methods -/
81     //-----------/
82
83     /**
84      * Method deleteEnd
85      * 
86      */
87     public void deleteEnd()
88     {
89         this._has_end= false;
90     } //-- void deleteEnd() 
91
92     /**
93      * Method deleteStart
94      * 
95      */
96     public void deleteStart()
97     {
98         this._has_start= false;
99     } //-- void deleteStart() 
100
101     /**
102      * Note: hashCode() has not been overriden
103      * 
104      * @param obj
105      * @return boolean
106      */
107     public boolean equals(java.lang.Object obj)
108     {
109         if ( this == obj )
110             return true;
111         
112         if (super.equals(obj)==false)
113             return false;
114         
115         if (obj instanceof SequenceType) {
116         
117             SequenceType temp = (SequenceType)obj;
118             if (this._start != temp._start)
119                 return false;
120             if (this._has_start != temp._has_start)
121                 return false;
122             if (this._end != temp._end)
123                 return false;
124             if (this._has_end != temp._has_end)
125                 return false;
126             if (this._sequence != null) {
127                 if (temp._sequence == null) return false;
128                 else if (!(this._sequence.equals(temp._sequence))) 
129                     return false;
130             }
131             else if (temp._sequence != null)
132                 return false;
133             if (this._name != null) {
134                 if (temp._name == null) return false;
135                 else if (!(this._name.equals(temp._name))) 
136                     return false;
137             }
138             else if (temp._name != null)
139                 return false;
140             return true;
141         }
142         return false;
143     } //-- boolean equals(java.lang.Object) 
144
145     /**
146      * Returns the value of field 'end'.
147      * 
148      * @return int
149      * @return the value of field 'end'.
150      */
151     public int getEnd()
152     {
153         return this._end;
154     } //-- int getEnd() 
155
156     /**
157      * Returns the value of field 'name'.
158      * 
159      * @return String
160      * @return the value of field 'name'.
161      */
162     public java.lang.String getName()
163     {
164         return this._name;
165     } //-- java.lang.String getName() 
166
167     /**
168      * Returns the value of field 'sequence'.
169      * 
170      * @return String
171      * @return the value of field 'sequence'.
172      */
173     public java.lang.String getSequence()
174     {
175         return this._sequence;
176     } //-- java.lang.String getSequence() 
177
178     /**
179      * Returns the value of field 'start'.
180      * 
181      * @return int
182      * @return the value of field 'start'.
183      */
184     public int getStart()
185     {
186         return this._start;
187     } //-- int getStart() 
188
189     /**
190      * Method hasEnd
191      * 
192      * 
193      * 
194      * @return boolean
195      */
196     public boolean hasEnd()
197     {
198         return this._has_end;
199     } //-- boolean hasEnd() 
200
201     /**
202      * Method hasStart
203      * 
204      * 
205      * 
206      * @return boolean
207      */
208     public boolean hasStart()
209     {
210         return this._has_start;
211     } //-- boolean hasStart() 
212
213     /**
214      * Method isValid
215      * 
216      * 
217      * 
218      * @return boolean
219      */
220     public boolean isValid()
221     {
222         try {
223             validate();
224         }
225         catch (org.exolab.castor.xml.ValidationException vex) {
226             return false;
227         }
228         return true;
229     } //-- boolean isValid() 
230
231     /**
232      * Method marshal
233      * 
234      * 
235      * 
236      * @param out
237      */
238     public void marshal(java.io.Writer out)
239         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
240     {
241         
242         Marshaller.marshal(this, out);
243     } //-- void marshal(java.io.Writer) 
244
245     /**
246      * Method marshal
247      * 
248      * 
249      * 
250      * @param handler
251      */
252     public void marshal(org.xml.sax.ContentHandler handler)
253         throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
254     {
255         
256         Marshaller.marshal(this, handler);
257     } //-- void marshal(org.xml.sax.ContentHandler) 
258
259     /**
260      * Sets the value of field 'end'.
261      * 
262      * @param end the value of field 'end'.
263      */
264     public void setEnd(int end)
265     {
266         this._end = end;
267         this._has_end = true;
268     } //-- void setEnd(int) 
269
270     /**
271      * Sets the value of field 'name'.
272      * 
273      * @param name the value of field 'name'.
274      */
275     public void setName(java.lang.String name)
276     {
277         this._name = name;
278     } //-- void setName(java.lang.String) 
279
280     /**
281      * Sets the value of field 'sequence'.
282      * 
283      * @param sequence the value of field 'sequence'.
284      */
285     public void setSequence(java.lang.String sequence)
286     {
287         this._sequence = sequence;
288     } //-- void setSequence(java.lang.String) 
289
290     /**
291      * Sets the value of field 'start'.
292      * 
293      * @param start the value of field 'start'.
294      */
295     public void setStart(int start)
296     {
297         this._start = start;
298         this._has_start = true;
299     } //-- void setStart(int) 
300
301     /**
302      * Method unmarshal
303      * 
304      * 
305      * 
306      * @param reader
307      * @return SequenceType
308      */
309     public static org.vamsas.objects.core.SequenceType unmarshal(java.io.Reader reader)
310         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
311     {
312         return (org.vamsas.objects.core.SequenceType) Unmarshaller.unmarshal(org.vamsas.objects.core.SequenceType.class, reader);
313     } //-- org.vamsas.objects.core.SequenceType unmarshal(java.io.Reader) 
314
315     /**
316      * Method validate
317      * 
318      */
319     public void validate()
320         throws org.exolab.castor.xml.ValidationException
321     {
322         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
323         validator.validate(this);
324     } //-- void validate() 
325
326 }