autogenerated java classes for current schema
[vamsas.git] / src / org / vamsas / objects / core / Property.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$
6  */
7
8 package org.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 Property.
26  * 
27  * @version $Revision$ $Date$
28  */
29 public class Property extends org.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      * Field _name
45      */
46     private java.lang.String _name;
47
48     /**
49      * The type specifies how the property will
50      *  be parsed. Empty property strings are
51      *  allowed, and can be used to prototype
52      *  the input to a document. TODO: specify
53      *  allowed types
54      *  
55      */
56     private java.lang.String _type;
57
58
59       //----------------/
60      //- Constructors -/
61     //----------------/
62
63     public Property() 
64      {
65         super();
66         setContent("");
67     } //-- org.vamsas.objects.core.Property()
68
69
70       //-----------/
71      //- Methods -/
72     //-----------/
73
74     /**
75      * Note: hashCode() has not been overriden
76      * 
77      * @param obj
78      * @return boolean
79      */
80     public boolean equals(java.lang.Object obj)
81     {
82         if ( this == obj )
83             return true;
84         
85         if (super.equals(obj)==false)
86             return false;
87         
88         if (obj instanceof Property) {
89         
90             Property temp = (Property)obj;
91             if (this._content != null) {
92                 if (temp._content == null) return false;
93                 else if (!(this._content.equals(temp._content))) 
94                     return false;
95             }
96             else if (temp._content != null)
97                 return false;
98             if (this._name != null) {
99                 if (temp._name == null) return false;
100                 else if (!(this._name.equals(temp._name))) 
101                     return false;
102             }
103             else if (temp._name != null)
104                 return false;
105             if (this._type != null) {
106                 if (temp._type == null) return false;
107                 else if (!(this._type.equals(temp._type))) 
108                     return false;
109             }
110             else if (temp._type != null)
111                 return false;
112             return true;
113         }
114         return false;
115     } //-- boolean equals(java.lang.Object) 
116
117     /**
118      * Returns the value of field 'content'. The field 'content'
119      * has the following description: internal content storage
120      * 
121      * @return String
122      * @return the value of field 'content'.
123      */
124     public java.lang.String getContent()
125     {
126         return this._content;
127     } //-- java.lang.String getContent() 
128
129     /**
130      * Returns the value of field 'name'.
131      * 
132      * @return String
133      * @return the value of field 'name'.
134      */
135     public java.lang.String getName()
136     {
137         return this._name;
138     } //-- java.lang.String getName() 
139
140     /**
141      * Returns the value of field 'type'. The field 'type' has the
142      * following description: The type specifies how the property
143      * will
144      *  be parsed. Empty property strings are
145      *  allowed, and can be used to prototype
146      *  the input to a document. TODO: specify
147      *  allowed types
148      *  
149      * 
150      * @return String
151      * @return the value of field 'type'.
152      */
153     public java.lang.String getType()
154     {
155         return this._type;
156     } //-- java.lang.String getType() 
157
158     /**
159      * Method isValid
160      * 
161      * 
162      * 
163      * @return boolean
164      */
165     public boolean isValid()
166     {
167         try {
168             validate();
169         }
170         catch (org.exolab.castor.xml.ValidationException vex) {
171             return false;
172         }
173         return true;
174     } //-- boolean isValid() 
175
176     /**
177      * Method marshal
178      * 
179      * 
180      * 
181      * @param out
182      */
183     public void marshal(java.io.Writer out)
184         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
185     {
186         
187         Marshaller.marshal(this, out);
188     } //-- void marshal(java.io.Writer) 
189
190     /**
191      * Method marshal
192      * 
193      * 
194      * 
195      * @param handler
196      */
197     public void marshal(org.xml.sax.ContentHandler handler)
198         throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
199     {
200         
201         Marshaller.marshal(this, handler);
202     } //-- void marshal(org.xml.sax.ContentHandler) 
203
204     /**
205      * Sets the value of field 'content'. The field 'content' has
206      * the following description: internal content storage
207      * 
208      * @param content the value of field 'content'.
209      */
210     public void setContent(java.lang.String content)
211     {
212         this._content = content;
213     } //-- void setContent(java.lang.String) 
214
215     /**
216      * Sets the value of field 'name'.
217      * 
218      * @param name the value of field 'name'.
219      */
220     public void setName(java.lang.String name)
221     {
222         this._name = name;
223     } //-- void setName(java.lang.String) 
224
225     /**
226      * Sets the value of field 'type'. The field 'type' has the
227      * following description: The type specifies how the property
228      * will
229      *  be parsed. Empty property strings are
230      *  allowed, and can be used to prototype
231      *  the input to a document. TODO: specify
232      *  allowed types
233      *  
234      * 
235      * @param type the value of field 'type'.
236      */
237     public void setType(java.lang.String type)
238     {
239         this._type = type;
240     } //-- void setType(java.lang.String) 
241
242     /**
243      * Method unmarshal
244      * 
245      * 
246      * 
247      * @param reader
248      * @return Property
249      */
250     public static org.vamsas.objects.core.Property unmarshal(java.io.Reader reader)
251         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
252     {
253         return (org.vamsas.objects.core.Property) Unmarshaller.unmarshal(org.vamsas.objects.core.Property.class, reader);
254     } //-- org.vamsas.objects.core.Property unmarshal(java.io.Reader) 
255
256     /**
257      * Method validate
258      * 
259      */
260     public void validate()
261         throws org.exolab.castor.xml.ValidationException
262     {
263         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
264         validator.validate(this);
265     } //-- void validate() 
266
267 }