2 * This class was automatically generated with
\r
3 * <a href="http://www.castor.org">Castor 0.9.9M2</a>, using an XML
\r
8 package uk.ac.vamsas.objects.core;
\r
10 //---------------------------------/
\r
11 //- Imported classes and packages -/
\r
12 //---------------------------------/
\r
14 import java.io.IOException;
\r
15 import java.io.Reader;
\r
16 import java.io.Serializable;
\r
17 import java.io.Writer;
\r
18 import org.exolab.castor.xml.MarshalException;
\r
19 import org.exolab.castor.xml.Marshaller;
\r
20 import org.exolab.castor.xml.Unmarshaller;
\r
21 import org.exolab.castor.xml.ValidationException;
\r
22 import org.xml.sax.ContentHandler;
\r
25 * Class AlignmentSequenceAnnotation.
\r
27 * @version $Revision$ $Date$
\r
29 public class AlignmentSequenceAnnotation extends uk.ac.vamsas.objects.core.RangeAnnotation
\r
30 implements java.io.Serializable
\r
34 //--------------------------/
\r
35 //- Class/Member Variables -/
\r
36 //--------------------------/
\r
40 * decide if this flag is
\r
41 * redundant - when true it
\r
42 * would suggest that the
\r
43 * annotationElement values
\r
44 * together form a graph
\r
47 private boolean _graph;
\r
50 * keeps track of state for field: _graph
\r
52 private boolean _has_graph;
\r
57 private uk.ac.vamsas.objects.core.Provenance _provenance;
\r
64 public AlignmentSequenceAnnotation()
\r
67 } //-- uk.ac.vamsas.objects.core.AlignmentSequenceAnnotation()
\r
75 * Method deleteGraph
\r
78 public void deleteGraph()
\r
80 this._has_graph= false;
\r
81 } //-- void deleteGraph()
\r
84 * Note: hashCode() has not been overriden
\r
89 public boolean equals(java.lang.Object obj)
\r
94 if (super.equals(obj)==false)
\r
97 if (obj instanceof AlignmentSequenceAnnotation) {
\r
99 AlignmentSequenceAnnotation temp = (AlignmentSequenceAnnotation)obj;
\r
100 if (this._graph != temp._graph)
\r
102 if (this._has_graph != temp._has_graph)
\r
104 if (this._provenance != null) {
\r
105 if (temp._provenance == null) return false;
\r
106 else if (!(this._provenance.equals(temp._provenance)))
\r
109 else if (temp._provenance != null)
\r
114 } //-- boolean equals(java.lang.Object)
\r
117 * Returns the value of field 'graph'. The field 'graph' has
\r
118 * the following description: TODO:
\r
119 * decide if this flag is
\r
120 * redundant - when true it
\r
121 * would suggest that the
\r
122 * annotationElement values
\r
123 * together form a graph
\r
127 * @return the value of field 'graph'.
\r
129 public boolean getGraph()
\r
131 return this._graph;
\r
132 } //-- boolean getGraph()
\r
135 * Returns the value of field 'provenance'.
\r
137 * @return Provenance
\r
138 * @return the value of field 'provenance'.
\r
140 public uk.ac.vamsas.objects.core.Provenance getProvenance()
\r
142 return this._provenance;
\r
143 } //-- uk.ac.vamsas.objects.core.Provenance getProvenance()
\r
152 public boolean hasGraph()
\r
154 return this._has_graph;
\r
155 } //-- boolean hasGraph()
\r
164 public boolean isValid()
\r
169 catch (org.exolab.castor.xml.ValidationException vex) {
\r
173 } //-- boolean isValid()
\r
182 public void marshal(java.io.Writer out)
\r
183 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
\r
186 Marshaller.marshal(this, out);
\r
187 } //-- void marshal(java.io.Writer)
\r
196 public void marshal(org.xml.sax.ContentHandler handler)
\r
197 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
\r
200 Marshaller.marshal(this, handler);
\r
201 } //-- void marshal(org.xml.sax.ContentHandler)
\r
204 * Sets the value of field 'graph'. The field 'graph' has the
\r
205 * following description: TODO:
\r
206 * decide if this flag is
\r
207 * redundant - when true it
\r
208 * would suggest that the
\r
209 * annotationElement values
\r
210 * together form a graph
\r
213 * @param graph the value of field 'graph'.
\r
215 public void setGraph(boolean graph)
\r
217 this._graph = graph;
\r
218 this._has_graph = true;
\r
219 } //-- void setGraph(boolean)
\r
222 * Sets the value of field 'provenance'.
\r
224 * @param provenance the value of field 'provenance'.
\r
226 public void setProvenance(uk.ac.vamsas.objects.core.Provenance provenance)
\r
228 this._provenance = provenance;
\r
229 } //-- void setProvenance(uk.ac.vamsas.objects.core.Provenance)
\r
237 * @return RangeType
\r
239 public static uk.ac.vamsas.objects.core.RangeType unmarshal(java.io.Reader reader)
\r
240 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
\r
242 return (uk.ac.vamsas.objects.core.AlignmentSequenceAnnotation) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.AlignmentSequenceAnnotation.class, reader);
\r
243 } //-- uk.ac.vamsas.objects.core.RangeType unmarshal(java.io.Reader)
\r
249 public void validate()
\r
250 throws org.exolab.castor.xml.ValidationException
\r
252 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
\r
253 validator.validate(this);
\r
254 } //-- void validate()
\r