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
25 * Discrete symbol - possibly graphically represented
\r
28 * @version $Revision$ $Date$
\r
30 public class Glyph extends uk.ac.vamsas.client.Vobject
\r
31 implements java.io.Serializable
\r
35 //--------------------------/
\r
36 //- Class/Member Variables -/
\r
37 //--------------------------/
\r
40 * internal content storage
\r
42 private java.lang.String _content = "";
\r
45 * specifies the symbol dictionary for this
\r
46 * glyph - eg utf8 (the default), aasecstr_3 or
\r
47 * kd_hydrophobicity - the content is not validated so
\r
48 * applications must ensure they gracefully deal with
\r
49 * invalid entries here
\r
51 private java.lang.String _dict = "utf8";
\r
63 } //-- uk.ac.vamsas.objects.core.Glyph()
\r
71 * Note: hashCode() has not been overriden
\r
76 public boolean equals(java.lang.Object obj)
\r
81 if (super.equals(obj)==false)
\r
84 if (obj instanceof Glyph) {
\r
86 Glyph temp = (Glyph)obj;
\r
87 if (this._content != null) {
\r
88 if (temp._content == null) return false;
\r
89 else if (!(this._content.equals(temp._content)))
\r
92 else if (temp._content != null)
\r
94 if (this._dict != null) {
\r
95 if (temp._dict == null) return false;
\r
96 else if (!(this._dict.equals(temp._dict)))
\r
99 else if (temp._dict != null)
\r
104 } //-- boolean equals(java.lang.Object)
\r
107 * Returns the value of field 'content'. The field 'content'
\r
108 * has the following description: internal content storage
\r
111 * @return the value of field 'content'.
\r
113 public java.lang.String getContent()
\r
115 return this._content;
\r
116 } //-- java.lang.String getContent()
\r
119 * Returns the value of field 'dict'. The field 'dict' has the
\r
120 * following description: specifies the symbol dictionary for
\r
122 * glyph - eg utf8 (the default), aasecstr_3 or
\r
123 * kd_hydrophobicity - the content is not validated so
\r
124 * applications must ensure they gracefully deal with
\r
125 * invalid entries here
\r
128 * @return the value of field 'dict'.
\r
130 public java.lang.String getDict()
\r
133 } //-- java.lang.String getDict()
\r
142 public boolean isValid()
\r
147 catch (org.exolab.castor.xml.ValidationException vex) {
\r
151 } //-- boolean isValid()
\r
160 public void marshal(java.io.Writer out)
\r
161 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
\r
164 Marshaller.marshal(this, out);
\r
165 } //-- void marshal(java.io.Writer)
\r
174 public void marshal(org.xml.sax.ContentHandler handler)
\r
175 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
\r
178 Marshaller.marshal(this, handler);
\r
179 } //-- void marshal(org.xml.sax.ContentHandler)
\r
182 * Sets the value of field 'content'. The field 'content' has
\r
183 * the following description: internal content storage
\r
185 * @param content the value of field 'content'.
\r
187 public void setContent(java.lang.String content)
\r
189 this._content = content;
\r
190 } //-- void setContent(java.lang.String)
\r
193 * Sets the value of field 'dict'. The field 'dict' has the
\r
194 * following description: specifies the symbol dictionary for
\r
196 * glyph - eg utf8 (the default), aasecstr_3 or
\r
197 * kd_hydrophobicity - the content is not validated so
\r
198 * applications must ensure they gracefully deal with
\r
199 * invalid entries here
\r
201 * @param dict the value of field 'dict'.
\r
203 public void setDict(java.lang.String dict)
\r
206 } //-- void setDict(java.lang.String)
\r
216 public static uk.ac.vamsas.objects.core.Glyph unmarshal(java.io.Reader reader)
\r
217 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
\r
219 return (uk.ac.vamsas.objects.core.Glyph) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.Glyph.class, reader);
\r
220 } //-- uk.ac.vamsas.objects.core.Glyph unmarshal(java.io.Reader)
\r
226 public void validate()
\r
227 throws org.exolab.castor.xml.ValidationException
\r
229 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
\r
230 validator.validate(this);
\r
231 } //-- void validate()
\r