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;
70 if (this._content != null) {
71 if (temp._content == null) return false;
72 if (this._content != temp._content) {
73 thcycle=org.castor.util.CycleBreaker.startingToCycle(this._content);
74 tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._content);
75 if (thcycle!=tmcycle) {
76 if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._content); };
77 if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._content); };
81 if (!this._content.equals(temp._content)) {
82 org.castor.util.CycleBreaker.releaseCycleHandle(this._content);
83 org.castor.util.CycleBreaker.releaseCycleHandle(temp._content);
86 org.castor.util.CycleBreaker.releaseCycleHandle(this._content);
87 org.castor.util.CycleBreaker.releaseCycleHandle(temp._content);
90 } else if (temp._content != null)
98 * Returns the value of field 'content'. The field 'content'
99 * has the following description: internal content storage
101 * @return the value of field 'Content'.
103 public java.lang.String getContent(
105 return this._content;
109 * Overrides the java.lang.Object.hashCode method.
111 * The following steps came from <b>Effective Java Programming
112 * Language Guide</b> by Joshua Bloch, Chapter 3
114 * @return a hash code value for the object.
118 int result = super.hashCode();
122 && !org.castor.util.CycleBreaker.startingToCycle(_content)) {
123 result = 37 * result + _content.hashCode();
124 org.castor.util.CycleBreaker.releaseCycleHandle(_content);
133 * @return true if this object is valid according to the schema
135 public boolean isValid(
139 } catch (org.exolab.castor.xml.ValidationException vex) {
149 * @throws org.exolab.castor.xml.MarshalException if object is
150 * null or if any SAXException is thrown during marshaling
151 * @throws org.exolab.castor.xml.ValidationException if this
152 * object is an invalid instance according to the schema
155 final java.io.Writer out)
156 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
157 Marshaller.marshal(this, out);
164 * @throws java.io.IOException if an IOException occurs during
166 * @throws org.exolab.castor.xml.ValidationException if this
167 * object is an invalid instance according to the schema
168 * @throws org.exolab.castor.xml.MarshalException if object is
169 * null or if any SAXException is thrown during marshaling
172 final org.xml.sax.ContentHandler handler)
173 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
174 Marshaller.marshal(this, handler);
178 * Sets the value of field 'content'. The field 'content' has
179 * the following description: internal content storage
181 * @param content the value of field 'content'.
183 public void setContent(
184 final java.lang.String content) {
185 this._content = content;
192 * @throws org.exolab.castor.xml.MarshalException if object is
193 * null or if any SAXException is thrown during marshaling
194 * @throws org.exolab.castor.xml.ValidationException if this
195 * object is an invalid instance according to the schema
196 * @return the unmarshaled uk.ac.vamsas.objects.core.LockFile
198 public static uk.ac.vamsas.objects.core.LockFile unmarshal(
199 final java.io.Reader reader)
200 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
201 return (uk.ac.vamsas.objects.core.LockFile) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.LockFile.class, reader);
207 * @throws org.exolab.castor.xml.ValidationException if this
208 * object is an invalid instance according to the schema
210 public void validate(
212 throws org.exolab.castor.xml.ValidationException {
213 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
214 validator.validate(this);