2 * This class was automatically generated with
3 * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
8 package uk.ac.vamsas.objects.core;
10 //---------------------------------/
11 //- Imported classes and packages -/
12 //---------------------------------/
14 import org.exolab.castor.xml.Marshaller;
15 import org.exolab.castor.xml.Unmarshaller;
20 * @version $Revision$ $Date$
22 public class LockFile extends uk.ac.vamsas.client.Vobject
23 implements java.io.Serializable
27 //--------------------------/
28 //- Class/Member Variables -/
29 //--------------------------/
32 * internal content storage
34 private java.lang.String _content = "";
52 * Overrides the java.lang.Object.equals method.
55 * @return true if the objects are equal.
57 public boolean equals(
58 final java.lang.Object obj) {
62 if (super.equals(obj)==false)
65 if (obj instanceof LockFile) {
67 LockFile temp = (LockFile)obj;
68 if (this._content != null) {
69 if (temp._content == null) return false;
70 else if (!(this._content.equals(temp._content)))
73 else if (temp._content != null)
81 * Returns the value of field 'content'. The field 'content'
82 * has the following description: internal content storage
84 * @return the value of field 'Content'.
86 public java.lang.String getContent(
92 * Overrides the java.lang.Object.hashCode method.
94 * The following steps came from <b>Effective Java Programming
95 * Language Guide</b> by Joshua Bloch, Chapter 3
97 * @return a hash code value for the object.
101 int result = super.hashCode();
104 if (_content != null) {
105 result = 37 * result + _content.hashCode();
114 * @return true if this object is valid according to the schema
116 public boolean isValid(
120 } catch (org.exolab.castor.xml.ValidationException vex) {
130 * @throws org.exolab.castor.xml.MarshalException if object is
131 * null or if any SAXException is thrown during marshaling
132 * @throws org.exolab.castor.xml.ValidationException if this
133 * object is an invalid instance according to the schema
136 final java.io.Writer out)
137 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
138 Marshaller.marshal(this, out);
145 * @throws java.io.IOException if an IOException occurs during
147 * @throws org.exolab.castor.xml.ValidationException if this
148 * object is an invalid instance according to the schema
149 * @throws org.exolab.castor.xml.MarshalException if object is
150 * null or if any SAXException is thrown during marshaling
153 final org.xml.sax.ContentHandler handler)
154 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
155 Marshaller.marshal(this, handler);
159 * Sets the value of field 'content'. The field 'content' has
160 * the following description: internal content storage
162 * @param content the value of field 'content'.
164 public void setContent(
165 final java.lang.String content) {
166 this._content = content;
173 * @throws org.exolab.castor.xml.MarshalException if object is
174 * null or if any SAXException is thrown during marshaling
175 * @throws org.exolab.castor.xml.ValidationException if this
176 * object is an invalid instance according to the schema
177 * @return the unmarshaled uk.ac.vamsas.objects.core.LockFile
179 public static uk.ac.vamsas.objects.core.LockFile unmarshal(
180 final java.io.Reader reader)
181 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
182 return (uk.ac.vamsas.objects.core.LockFile) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.LockFile.class, reader);
188 * @throws org.exolab.castor.xml.ValidationException if this
189 * object is an invalid instance according to the schema
191 public void validate(
193 throws org.exolab.castor.xml.ValidationException {
194 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
195 validator.validate(this);