2 * This class was automatically generated with
3 * <a href="http://www.castor.org">Castor 0.9.9M1</a>, using an XML
8 package org.vamsas.objects.core;
10 //---------------------------------/
11 //- Imported classes and packages -/
12 //---------------------------------/
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;
27 * @version $Revision$ $Date$
29 public class Tree extends org.vamsas.client.object
30 implements java.io.Serializable
34 //--------------------------/
35 //- Class/Member Variables -/
36 //--------------------------/
41 private org.vamsas.objects.core.Provenance _provenance;
46 private java.lang.String _newickFormat;
56 } //-- org.vamsas.objects.core.Tree()
64 * Note: hashCode() has not been overriden
69 public boolean equals(java.lang.Object obj)
74 if (super.equals(obj)==false)
77 if (obj instanceof Tree) {
79 Tree temp = (Tree)obj;
80 if (this._provenance != null) {
81 if (temp._provenance == null) return false;
82 else if (!(this._provenance.equals(temp._provenance)))
85 else if (temp._provenance != null)
87 if (this._newickFormat != null) {
88 if (temp._newickFormat == null) return false;
89 else if (!(this._newickFormat.equals(temp._newickFormat)))
92 else if (temp._newickFormat != null)
97 } //-- boolean equals(java.lang.Object)
100 * Returns the value of field 'newickFormat'.
103 * @return the value of field 'newickFormat'.
105 public java.lang.String getNewickFormat()
107 return this._newickFormat;
108 } //-- java.lang.String getNewickFormat()
111 * Returns the value of field 'provenance'.
114 * @return the value of field 'provenance'.
116 public org.vamsas.objects.core.Provenance getProvenance()
118 return this._provenance;
119 } //-- org.vamsas.objects.core.Provenance getProvenance()
128 public boolean isValid()
133 catch (org.exolab.castor.xml.ValidationException vex) {
137 } //-- boolean isValid()
146 public void marshal(java.io.Writer out)
147 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
150 Marshaller.marshal(this, out);
151 } //-- void marshal(java.io.Writer)
160 public void marshal(org.xml.sax.ContentHandler handler)
161 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
164 Marshaller.marshal(this, handler);
165 } //-- void marshal(org.xml.sax.ContentHandler)
168 * Sets the value of field 'newickFormat'.
170 * @param newickFormat the value of field 'newickFormat'.
172 public void setNewickFormat(java.lang.String newickFormat)
174 this._newickFormat = newickFormat;
175 } //-- void setNewickFormat(java.lang.String)
178 * Sets the value of field 'provenance'.
180 * @param provenance the value of field 'provenance'.
182 public void setProvenance(org.vamsas.objects.core.Provenance provenance)
184 this._provenance = provenance;
185 } //-- void setProvenance(org.vamsas.objects.core.Provenance)
195 public static org.vamsas.objects.core.Tree unmarshal(java.io.Reader reader)
196 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
198 return (org.vamsas.objects.core.Tree) Unmarshaller.unmarshal(org.vamsas.objects.core.Tree.class, reader);
199 } //-- org.vamsas.objects.core.Tree unmarshal(java.io.Reader)
205 public void validate()
206 throws org.exolab.castor.xml.ValidationException
208 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
209 validator.validate(this);
210 } //-- void validate()