2 * This class was automatically generated with
3 * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
8 package uk.ac.vamsas.objects.core;
10 //---------------------------------/
11 //- Imported classes and packages -/
12 //---------------------------------/
14 import org.exolab.castor.xml.Marshaller;
15 import org.exolab.castor.xml.Unmarshaller;
20 * @version $Revision$ $Date$
22 public class Newick extends uk.ac.vamsas.client.Vobject
23 implements java.io.Serializable
27 //--------------------------/
28 //- Class/Member Variables -/
29 //--------------------------/
32 * internal content storage
34 private java.lang.String _content = "";
39 private java.lang.String _title;
42 * Primary Key for vamsas object referencing
45 private java.lang.String _id;
50 private java.lang.String _modifiable;
68 * Overrides the java.lang.Object.equals method.
71 * @return true if the objects are equal.
73 public boolean equals(
74 final java.lang.Object obj) {
78 if (super.equals(obj)==false)
81 if (obj instanceof Newick) {
83 Newick temp = (Newick)obj;
84 if (this._content != null) {
85 if (temp._content == null) return false;
86 else if (!(this._content.equals(temp._content)))
89 else if (temp._content != null)
91 if (this._title != null) {
92 if (temp._title == null) return false;
93 else if (!(this._title.equals(temp._title)))
96 else if (temp._title != null)
98 if (this._id != null) {
99 if (temp._id == null) return false;
100 else if (!(this._id.equals(temp._id)))
103 else if (temp._id != null)
105 if (this._modifiable != null) {
106 if (temp._modifiable == null) return false;
107 else if (!(this._modifiable.equals(temp._modifiable)))
110 else if (temp._modifiable != null)
118 * Returns the value of field 'content'. The field 'content'
119 * has the following description: internal content storage
121 * @return the value of field 'Content'.
123 public java.lang.String getContent(
125 return this._content;
129 * Returns the value of field 'id'. The field 'id' has the
130 * following description: Primary Key for vamsas object
134 * @return the value of field 'Id'.
136 public java.lang.String getId(
142 * Returns the value of field 'modifiable'.
144 * @return the value of field 'Modifiable'.
146 public java.lang.String getModifiable(
148 return this._modifiable;
152 * Returns the value of field 'title'.
154 * @return the value of field 'Title'.
156 public java.lang.String getTitle(
162 * Overrides the java.lang.Object.hashCode method.
164 * The following steps came from <b>Effective Java Programming
165 * Language Guide</b> by Joshua Bloch, Chapter 3
167 * @return a hash code value for the object.
171 int result = super.hashCode();
174 if (_content != null) {
175 result = 37 * result + _content.hashCode();
177 if (_title != null) {
178 result = 37 * result + _title.hashCode();
181 result = 37 * result + _id.hashCode();
183 if (_modifiable != null) {
184 result = 37 * result + _modifiable.hashCode();
193 * @return true if this object is valid according to the schema
195 public boolean isValid(
199 } catch (org.exolab.castor.xml.ValidationException vex) {
209 * @throws org.exolab.castor.xml.MarshalException if object is
210 * null or if any SAXException is thrown during marshaling
211 * @throws org.exolab.castor.xml.ValidationException if this
212 * object is an invalid instance according to the schema
215 final java.io.Writer out)
216 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
217 Marshaller.marshal(this, out);
224 * @throws java.io.IOException if an IOException occurs during
226 * @throws org.exolab.castor.xml.ValidationException if this
227 * object is an invalid instance according to the schema
228 * @throws org.exolab.castor.xml.MarshalException if object is
229 * null or if any SAXException is thrown during marshaling
232 final org.xml.sax.ContentHandler handler)
233 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
234 Marshaller.marshal(this, handler);
238 * Sets the value of field 'content'. The field 'content' has
239 * the following description: internal content storage
241 * @param content the value of field 'content'.
243 public void setContent(
244 final java.lang.String content) {
245 this._content = content;
249 * Sets the value of field 'id'. The field 'id' has the
250 * following description: Primary Key for vamsas object
254 * @param id the value of field 'id'.
257 final java.lang.String id) {
262 * Sets the value of field 'modifiable'.
264 * @param modifiable the value of field 'modifiable'.
266 public void setModifiable(
267 final java.lang.String modifiable) {
268 this._modifiable = modifiable;
272 * Sets the value of field 'title'.
274 * @param title the value of field 'title'.
276 public void setTitle(
277 final java.lang.String title) {
285 * @throws org.exolab.castor.xml.MarshalException if object is
286 * null or if any SAXException is thrown during marshaling
287 * @throws org.exolab.castor.xml.ValidationException if this
288 * object is an invalid instance according to the schema
289 * @return the unmarshaled uk.ac.vamsas.objects.core.Newick
291 public static uk.ac.vamsas.objects.core.Newick unmarshal(
292 final java.io.Reader reader)
293 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
294 return (uk.ac.vamsas.objects.core.Newick) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.Newick.class, reader);
300 * @throws org.exolab.castor.xml.ValidationException if this
301 * object is an invalid instance according to the schema
303 public void validate(
305 throws org.exolab.castor.xml.ValidationException {
306 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
307 validator.validate(this);