KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > openejb > alt > config > sys > PropertiesFile


1 /*
2  * This class was automatically generated with
3  * <a HREF="http://www.castor.org">Castor 0.9.5.3</a>, using an XML
4  * Schema.
5  * $Id: PropertiesFile.java 1105 2004-03-31 00:45:22Z dblevins $
6  */

7
8 package org.openejb.alt.config.sys;
9
10   //---------------------------------/
11
//- Imported classes and packages -/
12
//---------------------------------/
13

14 import java.io.IOException JavaDoc;
15 import java.io.Reader JavaDoc;
16 import java.io.Serializable JavaDoc;
17 import java.io.Writer JavaDoc;
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 JavaDoc;
23
24 /**
25  * Class PropertiesFile.
26  *
27  * @version $Revision: 1105 $ $Date: 2004-03-30 16:45:22 -0800 (Tue, 30 Mar 2004) $
28  */

29 public class PropertiesFile implements java.io.Serializable JavaDoc {
30
31
32       //--------------------------/
33
//- Class/Member Variables -/
34
//--------------------------/
35

36     /**
37      * Field _file
38      */

39     private java.lang.String JavaDoc _file;
40
41
42       //----------------/
43
//- Constructors -/
44
//----------------/
45

46     public PropertiesFile() {
47         super();
48     } //-- org.openejb.alt.config.sys.PropertiesFile()
49

50
51       //-----------/
52
//- Methods -/
53
//-----------/
54

55     /**
56      * Returns the value of field 'file'.
57      *
58      * @return the value of field 'file'.
59      */

60     public java.lang.String JavaDoc getFile()
61     {
62         return this._file;
63     } //-- java.lang.String getFile()
64

65     /**
66      * Method isValid
67      */

68     public boolean isValid()
69     {
70         try {
71             validate();
72         }
73         catch (org.exolab.castor.xml.ValidationException vex) {
74             return false;
75         }
76         return true;
77     } //-- boolean isValid()
78

79     /**
80      * Method marshal
81      *
82      * @param out
83      */

84     public void marshal(java.io.Writer JavaDoc out)
85         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
86     {
87         
88         Marshaller.marshal(this, out);
89     } //-- void marshal(java.io.Writer)
90

91     /**
92      * Method marshal
93      *
94      * @param handler
95      */

96     public void marshal(org.xml.sax.ContentHandler JavaDoc handler)
97         throws java.io.IOException JavaDoc, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
98     {
99         
100         Marshaller.marshal(this, handler);
101     } //-- void marshal(org.xml.sax.ContentHandler)
102

103     /**
104      * Sets the value of field 'file'.
105      *
106      * @param file the value of field 'file'.
107      */

108     public void setFile(java.lang.String JavaDoc file)
109     {
110         this._file = file;
111     } //-- void setFile(java.lang.String)
112

113     /**
114      * Method unmarshal
115      *
116      * @param reader
117      */

118     public static java.lang.Object JavaDoc unmarshal(java.io.Reader JavaDoc reader)
119         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
120     {
121         return (org.openejb.alt.config.sys.PropertiesFile) Unmarshaller.unmarshal(org.openejb.alt.config.sys.PropertiesFile.class, reader);
122     } //-- java.lang.Object unmarshal(java.io.Reader)
123

124     /**
125      * Method validate
126      */

127     public void validate()
128         throws org.exolab.castor.xml.ValidationException
129     {
130         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
131         validator.validate(this);
132     } //-- void validate()
133

134 }
135
Popular Tags