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 * This is annotation over the coordinate frame
\r
26 * defined by all the columns in the alignment.
\r
29 * @version $Revision$ $Date$
\r
31 public class AlignmentAnnotation extends uk.ac.vamsas.objects.core.RangeAnnotation
\r
32 implements java.io.Serializable
\r
36 //--------------------------/
\r
37 //- Class/Member Variables -/
\r
38 //--------------------------/
\r
41 * TODO: decide if this flag is
\r
42 * redundant - when true it would suggest that
\r
43 * the annotationElement values together form a
\r
46 private boolean _graph;
\r
49 * keeps track of state for field: _graph
\r
51 private boolean _has_graph;
\r
56 private uk.ac.vamsas.objects.core.Provenance _provenance;
\r
63 public AlignmentAnnotation()
\r
66 } //-- uk.ac.vamsas.objects.core.AlignmentAnnotation()
\r
74 * Method deleteGraph
\r
77 public void deleteGraph()
\r
79 this._has_graph= false;
\r
80 } //-- void deleteGraph()
\r
83 * Note: hashCode() has not been overriden
\r
88 public boolean equals(java.lang.Object obj)
\r
93 if (super.equals(obj)==false)
\r
96 if (obj instanceof AlignmentAnnotation) {
\r
98 AlignmentAnnotation temp = (AlignmentAnnotation)obj;
\r
99 if (this._graph != temp._graph)
\r
101 if (this._has_graph != temp._has_graph)
\r
103 if (this._provenance != null) {
\r
104 if (temp._provenance == null) return false;
\r
105 else if (!(this._provenance.equals(temp._provenance)))
\r
108 else if (temp._provenance != null)
\r
113 } //-- boolean equals(java.lang.Object)
\r
116 * Returns the value of field 'graph'. The field 'graph' has
\r
117 * the following description: TODO: decide if this flag is
\r
118 * redundant - when true it would suggest that
\r
119 * the annotationElement values together form a
\r
123 * @return the value of field 'graph'.
\r
125 public boolean getGraph()
\r
127 return this._graph;
\r
128 } //-- boolean getGraph()
\r
131 * Returns the value of field 'provenance'.
\r
133 * @return Provenance
\r
134 * @return the value of field 'provenance'.
\r
136 public uk.ac.vamsas.objects.core.Provenance getProvenance()
\r
138 return this._provenance;
\r
139 } //-- uk.ac.vamsas.objects.core.Provenance getProvenance()
\r
148 public boolean hasGraph()
\r
150 return this._has_graph;
\r
151 } //-- boolean hasGraph()
\r
160 public boolean isValid()
\r
165 catch (org.exolab.castor.xml.ValidationException vex) {
\r
169 } //-- boolean isValid()
\r
178 public void marshal(java.io.Writer out)
\r
179 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
\r
182 Marshaller.marshal(this, out);
\r
183 } //-- void marshal(java.io.Writer)
\r
192 public void marshal(org.xml.sax.ContentHandler handler)
\r
193 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
\r
196 Marshaller.marshal(this, handler);
\r
197 } //-- void marshal(org.xml.sax.ContentHandler)
\r
200 * Sets the value of field 'graph'. The field 'graph' has the
\r
201 * following description: TODO: decide if this flag is
\r
202 * redundant - when true it would suggest that
\r
203 * the annotationElement values together form a
\r
206 * @param graph the value of field 'graph'.
\r
208 public void setGraph(boolean graph)
\r
210 this._graph = graph;
\r
211 this._has_graph = true;
\r
212 } //-- void setGraph(boolean)
\r
215 * Sets the value of field 'provenance'.
\r
217 * @param provenance the value of field 'provenance'.
\r
219 public void setProvenance(uk.ac.vamsas.objects.core.Provenance provenance)
\r
221 this._provenance = provenance;
\r
222 } //-- void setProvenance(uk.ac.vamsas.objects.core.Provenance)
\r
230 * @return RangeType
\r
232 public static uk.ac.vamsas.objects.core.RangeType unmarshal(java.io.Reader reader)
\r
233 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
\r
235 return (uk.ac.vamsas.objects.core.AlignmentAnnotation) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.AlignmentAnnotation.class, reader);
\r
236 } //-- uk.ac.vamsas.objects.core.RangeType unmarshal(java.io.Reader)
\r
242 public void validate()
\r
243 throws org.exolab.castor.xml.ValidationException
\r
245 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
\r
246 validator.validate(this);
\r
247 } //-- void validate()
\r