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
27 * @version $Revision$ $Date$
\r
29 public class Link extends uk.ac.vamsas.client.Vobject
\r
30 implements java.io.Serializable
\r
34 //--------------------------/
\r
35 //- Class/Member Variables -/
\r
36 //--------------------------/
\r
39 * internal content storage
\r
41 private java.lang.String _content = "";
\r
46 private java.lang.String _href;
\r
57 } //-- uk.ac.vamsas.objects.core.Link()
\r
65 * Note: hashCode() has not been overriden
\r
70 public boolean equals(java.lang.Object obj)
\r
75 if (super.equals(obj)==false)
\r
78 if (obj instanceof Link) {
\r
80 Link temp = (Link)obj;
\r
81 if (this._content != null) {
\r
82 if (temp._content == null) return false;
\r
83 else if (!(this._content.equals(temp._content)))
\r
86 else if (temp._content != null)
\r
88 if (this._href != null) {
\r
89 if (temp._href == null) return false;
\r
90 else if (!(this._href.equals(temp._href)))
\r
93 else if (temp._href != null)
\r
98 } //-- boolean equals(java.lang.Object)
\r
101 * Returns the value of field 'content'. The field 'content'
\r
102 * has the following description: internal content storage
\r
105 * @return the value of field 'content'.
\r
107 public java.lang.String getContent()
\r
109 return this._content;
\r
110 } //-- java.lang.String getContent()
\r
113 * Returns the value of field 'href'. The field 'href' has the
\r
114 * following description: The URI
\r
117 * @return the value of field 'href'.
\r
119 public java.lang.String getHref()
\r
122 } //-- java.lang.String getHref()
\r
131 public boolean isValid()
\r
136 catch (org.exolab.castor.xml.ValidationException vex) {
\r
140 } //-- boolean isValid()
\r
149 public void marshal(java.io.Writer out)
\r
150 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
\r
153 Marshaller.marshal(this, out);
\r
154 } //-- void marshal(java.io.Writer)
\r
163 public void marshal(org.xml.sax.ContentHandler handler)
\r
164 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
\r
167 Marshaller.marshal(this, handler);
\r
168 } //-- void marshal(org.xml.sax.ContentHandler)
\r
171 * Sets the value of field 'content'. The field 'content' has
\r
172 * the following description: internal content storage
\r
174 * @param content the value of field 'content'.
\r
176 public void setContent(java.lang.String content)
\r
178 this._content = content;
\r
179 } //-- void setContent(java.lang.String)
\r
182 * Sets the value of field 'href'. The field 'href' has the
\r
183 * following description: The URI
\r
185 * @param href the value of field 'href'.
\r
187 public void setHref(java.lang.String href)
\r
190 } //-- void setHref(java.lang.String)
\r
200 public static uk.ac.vamsas.objects.core.Link unmarshal(java.io.Reader reader)
\r
201 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
\r
203 return (uk.ac.vamsas.objects.core.Link) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.Link.class, reader);
\r
204 } //-- uk.ac.vamsas.objects.core.Link unmarshal(java.io.Reader)
\r
210 public void validate()
\r
211 throws org.exolab.castor.xml.ValidationException
\r
213 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
\r
214 validator.validate(this);
\r
215 } //-- void validate()
\r