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