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
27 * @version $Revision$ $Date$
\r
29 public class Mapping extends uk.ac.vamsas.objects.core.MapList
\r
30 implements java.io.Serializable
\r
34 //--------------------------/
\r
35 //- Class/Member Variables -/
\r
36 //--------------------------/
\r
39 * object to which the mapping is being mapped
\r
42 private java.lang.Object _onto;
\r
52 } //-- uk.ac.vamsas.objects.core.Mapping()
\r
60 * Note: hashCode() has not been overriden
\r
65 public boolean equals(java.lang.Object obj)
\r
70 if (super.equals(obj)==false)
\r
73 if (obj instanceof Mapping) {
\r
75 Mapping temp = (Mapping)obj;
\r
76 if (this._onto != null) {
\r
77 if (temp._onto == null) return false;
\r
78 else if (!(this._onto.equals(temp._onto)))
\r
81 else if (temp._onto != null)
\r
86 } //-- boolean equals(java.lang.Object)
\r
89 * Returns the value of field 'onto'. The field 'onto' has the
\r
90 * following description: object to which the mapping is being
\r
95 * @return the value of field 'onto'.
\r
97 public java.lang.Object getOnto()
\r
100 } //-- java.lang.Object getOnto()
\r
109 public boolean isValid()
\r
114 catch (org.exolab.castor.xml.ValidationException vex) {
\r
118 } //-- boolean isValid()
\r
127 public void marshal(java.io.Writer out)
\r
128 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
\r
131 Marshaller.marshal(this, out);
\r
132 } //-- void marshal(java.io.Writer)
\r
141 public void marshal(org.xml.sax.ContentHandler handler)
\r
142 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
\r
145 Marshaller.marshal(this, handler);
\r
146 } //-- void marshal(org.xml.sax.ContentHandler)
\r
149 * Sets the value of field 'onto'. The field 'onto' has the
\r
150 * following description: object to which the mapping is being
\r
154 * @param onto the value of field 'onto'.
\r
156 public void setOnto(java.lang.Object onto)
\r
159 } //-- void setOnto(java.lang.Object)
\r
169 public static uk.ac.vamsas.objects.core.MapList unmarshal(java.io.Reader reader)
\r
170 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
\r
172 return (uk.ac.vamsas.objects.core.Mapping) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.Mapping.class, reader);
\r
173 } //-- uk.ac.vamsas.objects.core.MapList unmarshal(java.io.Reader)
\r
179 public void validate()
\r
180 throws org.exolab.castor.xml.ValidationException
\r
182 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
\r
183 validator.validate(this);
\r
184 } //-- void validate()
\r