root / branches / v2_0_0_prep / frameworks / _fwAndami / src / org / gvsig / andami / plugins / config / generate / IconDescriptor.java @ 38564
History | View | Annotate | Download (6.31 KB)
1 | 598 | fernando | /*
|
---|---|---|---|
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$
|
||
6 | */
|
||
7 | |||
8 | 29593 | jpiera | package org.gvsig.andami.plugins.config.generate; |
9 | 598 | fernando | |
10 | //---------------------------------/
|
||
11 | //- Imported classes and packages -/
|
||
12 | //---------------------------------/
|
||
13 | |||
14 | 15983 | vcaballero | 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 | 598 | fernando | |
19 | /**
|
||
20 | * Class IconDescriptor.
|
||
21 | *
|
||
22 | * @version $Revision$ $Date$
|
||
23 | */
|
||
24 | public class IconDescriptor 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 IconDescriptor() {
|
||
57 | super();
|
||
58 | xmlName = "icon";
|
||
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 | //-- _text
|
||
65 | desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_text", "text", org.exolab.castor.xml.NodeType.Attribute); |
||
66 | desc.setImmutable(true);
|
||
67 | handler = (new org.exolab.castor.xml.XMLFieldHandler() {
|
||
68 | public java.lang.Object getValue( java.lang.Object object )
|
||
69 | throws IllegalStateException |
||
70 | { |
||
71 | Icon target = (Icon) object; |
||
72 | return target.getText();
|
||
73 | } |
||
74 | public void setValue( java.lang.Object object, java.lang.Object value) |
||
75 | throws IllegalStateException, IllegalArgumentException |
||
76 | { |
||
77 | try {
|
||
78 | Icon target = (Icon) object; |
||
79 | target.setText( (java.lang.String) value); |
||
80 | } |
||
81 | catch (java.lang.Exception ex) {
|
||
82 | throw new IllegalStateException(ex.toString()); |
||
83 | } |
||
84 | } |
||
85 | public java.lang.Object newInstance( java.lang.Object parent ) {
|
||
86 | return null; |
||
87 | } |
||
88 | } ); |
||
89 | desc.setHandler(handler); |
||
90 | desc.setRequired(true);
|
||
91 | addFieldDescriptor(desc); |
||
92 | |||
93 | //-- validation code for: _text
|
||
94 | fieldValidator = new org.exolab.castor.xml.FieldValidator();
|
||
95 | fieldValidator.setMinOccurs(1);
|
||
96 | { //-- local scope
|
||
97 | StringValidator typeValidator = new StringValidator();
|
||
98 | typeValidator.setWhiteSpace("preserve");
|
||
99 | fieldValidator.setValidator(typeValidator); |
||
100 | } |
||
101 | desc.setValidator(fieldValidator); |
||
102 | //-- _src
|
||
103 | desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_src", "src", org.exolab.castor.xml.NodeType.Attribute); |
||
104 | desc.setImmutable(true);
|
||
105 | handler = (new org.exolab.castor.xml.XMLFieldHandler() {
|
||
106 | public java.lang.Object getValue( java.lang.Object object )
|
||
107 | throws IllegalStateException |
||
108 | { |
||
109 | Icon target = (Icon) object; |
||
110 | return target.getSrc();
|
||
111 | } |
||
112 | public void setValue( java.lang.Object object, java.lang.Object value) |
||
113 | throws IllegalStateException, IllegalArgumentException |
||
114 | { |
||
115 | try {
|
||
116 | Icon target = (Icon) object; |
||
117 | target.setSrc( (java.lang.String) value); |
||
118 | } |
||
119 | catch (java.lang.Exception ex) {
|
||
120 | throw new IllegalStateException(ex.toString()); |
||
121 | } |
||
122 | } |
||
123 | public java.lang.Object newInstance( java.lang.Object parent ) {
|
||
124 | return null; |
||
125 | } |
||
126 | } ); |
||
127 | desc.setHandler(handler); |
||
128 | desc.setRequired(true);
|
||
129 | addFieldDescriptor(desc); |
||
130 | |||
131 | //-- validation code for: _src
|
||
132 | fieldValidator = new org.exolab.castor.xml.FieldValidator();
|
||
133 | fieldValidator.setMinOccurs(1);
|
||
134 | { //-- local scope
|
||
135 | StringValidator typeValidator = new StringValidator();
|
||
136 | typeValidator.setWhiteSpace("preserve");
|
||
137 | fieldValidator.setValidator(typeValidator); |
||
138 | } |
||
139 | desc.setValidator(fieldValidator); |
||
140 | //-- initialize element descriptors
|
||
141 | |||
142 | } //-- com.iver.andami.plugins.config.generate.IconDescriptor()
|
||
143 | |||
144 | |||
145 | //-----------/
|
||
146 | //- Methods -/
|
||
147 | //-----------/
|
||
148 | |||
149 | /**
|
||
150 | * Method getAccessMode
|
||
151 | */
|
||
152 | public org.exolab.castor.mapping.AccessMode getAccessMode()
|
||
153 | { |
||
154 | return null; |
||
155 | } //-- org.exolab.castor.mapping.AccessMode getAccessMode()
|
||
156 | |||
157 | /**
|
||
158 | * Method getExtends
|
||
159 | */
|
||
160 | public org.exolab.castor.mapping.ClassDescriptor getExtends()
|
||
161 | { |
||
162 | return null; |
||
163 | } //-- org.exolab.castor.mapping.ClassDescriptor getExtends()
|
||
164 | |||
165 | /**
|
||
166 | * Method getIdentity
|
||
167 | */
|
||
168 | public org.exolab.castor.mapping.FieldDescriptor getIdentity()
|
||
169 | { |
||
170 | return identity;
|
||
171 | } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity()
|
||
172 | |||
173 | /**
|
||
174 | * Method getJavaClass
|
||
175 | */
|
||
176 | public java.lang.Class getJavaClass()
|
||
177 | { |
||
178 | 29593 | jpiera | return org.gvsig.andami.plugins.config.generate.Icon.class;
|
179 | 598 | fernando | } //-- java.lang.Class getJavaClass()
|
180 | |||
181 | /**
|
||
182 | * Method getNameSpacePrefix
|
||
183 | */
|
||
184 | public java.lang.String getNameSpacePrefix()
|
||
185 | { |
||
186 | return nsPrefix;
|
||
187 | } //-- java.lang.String getNameSpacePrefix()
|
||
188 | |||
189 | /**
|
||
190 | * Method getNameSpaceURI
|
||
191 | */
|
||
192 | public java.lang.String getNameSpaceURI()
|
||
193 | { |
||
194 | return nsURI;
|
||
195 | } //-- java.lang.String getNameSpaceURI()
|
||
196 | |||
197 | /**
|
||
198 | * Method getValidator
|
||
199 | */
|
||
200 | public org.exolab.castor.xml.TypeValidator getValidator()
|
||
201 | { |
||
202 | return this; |
||
203 | } //-- org.exolab.castor.xml.TypeValidator getValidator()
|
||
204 | |||
205 | /**
|
||
206 | * Method getXMLName
|
||
207 | */
|
||
208 | public java.lang.String getXMLName()
|
||
209 | { |
||
210 | return xmlName;
|
||
211 | } //-- java.lang.String getXMLName()
|
||
212 | |||
213 | } |