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 org.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 * Discrete symbol - possibly graphically
\r
29 * @version $Revision$ $Date$
\r
31 public class Glyph extends org.vamsas.client.Vobject
\r
32 implements java.io.Serializable
\r
36 //--------------------------/
\r
37 //- Class/Member Variables -/
\r
38 //--------------------------/
\r
41 * internal content storage
\r
43 private java.lang.String _content = "";
\r
46 * specifies the symbol
\r
47 * dictionary for this glyph -
\r
48 * eg utf8 (the default),
\r
50 * kd_hydrophobicity - the
\r
51 * content is not validated so
\r
52 * applications must ensure
\r
53 * they gracefully deal with
\r
54 * invalid entries here
\r
57 private java.lang.String _dict = "utf8";
\r
69 } //-- org.vamsas.objects.core.Glyph()
\r
77 * Note: hashCode() has not been overriden
\r
82 public boolean equals(java.lang.Object obj)
\r
87 if (super.equals(obj)==false)
\r
90 if (obj instanceof Glyph) {
\r
92 Glyph temp = (Glyph)obj;
\r
93 if (this._content != null) {
\r
94 if (temp._content == null) return false;
\r
95 else if (!(this._content.equals(temp._content)))
\r
98 else if (temp._content != null)
\r
100 if (this._dict != null) {
\r
101 if (temp._dict == null) return false;
\r
102 else if (!(this._dict.equals(temp._dict)))
\r
105 else if (temp._dict != null)
\r
110 } //-- boolean equals(java.lang.Object)
\r
113 * Returns the value of field 'content'. The field 'content'
\r
114 * has the following description: internal content storage
\r
117 * @return the value of field 'content'.
\r
119 public java.lang.String getContent()
\r
121 return this._content;
\r
122 } //-- java.lang.String getContent()
\r
125 * Returns the value of field 'dict'. The field 'dict' has the
\r
126 * following description: specifies the symbol
\r
127 * dictionary for this glyph -
\r
128 * eg utf8 (the default),
\r
130 * kd_hydrophobicity - the
\r
131 * content is not validated so
\r
132 * applications must ensure
\r
133 * they gracefully deal with
\r
134 * invalid entries here
\r
138 * @return the value of field 'dict'.
\r
140 public java.lang.String getDict()
\r
143 } //-- java.lang.String getDict()
\r
152 public boolean isValid()
\r
157 catch (org.exolab.castor.xml.ValidationException vex) {
\r
161 } //-- boolean isValid()
\r
170 public void marshal(java.io.Writer out)
\r
171 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
\r
174 Marshaller.marshal(this, out);
\r
175 } //-- void marshal(java.io.Writer)
\r
184 public void marshal(org.xml.sax.ContentHandler handler)
\r
185 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
\r
188 Marshaller.marshal(this, handler);
\r
189 } //-- void marshal(org.xml.sax.ContentHandler)
\r
192 * Sets the value of field 'content'. The field 'content' has
\r
193 * the following description: internal content storage
\r
195 * @param content the value of field 'content'.
\r
197 public void setContent(java.lang.String content)
\r
199 this._content = content;
\r
200 } //-- void setContent(java.lang.String)
\r
203 * Sets the value of field 'dict'. The field 'dict' has the
\r
204 * following description: specifies the symbol
\r
205 * dictionary for this glyph -
\r
206 * eg utf8 (the default),
\r
208 * kd_hydrophobicity - the
\r
209 * content is not validated so
\r
210 * applications must ensure
\r
211 * they gracefully deal with
\r
212 * invalid entries here
\r
215 * @param dict the value of field 'dict'.
\r
217 public void setDict(java.lang.String dict)
\r
220 } //-- void setDict(java.lang.String)
\r
230 public static org.vamsas.objects.core.Glyph unmarshal(java.io.Reader reader)
\r
231 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
\r
233 return (org.vamsas.objects.core.Glyph) Unmarshaller.unmarshal(org.vamsas.objects.core.Glyph.class, reader);
\r
234 } //-- org.vamsas.objects.core.Glyph unmarshal(java.io.Reader)
\r
240 public void validate()
\r
241 throws org.exolab.castor.xml.ValidationException
\r
243 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
\r
244 validator.validate(this);
\r
245 } //-- void validate()
\r