2 * This class was automatically generated with
\r
3 * <a href="http://www.castor.org">Castor 1.1</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 org.exolab.castor.xml.Marshaller;
\r
15 import org.exolab.castor.xml.Unmarshaller;
\r
18 * Direct associations between this node and any vamsas
\r
21 * @version $Revision$ $Date$
\r
23 public class Vref extends ReferenceType
\r
24 implements java.io.Serializable
\r
42 * Overrides the java.lang.Object.equals method.
\r
45 * @return true if the objects are equal.
\r
47 public boolean equals(
\r
48 final java.lang.Object obj) {
\r
52 if (super.equals(obj)==false)
\r
55 if (obj instanceof Vref) {
\r
63 * Overrides the java.lang.Object.hashCode method.
\r
65 * The following steps came from <b>Effective Java Programming
\r
66 * Language Guide</b> by Joshua Bloch, Chapter 3
\r
68 * @return a hash code value for the object.
\r
70 public int hashCode(
\r
72 int result = super.hashCode();
\r
82 * @return true if this object is valid according to the schema
\r
84 public boolean isValid(
\r
88 } catch (org.exolab.castor.xml.ValidationException vex) {
\r
98 * @throws org.exolab.castor.xml.MarshalException if object is
\r
99 * null or if any SAXException is thrown during marshaling
\r
100 * @throws org.exolab.castor.xml.ValidationException if this
\r
101 * object is an invalid instance according to the schema
\r
103 public void marshal(
\r
104 final java.io.Writer out)
\r
105 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
\r
106 Marshaller.marshal(this, out);
\r
113 * @throws java.io.IOException if an IOException occurs during
\r
115 * @throws org.exolab.castor.xml.ValidationException if this
\r
116 * object is an invalid instance according to the schema
\r
117 * @throws org.exolab.castor.xml.MarshalException if object is
\r
118 * null or if any SAXException is thrown during marshaling
\r
120 public void marshal(
\r
121 final org.xml.sax.ContentHandler handler)
\r
122 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
\r
123 Marshaller.marshal(this, handler);
\r
127 * Method unmarshal.
\r
130 * @throws org.exolab.castor.xml.MarshalException if object is
\r
131 * null or if any SAXException is thrown during marshaling
\r
132 * @throws org.exolab.castor.xml.ValidationException if this
\r
133 * object is an invalid instance according to the schema
\r
134 * @return the unmarshaled
\r
135 * uk.ac.vamsas.objects.core.ReferenceType
\r
137 public static uk.ac.vamsas.objects.core.ReferenceType unmarshal(
\r
138 final java.io.Reader reader)
\r
139 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
\r
140 return (uk.ac.vamsas.objects.core.ReferenceType) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.Vref.class, reader);
\r
146 * @throws org.exolab.castor.xml.ValidationException if this
\r
147 * object is an invalid instance according to the schema
\r
149 public void validate(
\r
151 throws org.exolab.castor.xml.ValidationException {
\r
152 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
\r
153 validator.validate(this);
\r