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
20 * @version $Revision$ $Date$
\r
22 public class Mapped extends MapRangeType
\r
23 implements java.io.Serializable
\r
41 * Overrides the java.lang.Object.equals method.
\r
44 * @return true if the objects are equal.
\r
46 public boolean equals(
\r
47 final java.lang.Object obj) {
\r
51 if (super.equals(obj)==false)
\r
54 if (obj instanceof Mapped) {
\r
62 * Overrides the java.lang.Object.hashCode method.
\r
64 * The following steps came from <b>Effective Java Programming
\r
65 * Language Guide</b> by Joshua Bloch, Chapter 3
\r
67 * @return a hash code value for the object.
\r
69 public int hashCode(
\r
71 int result = super.hashCode();
\r
81 * @return true if this object is valid according to the schema
\r
83 public boolean isValid(
\r
87 } catch (org.exolab.castor.xml.ValidationException vex) {
\r
97 * @throws org.exolab.castor.xml.MarshalException if object is
\r
98 * null or if any SAXException is thrown during marshaling
\r
99 * @throws org.exolab.castor.xml.ValidationException if this
\r
100 * object is an invalid instance according to the schema
\r
102 public void marshal(
\r
103 final java.io.Writer out)
\r
104 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
\r
105 Marshaller.marshal(this, out);
\r
112 * @throws java.io.IOException if an IOException occurs during
\r
114 * @throws org.exolab.castor.xml.ValidationException if this
\r
115 * object is an invalid instance according to the schema
\r
116 * @throws org.exolab.castor.xml.MarshalException if object is
\r
117 * null or if any SAXException is thrown during marshaling
\r
119 public void marshal(
\r
120 final org.xml.sax.ContentHandler handler)
\r
121 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
\r
122 Marshaller.marshal(this, handler);
\r
126 * Method unmarshal.
\r
129 * @throws org.exolab.castor.xml.MarshalException if object is
\r
130 * null or if any SAXException is thrown during marshaling
\r
131 * @throws org.exolab.castor.xml.ValidationException if this
\r
132 * object is an invalid instance according to the schema
\r
133 * @return the unmarshaled uk.ac.vamsas.objects.core.RangeType
\r
135 public static uk.ac.vamsas.objects.core.RangeType unmarshal(
\r
136 final java.io.Reader reader)
\r
137 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
\r
138 return (uk.ac.vamsas.objects.core.RangeType) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.Mapped.class, reader);
\r
144 * @throws org.exolab.castor.xml.ValidationException if this
\r
145 * object is an invalid instance according to the schema
\r
147 public void validate(
\r
149 throws org.exolab.castor.xml.ValidationException {
\r
150 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
\r
151 validator.validate(this);
\r