autogenerated java classes for current schema
[vamsas.git] / src / org / vamsas / objects / core / AlignmentSequenceAnnotation.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 AlignmentSequenceAnnotation.
26  * 
27  * @version $Revision$ $Date$
28  */
29 public class AlignmentSequenceAnnotation extends org.vamsas.objects.core.RangeAnnotation 
30 implements java.io.Serializable
31 {
32
33
34       //--------------------------/
35      //- Class/Member Variables -/
36     //--------------------------/
37
38     /**
39      * TODO:
40      *  decide
41      *  if
42      *  this
43      *  flag
44      *  is
45      *  redundant
46      *  -
47      *  when
48      *  true
49      *  it
50      *  would
51      *  suggest
52      *  that
53      *  the
54      *  annotationElement
55      *  values
56      *  together
57      *  form
58      *  a
59      *  graph
60      *  
61      */
62     private boolean _graph;
63
64     /**
65      * keeps track of state for field: _graph
66      */
67     private boolean _has_graph;
68
69     /**
70      * Field _provenance
71      */
72     private org.vamsas.objects.core.Provenance _provenance;
73
74
75       //----------------/
76      //- Constructors -/
77     //----------------/
78
79     public AlignmentSequenceAnnotation() 
80      {
81         super();
82     } //-- org.vamsas.objects.core.AlignmentSequenceAnnotation()
83
84
85       //-----------/
86      //- Methods -/
87     //-----------/
88
89     /**
90      * Method deleteGraph
91      * 
92      */
93     public void deleteGraph()
94     {
95         this._has_graph= false;
96     } //-- void deleteGraph() 
97
98     /**
99      * Note: hashCode() has not been overriden
100      * 
101      * @param obj
102      * @return boolean
103      */
104     public boolean equals(java.lang.Object obj)
105     {
106         if ( this == obj )
107             return true;
108         
109         if (super.equals(obj)==false)
110             return false;
111         
112         if (obj instanceof AlignmentSequenceAnnotation) {
113         
114             AlignmentSequenceAnnotation temp = (AlignmentSequenceAnnotation)obj;
115             if (this._graph != temp._graph)
116                 return false;
117             if (this._has_graph != temp._has_graph)
118                 return false;
119             if (this._provenance != null) {
120                 if (temp._provenance == null) return false;
121                 else if (!(this._provenance.equals(temp._provenance))) 
122                     return false;
123             }
124             else if (temp._provenance != null)
125                 return false;
126             return true;
127         }
128         return false;
129     } //-- boolean equals(java.lang.Object) 
130
131     /**
132      * Returns the value of field 'graph'. The field 'graph' has
133      * the following description: TODO:
134      *  decide
135      *  if
136      *  this
137      *  flag
138      *  is
139      *  redundant
140      *  -
141      *  when
142      *  true
143      *  it
144      *  would
145      *  suggest
146      *  that
147      *  the
148      *  annotationElement
149      *  values
150      *  together
151      *  form
152      *  a
153      *  graph
154      *  
155      * 
156      * @return boolean
157      * @return the value of field 'graph'.
158      */
159     public boolean getGraph()
160     {
161         return this._graph;
162     } //-- boolean getGraph() 
163
164     /**
165      * Returns the value of field 'provenance'.
166      * 
167      * @return Provenance
168      * @return the value of field 'provenance'.
169      */
170     public org.vamsas.objects.core.Provenance getProvenance()
171     {
172         return this._provenance;
173     } //-- org.vamsas.objects.core.Provenance getProvenance() 
174
175     /**
176      * Method hasGraph
177      * 
178      * 
179      * 
180      * @return boolean
181      */
182     public boolean hasGraph()
183     {
184         return this._has_graph;
185     } //-- boolean hasGraph() 
186
187     /**
188      * Method isValid
189      * 
190      * 
191      * 
192      * @return boolean
193      */
194     public boolean isValid()
195     {
196         try {
197             validate();
198         }
199         catch (org.exolab.castor.xml.ValidationException vex) {
200             return false;
201         }
202         return true;
203     } //-- boolean isValid() 
204
205     /**
206      * Method marshal
207      * 
208      * 
209      * 
210      * @param out
211      */
212     public void marshal(java.io.Writer out)
213         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
214     {
215         
216         Marshaller.marshal(this, out);
217     } //-- void marshal(java.io.Writer) 
218
219     /**
220      * Method marshal
221      * 
222      * 
223      * 
224      * @param handler
225      */
226     public void marshal(org.xml.sax.ContentHandler handler)
227         throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
228     {
229         
230         Marshaller.marshal(this, handler);
231     } //-- void marshal(org.xml.sax.ContentHandler) 
232
233     /**
234      * Sets the value of field 'graph'. The field 'graph' has the
235      * following description: TODO:
236      *  decide
237      *  if
238      *  this
239      *  flag
240      *  is
241      *  redundant
242      *  -
243      *  when
244      *  true
245      *  it
246      *  would
247      *  suggest
248      *  that
249      *  the
250      *  annotationElement
251      *  values
252      *  together
253      *  form
254      *  a
255      *  graph
256      *  
257      * 
258      * @param graph the value of field 'graph'.
259      */
260     public void setGraph(boolean graph)
261     {
262         this._graph = graph;
263         this._has_graph = true;
264     } //-- void setGraph(boolean) 
265
266     /**
267      * Sets the value of field 'provenance'.
268      * 
269      * @param provenance the value of field 'provenance'.
270      */
271     public void setProvenance(org.vamsas.objects.core.Provenance provenance)
272     {
273         this._provenance = provenance;
274     } //-- void setProvenance(org.vamsas.objects.core.Provenance) 
275
276     /**
277      * Method unmarshal
278      * 
279      * 
280      * 
281      * @param reader
282      * @return RangeType
283      */
284     public static org.vamsas.objects.core.RangeType unmarshal(java.io.Reader reader)
285         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
286     {
287         return (org.vamsas.objects.core.AlignmentSequenceAnnotation) Unmarshaller.unmarshal(org.vamsas.objects.core.AlignmentSequenceAnnotation.class, reader);
288     } //-- org.vamsas.objects.core.RangeType unmarshal(java.io.Reader) 
289
290     /**
291      * Method validate
292      * 
293      */
294     public void validate()
295         throws org.exolab.castor.xml.ValidationException
296     {
297         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
298         validator.validate(this);
299     } //-- void validate() 
300
301 }