rebult for castor-1.1(vamsas version)
[vamsas.git] / src / uk / ac / vamsas / objects / core / LockFile.java
1 /*
2  * This class was automatically generated with 
3  * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
4  * Schema.
5  * $Id$
6  */
7
8 package uk.ac.vamsas.objects.core;
9
10   //---------------------------------/
11  //- Imported classes and packages -/
12 //---------------------------------/
13
14 import org.exolab.castor.xml.Marshaller;
15 import org.exolab.castor.xml.Unmarshaller;
16
17 /**
18  * Class LockFile.
19  * 
20  * @version $Revision$ $Date$
21  */
22 public class LockFile extends uk.ac.vamsas.client.Vobject 
23 implements java.io.Serializable
24 {
25
26
27       //--------------------------/
28      //- Class/Member Variables -/
29     //--------------------------/
30
31     /**
32      * internal content storage
33      */
34     private java.lang.String _content = "";
35
36
37       //----------------/
38      //- Constructors -/
39     //----------------/
40
41     public LockFile() {
42         super();
43         setContent("");
44     }
45
46
47       //-----------/
48      //- Methods -/
49     //-----------/
50
51     /**
52      * Overrides the java.lang.Object.equals method.
53      * 
54      * @param obj
55      * @return true if the objects are equal.
56      */
57     public boolean equals(
58             final java.lang.Object obj) {
59         if ( this == obj )
60             return true;
61         
62         if (super.equals(obj)==false)
63             return false;
64         
65         if (obj instanceof LockFile) {
66         
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))) 
71                     return false;
72             }
73             else if (temp._content != null)
74                 return false;
75             return true;
76         }
77         return false;
78     }
79
80     /**
81      * Returns the value of field 'content'. The field 'content'
82      * has the following description: internal content storage
83      * 
84      * @return the value of field 'Content'.
85      */
86     public java.lang.String getContent(
87     ) {
88         return this._content;
89     }
90
91     /**
92      * Overrides the java.lang.Object.hashCode method.
93      * <p>
94      * The following steps came from <b>Effective Java Programming
95      * Language Guide</b> by Joshua Bloch, Chapter 3
96      * 
97      * @return a hash code value for the object.
98      */
99     public int hashCode(
100     ) {
101         int result = super.hashCode();
102         
103         long tmp;
104         if (_content != null) {
105            result = 37 * result + _content.hashCode();
106         }
107         
108         return result;
109     }
110
111     /**
112      * Method isValid.
113      * 
114      * @return true if this object is valid according to the schema
115      */
116     public boolean isValid(
117     ) {
118         try {
119             validate();
120         } catch (org.exolab.castor.xml.ValidationException vex) {
121             return false;
122         }
123         return true;
124     }
125
126     /**
127      * 
128      * 
129      * @param out
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
134      */
135     public void marshal(
136             final java.io.Writer out)
137     throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
138         Marshaller.marshal(this, out);
139     }
140
141     /**
142      * 
143      * 
144      * @param handler
145      * @throws java.io.IOException if an IOException occurs during
146      * marshaling
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
151      */
152     public void marshal(
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);
156     }
157
158     /**
159      * Sets the value of field 'content'. The field 'content' has
160      * the following description: internal content storage
161      * 
162      * @param content the value of field 'content'.
163      */
164     public void setContent(
165             final java.lang.String content) {
166         this._content = content;
167     }
168
169     /**
170      * Method unmarshal.
171      * 
172      * @param reader
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
178      */
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);
183     }
184
185     /**
186      * 
187      * 
188      * @throws org.exolab.castor.xml.ValidationException if this
189      * object is an invalid instance according to the schema
190      */
191     public void validate(
192     )
193     throws org.exolab.castor.xml.ValidationException {
194         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
195         validator.validate(this);
196     }
197
198 }