Source code: org/enableit/db/daf/conf/Castor.java
1 /*
2 * This class was automatically generated with
3 * <a href="http://castor.exolab.org">Castor 0.9.3.9+</a>, using an
4 * XML Schema.
5 * $Id: Castor.java,v 1.1 2002/05/03 13:44:49 anoncvs Exp $
6 */
7
8 package org.enableit.db.daf.conf;
9
10 //---------------------------------/
11 //- Imported classes and packages -/
12 //---------------------------------/
13
14 import java.io.Reader;
15 import java.io.Serializable;
16 import java.io.Writer;
17 import org.exolab.castor.xml.*;
18 import org.exolab.castor.xml.MarshalException;
19 import org.exolab.castor.xml.ValidationException;
20 import org.xml.sax.DocumentHandler;
21
22 /**
23 *
24 * @version $Revision: 1.1 $ $Date: 2002/05/03 13:44:49 $
25 **/
26 public class Castor implements java.io.Serializable {
27
28
29 //--------------------------/
30 //- Class/Member Variables -/
31 //--------------------------/
32
33 private java.lang.String _database;
34
35
36 //----------------/
37 //- Constructors -/
38 //----------------/
39
40 public Castor() {
41 super();
42 } //-- org.enableit.db.daf.conf.Castor()
43
44
45 //-----------/
46 //- Methods -/
47 //-----------/
48
49 /**
50 * Returns the value of field 'database'.
51 * @return the value of field 'database'.
52 **/
53 public java.lang.String getDatabase()
54 {
55 return this._database;
56 } //-- java.lang.String getDatabase()
57
58 /**
59 **/
60 public boolean isValid()
61 {
62 try {
63 validate();
64 }
65 catch (org.exolab.castor.xml.ValidationException vex) {
66 return false;
67 }
68 return true;
69 } //-- boolean isValid()
70
71 /**
72 *
73 * @param out
74 **/
75 public void marshal(java.io.Writer out)
76 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
77 {
78
79 Marshaller.marshal(this, out);
80 } //-- void marshal(java.io.Writer)
81
82 /**
83 *
84 * @param handler
85 **/
86 public void marshal(org.xml.sax.DocumentHandler handler)
87 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
88 {
89
90 Marshaller.marshal(this, handler);
91 } //-- void marshal(org.xml.sax.DocumentHandler)
92
93 /**
94 * Sets the value of field 'database'.
95 * @param database the value of field 'database'.
96 **/
97 public void setDatabase(java.lang.String database)
98 {
99 this._database = database;
100 } //-- void setDatabase(java.lang.String)
101
102 /**
103 *
104 * @param reader
105 **/
106 public static org.enableit.db.daf.conf.Castor unmarshal(java.io.Reader reader)
107 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
108 {
109 return (org.enableit.db.daf.conf.Castor) Unmarshaller.unmarshal(org.enableit.db.daf.conf.Castor.class, reader);
110 } //-- org.enableit.db.daf.conf.Castor unmarshal(java.io.Reader)
111
112 /**
113 **/
114 public void validate()
115 throws org.exolab.castor.xml.ValidationException
116 {
117 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
118 validator.validate(this);
119 } //-- void validate()
120
121 }