b187a92d790f928aa9b93da14aa9dd66556632d1
[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 0.9.9M2</a>, using an XML
4  * Schema.
5  * $Id:LockFile.java 264 2006-12-14 17:42:54Z JimP $
6  */
7
8 package uk.ac.vamsas.objects.core;
9
10   //---------------------------------/
11  //- Imported classes and packages -/
12 //---------------------------------/
13
14 import java.io.IOException;
15 import java.io.Reader;
16 import java.io.Serializable;
17 import java.io.Writer;
18 import org.exolab.castor.xml.MarshalException;
19 import org.exolab.castor.xml.Marshaller;
20 import org.exolab.castor.xml.Unmarshaller;
21 import org.exolab.castor.xml.ValidationException;
22 import org.xml.sax.ContentHandler;
23
24 /**
25  * Class LockFile.
26  * 
27  * @version $Revision:264 $ $Date:2006-12-14 17:42:54 +0000 (Thu, 14 Dec 2006) $
28  */
29 public class LockFile extends uk.ac.vamsas.client.Vobject 
30 implements java.io.Serializable
31 {
32
33
34       //--------------------------/
35      //- Class/Member Variables -/
36     //--------------------------/
37
38     /**
39      * internal content storage
40      */
41     private java.lang.String _content = "";
42
43
44       //----------------/
45      //- Constructors -/
46     //----------------/
47
48     public LockFile() 
49      {
50         super();
51         setContent("");
52     } //-- uk.ac.vamsas.objects.core.LockFile()
53
54
55       //-----------/
56      //- Methods -/
57     //-----------/
58
59     /**
60      * Note: hashCode() has not been overriden
61      * 
62      * @param obj
63      * @return boolean
64      */
65     public boolean equals(java.lang.Object obj)
66     {
67         if ( this == obj )
68             return true;
69         
70         if (super.equals(obj)==false)
71             return false;
72         
73         if (obj instanceof LockFile) {
74         
75             LockFile temp = (LockFile)obj;
76             if (this._content != null) {
77                 if (temp._content == null) return false;
78                 else if (!(this._content.equals(temp._content))) 
79                     return false;
80             }
81             else if (temp._content != null)
82                 return false;
83             return true;
84         }
85         return false;
86     } //-- boolean equals(java.lang.Object) 
87
88     /**
89      * Returns the value of field 'content'. The field 'content'
90      * has the following description: internal content storage
91      * 
92      * @return String
93      * @return the value of field 'content'.
94      */
95     public java.lang.String getContent()
96     {
97         return this._content;
98     } //-- java.lang.String getContent() 
99
100     /**
101      * Method isValid
102      * 
103      * 
104      * 
105      * @return boolean
106      */
107     public boolean isValid()
108     {
109         try {
110             validate();
111         }
112         catch (org.exolab.castor.xml.ValidationException vex) {
113             return false;
114         }
115         return true;
116     } //-- boolean isValid() 
117
118     /**
119      * Method marshal
120      * 
121      * 
122      * 
123      * @param out
124      */
125     public void marshal(java.io.Writer out)
126         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
127     {
128         
129         Marshaller.marshal(this, out);
130     } //-- void marshal(java.io.Writer) 
131
132     /**
133      * Method marshal
134      * 
135      * 
136      * 
137      * @param handler
138      */
139     public void marshal(org.xml.sax.ContentHandler handler)
140         throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
141     {
142         
143         Marshaller.marshal(this, handler);
144     } //-- void marshal(org.xml.sax.ContentHandler) 
145
146     /**
147      * Sets the value of field 'content'. The field 'content' has
148      * the following description: internal content storage
149      * 
150      * @param content the value of field 'content'.
151      */
152     public void setContent(java.lang.String content)
153     {
154         this._content = content;
155     } //-- void setContent(java.lang.String) 
156
157     /**
158      * Method unmarshal
159      * 
160      * 
161      * 
162      * @param reader
163      * @return LockFile
164      */
165     public static uk.ac.vamsas.objects.core.LockFile unmarshal(java.io.Reader reader)
166         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
167     {
168         return (uk.ac.vamsas.objects.core.LockFile) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.LockFile.class, reader);
169     } //-- uk.ac.vamsas.objects.core.LockFile unmarshal(java.io.Reader) 
170
171     /**
172      * Method validate
173      * 
174      */
175     public void validate()
176         throws org.exolab.castor.xml.ValidationException
177     {
178         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
179         validator.validate(this);
180     } //-- void validate() 
181
182 }