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 Input extends uk.ac.vamsas.objects.core.RangeType
\r
23 implements java.io.Serializable
\r
27 //--------------------------/
\r
28 //- Class/Member Variables -/
\r
29 //--------------------------/
\r
34 private java.lang.String _name;
\r
37 * Reference Frame for rangeType specfication
\r
40 private java.lang.Object _objRef;
\r
57 * Overrides the java.lang.Object.equals method.
\r
60 * @return true if the objects are equal.
\r
62 public boolean equals(
\r
63 final java.lang.Object obj) {
\r
67 if (super.equals(obj)==false)
\r
70 if (obj instanceof Input) {
\r
72 Input temp = (Input)obj;
\r
73 if (this._name != null) {
\r
74 if (temp._name == null) return false;
\r
75 else if (!(this._name.equals(temp._name)))
\r
78 else if (temp._name != null)
\r
80 if (this._objRef != null) {
\r
81 if (temp._objRef == null) return false;
\r
82 else if (!(this._objRef.equals(temp._objRef)))
\r
85 else if (temp._objRef != null)
\r
93 * Returns the value of field 'name'.
\r
95 * @return the value of field 'Name'.
\r
97 public java.lang.String getName(
\r
103 * Returns the value of field 'objRef'. The field 'objRef' has
\r
104 * the following description: Reference Frame for rangeType
\r
108 * @return the value of field 'ObjRef'.
\r
110 public java.lang.Object getObjRef(
\r
112 return this._objRef;
\r
116 * Overrides the java.lang.Object.hashCode method.
\r
118 * The following steps came from <b>Effective Java Programming
\r
119 * Language Guide</b> by Joshua Bloch, Chapter 3
\r
121 * @return a hash code value for the object.
\r
123 public int hashCode(
\r
125 int result = super.hashCode();
\r
128 if (_name != null) {
\r
129 result = 37 * result + _name.hashCode();
\r
131 if (_objRef != null) {
\r
132 result = 37 * result + _objRef.hashCode();
\r
141 * @return true if this object is valid according to the schema
\r
143 public boolean isValid(
\r
147 } catch (org.exolab.castor.xml.ValidationException vex) {
\r
157 * @throws org.exolab.castor.xml.MarshalException if object is
\r
158 * null or if any SAXException is thrown during marshaling
\r
159 * @throws org.exolab.castor.xml.ValidationException if this
\r
160 * object is an invalid instance according to the schema
\r
162 public void marshal(
\r
163 final java.io.Writer out)
\r
164 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
\r
165 Marshaller.marshal(this, out);
\r
172 * @throws java.io.IOException if an IOException occurs during
\r
174 * @throws org.exolab.castor.xml.ValidationException if this
\r
175 * object is an invalid instance according to the schema
\r
176 * @throws org.exolab.castor.xml.MarshalException if object is
\r
177 * null or if any SAXException is thrown during marshaling
\r
179 public void marshal(
\r
180 final org.xml.sax.ContentHandler handler)
\r
181 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
\r
182 Marshaller.marshal(this, handler);
\r
186 * Sets the value of field 'name'.
\r
188 * @param name the value of field 'name'.
\r
190 public void setName(
\r
191 final java.lang.String name) {
\r
196 * Sets the value of field 'objRef'. The field 'objRef' has the
\r
197 * following description: Reference Frame for rangeType
\r
201 * @param objRef the value of field 'objRef'.
\r
203 public void setObjRef(
\r
204 final java.lang.Object objRef) {
\r
205 this._objRef = objRef;
\r
209 * Method unmarshal.
\r
212 * @throws org.exolab.castor.xml.MarshalException if object is
\r
213 * null or if any SAXException is thrown during marshaling
\r
214 * @throws org.exolab.castor.xml.ValidationException if this
\r
215 * object is an invalid instance according to the schema
\r
216 * @return the unmarshaled uk.ac.vamsas.objects.core.RangeType
\r
218 public static uk.ac.vamsas.objects.core.RangeType unmarshal(
\r
219 final java.io.Reader reader)
\r
220 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
\r
221 return (uk.ac.vamsas.objects.core.RangeType) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.Input.class, reader);
\r
227 * @throws org.exolab.castor.xml.ValidationException if this
\r
228 * object is an invalid instance according to the schema
\r
230 public void validate(
\r
232 throws org.exolab.castor.xml.ValidationException {
\r
233 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
\r
234 validator.validate(this);
\r