KickJava   Java API By Example, From Geeks To Geeks.

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


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: PropertiesFileDescriptor.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 org.exolab.castor.mapping.AccessMode;
15 import org.exolab.castor.xml.TypeValidator;
16 import org.exolab.castor.xml.XMLFieldDescriptor;
17 import org.exolab.castor.xml.validators.*;
18
19 /**
20  * Class PropertiesFileDescriptor.
21  *
22  * @version $Revision: 1105 $ $Date: 2004-03-30 16:45:22 -0800 (Tue, 30 Mar 2004) $
23  */

24 public class PropertiesFileDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl {
25
26
27       //--------------------------/
28
//- Class/Member Variables -/
29
//--------------------------/
30

31     /**
32      * Field nsPrefix
33      */

34     private java.lang.String JavaDoc nsPrefix;
35
36     /**
37      * Field nsURI
38      */

39     private java.lang.String JavaDoc nsURI;
40
41     /**
42      * Field xmlName
43      */

44     private java.lang.String JavaDoc xmlName;
45
46     /**
47      * Field identity
48      */

49     private org.exolab.castor.xml.XMLFieldDescriptor identity;
50
51
52       //----------------/
53
//- Constructors -/
54
//----------------/
55

56     public PropertiesFileDescriptor() {
57         super();
58         nsURI = "http://www.openejb.org/Service/Configuration";
59         xmlName = "properties-file";
60         org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
61         org.exolab.castor.xml.XMLFieldHandler handler = null;
62         org.exolab.castor.xml.FieldValidator fieldValidator = null;
63         //-- initialize attribute descriptors
64

65         //-- _file
66
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String JavaDoc.class, "_file", "file", org.exolab.castor.xml.NodeType.Attribute);
67         desc.setImmutable(true);
68         handler = (new org.exolab.castor.xml.XMLFieldHandler() {
69             public java.lang.Object JavaDoc getValue( java.lang.Object JavaDoc object )
70                 throws IllegalStateException JavaDoc
71             {
72                 PropertiesFile target = (PropertiesFile) object;
73                 return target.getFile();
74             }
75             public void setValue( java.lang.Object JavaDoc object, java.lang.Object JavaDoc value)
76                 throws IllegalStateException JavaDoc, IllegalArgumentException JavaDoc
77             {
78                 try {
79                     PropertiesFile target = (PropertiesFile) object;
80                     target.setFile( (java.lang.String JavaDoc) value);
81                 }
82                 catch (java.lang.Exception JavaDoc ex) {
83                     throw new IllegalStateException JavaDoc(ex.toString());
84                 }
85             }
86             public java.lang.Object JavaDoc newInstance( java.lang.Object JavaDoc parent ) {
87                 return null;
88             }
89         } );
90         desc.setHandler(handler);
91         desc.setRequired(true);
92         addFieldDescriptor(desc);
93         
94         //-- validation code for: _file
95
fieldValidator = new org.exolab.castor.xml.FieldValidator();
96         fieldValidator.setMinOccurs(1);
97         { //-- local scope
98
StringValidator typeValidator = new StringValidator();
99             typeValidator.setWhiteSpace("preserve");
100             fieldValidator.setValidator(typeValidator);
101         }
102         desc.setValidator(fieldValidator);
103         //-- initialize element descriptors
104

105     } //-- org.openejb.alt.config.sys.PropertiesFileDescriptor()
106

107
108       //-----------/
109
//- Methods -/
110
//-----------/
111

112     /**
113      * Method getAccessMode
114      */

115     public org.exolab.castor.mapping.AccessMode getAccessMode()
116     {
117         return null;
118     } //-- org.exolab.castor.mapping.AccessMode getAccessMode()
119

120     /**
121      * Method getExtends
122      */

123     public org.exolab.castor.mapping.ClassDescriptor getExtends()
124     {
125         return null;
126     } //-- org.exolab.castor.mapping.ClassDescriptor getExtends()
127

128     /**
129      * Method getIdentity
130      */

131     public org.exolab.castor.mapping.FieldDescriptor getIdentity()
132     {
133         return identity;
134     } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity()
135

136     /**
137      * Method getJavaClass
138      */

139     public java.lang.Class JavaDoc getJavaClass()
140     {
141         return org.openejb.alt.config.sys.PropertiesFile.class;
142     } //-- java.lang.Class getJavaClass()
143

144     /**
145      * Method getNameSpacePrefix
146      */

147     public java.lang.String JavaDoc getNameSpacePrefix()
148     {
149         return nsPrefix;
150     } //-- java.lang.String getNameSpacePrefix()
151

152     /**
153      * Method getNameSpaceURI
154      */

155     public java.lang.String JavaDoc getNameSpaceURI()
156     {
157         return nsURI;
158     } //-- java.lang.String getNameSpaceURI()
159

160     /**
161      * Method getValidator
162      */

163     public org.exolab.castor.xml.TypeValidator getValidator()
164     {
165         return this;
166     } //-- org.exolab.castor.xml.TypeValidator getValidator()
167

168     /**
169      * Method getXMLName
170      */

171     public java.lang.String JavaDoc getXMLName()
172     {
173         return xmlName;
174     } //-- java.lang.String getXMLName()
175

176 }
177
Popular Tags