root / trunk / frameworks / _fwAndami / src / com / iver / andami / persistence / generate / PropertyDescriptor.java @ 598
History | View | Annotate | Download (6.32 KB)
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: PropertyDescriptor.java 598 2004-12-22 10:11:38Z fernando $
|
6 |
*/
|
7 |
|
8 |
package com.iver.andami.persistence.generate; |
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 PropertyDescriptor.
|
21 |
*
|
22 |
* @version $Revision: 598 $ $Date: 2004-12-22 11:11:38 +0100 (Wed, 22 Dec 2004) $
|
23 |
*/
|
24 |
public class PropertyDescriptor 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 nsPrefix;
|
35 |
|
36 |
/**
|
37 |
* Field nsURI
|
38 |
*/
|
39 |
private java.lang.String nsURI;
|
40 |
|
41 |
/**
|
42 |
* Field xmlName
|
43 |
*/
|
44 |
private java.lang.String xmlName;
|
45 |
|
46 |
/**
|
47 |
* Field identity
|
48 |
*/
|
49 |
private org.exolab.castor.xml.XMLFieldDescriptor identity;
|
50 |
|
51 |
|
52 |
//----------------/
|
53 |
//- Constructors -/
|
54 |
//----------------/
|
55 |
|
56 |
public PropertyDescriptor() { |
57 |
super();
|
58 |
xmlName = "property";
|
59 |
org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
|
60 |
org.exolab.castor.xml.XMLFieldHandler handler = null;
|
61 |
org.exolab.castor.xml.FieldValidator fieldValidator = null;
|
62 |
//-- initialize attribute descriptors
|
63 |
|
64 |
//-- _name
|
65 |
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_name", "name", org.exolab.castor.xml.NodeType.Attribute); |
66 |
handler = (new org.exolab.castor.xml.XMLFieldHandler() {
|
67 |
public java.lang.Object getValue( java.lang.Object object )
|
68 |
throws IllegalStateException |
69 |
{ |
70 |
Property target = (Property) object; |
71 |
return target.getName();
|
72 |
} |
73 |
public void setValue( java.lang.Object object, java.lang.Object value) |
74 |
throws IllegalStateException, IllegalArgumentException |
75 |
{ |
76 |
try {
|
77 |
Property target = (Property) object; |
78 |
target.setName( (java.lang.String) value); |
79 |
} |
80 |
catch (java.lang.Exception ex) {
|
81 |
throw new IllegalStateException(ex.toString()); |
82 |
} |
83 |
} |
84 |
public java.lang.Object newInstance( java.lang.Object parent ) {
|
85 |
return new java.lang.String(); |
86 |
} |
87 |
} ); |
88 |
desc.setHandler(handler); |
89 |
desc.setRequired(true);
|
90 |
addFieldDescriptor(desc); |
91 |
|
92 |
//-- validation code for: _name
|
93 |
fieldValidator = new org.exolab.castor.xml.FieldValidator();
|
94 |
fieldValidator.setMinOccurs(1);
|
95 |
{ //-- local scope
|
96 |
NameValidator typeValidator = new NameValidator(NameValidator.NMTOKEN);
|
97 |
fieldValidator.setValidator(typeValidator); |
98 |
} |
99 |
desc.setValidator(fieldValidator); |
100 |
//-- _value
|
101 |
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_value", "value", org.exolab.castor.xml.NodeType.Attribute); |
102 |
desc.setImmutable(true);
|
103 |
handler = (new org.exolab.castor.xml.XMLFieldHandler() {
|
104 |
public java.lang.Object getValue( java.lang.Object object )
|
105 |
throws IllegalStateException |
106 |
{ |
107 |
Property target = (Property) object; |
108 |
return target.getValue();
|
109 |
} |
110 |
public void setValue( java.lang.Object object, java.lang.Object value) |
111 |
throws IllegalStateException, IllegalArgumentException |
112 |
{ |
113 |
try {
|
114 |
Property target = (Property) object; |
115 |
target.setValue( (java.lang.String) value); |
116 |
} |
117 |
catch (java.lang.Exception ex) {
|
118 |
throw new IllegalStateException(ex.toString()); |
119 |
} |
120 |
} |
121 |
public java.lang.Object newInstance( java.lang.Object parent ) {
|
122 |
return null; |
123 |
} |
124 |
} ); |
125 |
desc.setHandler(handler); |
126 |
desc.setRequired(true);
|
127 |
addFieldDescriptor(desc); |
128 |
|
129 |
//-- validation code for: _value
|
130 |
fieldValidator = new org.exolab.castor.xml.FieldValidator();
|
131 |
fieldValidator.setMinOccurs(1);
|
132 |
{ //-- local scope
|
133 |
StringValidator typeValidator = new StringValidator();
|
134 |
typeValidator.setWhiteSpace("preserve");
|
135 |
fieldValidator.setValidator(typeValidator); |
136 |
} |
137 |
desc.setValidator(fieldValidator); |
138 |
//-- initialize element descriptors
|
139 |
|
140 |
} //-- com.iver.andami.persistence.generate.PropertyDescriptor()
|
141 |
|
142 |
|
143 |
//-----------/
|
144 |
//- Methods -/
|
145 |
//-----------/
|
146 |
|
147 |
/**
|
148 |
* Method getAccessMode
|
149 |
*/
|
150 |
public org.exolab.castor.mapping.AccessMode getAccessMode()
|
151 |
{ |
152 |
return null; |
153 |
} //-- org.exolab.castor.mapping.AccessMode getAccessMode()
|
154 |
|
155 |
/**
|
156 |
* Method getExtends
|
157 |
*/
|
158 |
public org.exolab.castor.mapping.ClassDescriptor getExtends()
|
159 |
{ |
160 |
return null; |
161 |
} //-- org.exolab.castor.mapping.ClassDescriptor getExtends()
|
162 |
|
163 |
/**
|
164 |
* Method getIdentity
|
165 |
*/
|
166 |
public org.exolab.castor.mapping.FieldDescriptor getIdentity()
|
167 |
{ |
168 |
return identity;
|
169 |
} //-- org.exolab.castor.mapping.FieldDescriptor getIdentity()
|
170 |
|
171 |
/**
|
172 |
* Method getJavaClass
|
173 |
*/
|
174 |
public java.lang.Class getJavaClass()
|
175 |
{ |
176 |
return com.iver.andami.persistence.generate.Property.class;
|
177 |
} //-- java.lang.Class getJavaClass()
|
178 |
|
179 |
/**
|
180 |
* Method getNameSpacePrefix
|
181 |
*/
|
182 |
public java.lang.String getNameSpacePrefix()
|
183 |
{ |
184 |
return nsPrefix;
|
185 |
} //-- java.lang.String getNameSpacePrefix()
|
186 |
|
187 |
/**
|
188 |
* Method getNameSpaceURI
|
189 |
*/
|
190 |
public java.lang.String getNameSpaceURI()
|
191 |
{ |
192 |
return nsURI;
|
193 |
} //-- java.lang.String getNameSpaceURI()
|
194 |
|
195 |
/**
|
196 |
* Method getValidator
|
197 |
*/
|
198 |
public org.exolab.castor.xml.TypeValidator getValidator()
|
199 |
{ |
200 |
return this; |
201 |
} //-- org.exolab.castor.xml.TypeValidator getValidator()
|
202 |
|
203 |
/**
|
204 |
* Method getXMLName
|
205 |
*/
|
206 |
public java.lang.String getXMLName()
|
207 |
{ |
208 |
return xmlName;
|
209 |
} //-- java.lang.String getXMLName()
|
210 |
|
211 |
} |