2 * This class was automatically generated with
3 * <a href="http://www.castor.org">Castor 0.9.9M2</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;
25 * Primitive labelled URI object
28 * @version $Revision$ $Date$
30 public class Uri extends org.vamsas.client.Vobject
31 implements java.io.Serializable
35 //--------------------------/
36 //- Class/Member Variables -/
37 //--------------------------/
40 * internal content storage
42 private java.lang.String _content = "";
47 private java.lang.String _href;
58 } //-- org.vamsas.objects.core.Uri()
66 * Note: hashCode() has not been overriden
71 public boolean equals(java.lang.Object obj)
76 if (super.equals(obj)==false)
79 if (obj instanceof Uri) {
82 if (this._content != null) {
83 if (temp._content == null) return false;
84 else if (!(this._content.equals(temp._content)))
87 else if (temp._content != null)
89 if (this._href != null) {
90 if (temp._href == null) return false;
91 else if (!(this._href.equals(temp._href)))
94 else if (temp._href != null)
99 } //-- boolean equals(java.lang.Object)
102 * Returns the value of field 'content'. The field 'content'
103 * has the following description: internal content storage
106 * @return the value of field 'content'.
108 public java.lang.String getContent()
110 return this._content;
111 } //-- java.lang.String getContent()
114 * Returns the value of field 'href'. The field 'href' has the
115 * following description: The URI
118 * @return the value of field 'href'.
120 public java.lang.String getHref()
123 } //-- java.lang.String getHref()
132 public boolean isValid()
137 catch (org.exolab.castor.xml.ValidationException vex) {
141 } //-- boolean isValid()
150 public void marshal(java.io.Writer out)
151 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
154 Marshaller.marshal(this, out);
155 } //-- void marshal(java.io.Writer)
164 public void marshal(org.xml.sax.ContentHandler handler)
165 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
168 Marshaller.marshal(this, handler);
169 } //-- void marshal(org.xml.sax.ContentHandler)
172 * Sets the value of field 'content'. The field 'content' has
173 * the following description: internal content storage
175 * @param content the value of field 'content'.
177 public void setContent(java.lang.String content)
179 this._content = content;
180 } //-- void setContent(java.lang.String)
183 * Sets the value of field 'href'. The field 'href' has the
184 * following description: The URI
186 * @param href the value of field 'href'.
188 public void setHref(java.lang.String href)
191 } //-- void setHref(java.lang.String)
201 public static org.vamsas.objects.core.Uri unmarshal(java.io.Reader reader)
202 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
204 return (org.vamsas.objects.core.Uri) Unmarshaller.unmarshal(org.vamsas.objects.core.Uri.class, reader);
205 } //-- org.vamsas.objects.core.Uri unmarshal(java.io.Reader)
211 public void validate()
212 throws org.exolab.castor.xml.ValidationException
214 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
215 validator.validate(this);
216 } //-- void validate()