Statistics
| Revision:

svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.library / org.gvsig.utils / src / main / java / org / gvsig / utils / xmlEntity / generate / PropertyDescriptor.java @ 40561

History | View | Annotate | Download (8.45 KB)

1
/**
2
 * gvSIG. Desktop Geographic Information System.
3
 *
4
 * Copyright (C) 2007-2013 gvSIG Association.
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 3
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
 * MA  02110-1301, USA.
20
 *
21
 * For any additional information, do not hesitate to contact us
22
 * at info AT gvsig.com, or visit our website www.gvsig.com.
23
 */
24
/*
25
 * This class was automatically generated with 
26
 * <a href="http://www.castor.org">Castor 0.9.5.3</a>, using an XML
27
 * Schema.
28
 * $Id: PropertyDescriptor.java 29631 2009-06-29 16:56:19Z jpiera $
29
 */
30

    
31
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
32
 *
33
 * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
34
 *
35
 * This program is free software; you can redistribute it and/or
36
 * modify it under the terms of the GNU General Public License
37
 * as published by the Free Software Foundation; either version 2
38
 * of the License, or (at your option) any later version.
39
 *
40
 * This program is distributed in the hope that it will be useful,
41
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
42
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
43
 * GNU General Public License for more details.
44
 *
45
 * You should have received a copy of the GNU General Public License
46
 * along with this program; if not, write to the Free Software
47
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
48
 *
49
 * For more information, contact:
50
 *
51
 *  Generalitat Valenciana
52
 *   Conselleria d'Infraestructures i Transport
53
 *   Av. Blasco Ib??ez, 50
54
 *   46010 VALENCIA
55
 *   SPAIN
56
 *
57
 *      +34 963862235
58
 *   gvsig@gva.es
59
 *      www.gvsig.gva.es
60
 *
61
 *    or
62
 *
63
 *   IVER T.I. S.A
64
 *   Salamanca 50
65
 *   46005 Valencia
66
 *   Spain
67
 *
68
 *   +34 963163400
69
 *   dac@iver.es
70
 */
71
package org.gvsig.utils.xmlEntity.generate;
72

    
73
  //---------------------------------/
74
 //- Imported classes and packages -/
75
//---------------------------------/
76

    
77
import org.exolab.castor.xml.validators.StringValidator;
78

    
79
/**
80
 * Class PropertyDescriptor.
81
 * 
82
 * @version $Revision: 29631 $ $Date: 2009-06-29 18:56:19 +0200 (lun, 29 jun 2009) $
83
 */
84
public class PropertyDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl {
85

    
86

    
87
      //--------------------------/
88
     //- Class/Member Variables -/
89
    //--------------------------/
90

    
91
    /**
92
     * Field nsPrefix
93
     */
94
    private java.lang.String nsPrefix;
95

    
96
    /**
97
     * Field nsURI
98
     */
99
    private java.lang.String nsURI;
100

    
101
    /**
102
     * Field xmlName
103
     */
104
    private java.lang.String xmlName;
105

    
106
    /**
107
     * Field identity
108
     */
109
    private org.exolab.castor.xml.XMLFieldDescriptor identity;
110

    
111

    
112
      //----------------/
113
     //- Constructors -/
114
    //----------------/
115

    
116
    public PropertyDescriptor() {
117
        super();
118
        nsURI = "http://www.gvsig.gva.es";
119
        xmlName = "property";
120
        org.exolab.castor.xml.util.XMLFieldDescriptorImpl  desc           = null;
121
        org.exolab.castor.xml.XMLFieldHandler              handler        = null;
122
        org.exolab.castor.xml.FieldValidator               fieldValidator = null;
123
        //-- initialize attribute descriptors
124
        
125
        //-- _key
126
        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_key", "key", org.exolab.castor.xml.NodeType.Attribute);
127
        desc.setImmutable(true);
128
        handler = (new org.exolab.castor.xml.XMLFieldHandler() {
129
            public java.lang.Object getValue( java.lang.Object object ) 
130
                throws IllegalStateException
131
            {
132
                Property target = (Property) object;
133
                return target.getKey();
134
            }
135
            public void setValue( java.lang.Object object, java.lang.Object value) 
136
                throws IllegalStateException, IllegalArgumentException
137
            {
138
                try {
139
                    Property target = (Property) object;
140
                    target.setKey( (java.lang.String) value);
141
                }
142
                catch (java.lang.Exception ex) {
143
                    throw new IllegalStateException(ex.toString());
144
                }
145
            }
146
            public java.lang.Object newInstance( java.lang.Object parent ) {
147
                return null;
148
            }
149
        } );
150
        desc.setHandler(handler);
151
        desc.setRequired(true);
152
        addFieldDescriptor(desc);
153
        
154
        //-- validation code for: _key
155
        fieldValidator = new org.exolab.castor.xml.FieldValidator();
156
        fieldValidator.setMinOccurs(1);
157
        { //-- local scope
158
            StringValidator typeValidator = new StringValidator();
159
            typeValidator.setWhiteSpace("preserve");
160
            fieldValidator.setValidator(typeValidator);
161
        }
162
        desc.setValidator(fieldValidator);
163
        //-- _value
164
        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_value", "value", org.exolab.castor.xml.NodeType.Attribute);
165
        desc.setImmutable(true);
166
        handler = (new org.exolab.castor.xml.XMLFieldHandler() {
167
            public java.lang.Object getValue( java.lang.Object object ) 
168
                throws IllegalStateException
169
            {
170
                Property target = (Property) object;
171
                return target.getValue();
172
            }
173
            public void setValue( java.lang.Object object, java.lang.Object value) 
174
                throws IllegalStateException, IllegalArgumentException
175
            {
176
                try {
177
                    Property target = (Property) object;
178
                    target.setValue( (java.lang.String) value);
179
                }
180
                catch (java.lang.Exception ex) {
181
                    throw new IllegalStateException(ex.toString());
182
                }
183
            }
184
            public java.lang.Object newInstance( java.lang.Object parent ) {
185
                return null;
186
            }
187
        } );
188
        desc.setHandler(handler);
189
        addFieldDescriptor(desc);
190
        
191
        //-- validation code for: _value
192
        fieldValidator = new org.exolab.castor.xml.FieldValidator();
193
        { //-- local scope
194
            StringValidator typeValidator = new StringValidator();
195
            typeValidator.setWhiteSpace("preserve");
196
            fieldValidator.setValidator(typeValidator);
197
        }
198
        desc.setValidator(fieldValidator);
199
        //-- initialize element descriptors
200
        
201
    } //-- com.iver.utiles.xmlEntity.generate.PropertyDescriptor()
202

    
203

    
204
      //-----------/
205
     //- Methods -/
206
    //-----------/
207

    
208
    /**
209
     * Method getAccessMode
210
     */
211
    public org.exolab.castor.mapping.AccessMode getAccessMode()
212
    {
213
        return null;
214
    } //-- org.exolab.castor.mapping.AccessMode getAccessMode() 
215

    
216
    /**
217
     * Method getExtends
218
     */
219
    public org.exolab.castor.mapping.ClassDescriptor getExtends()
220
    {
221
        return null;
222
    } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() 
223

    
224
    /**
225
     * Method getIdentity
226
     */
227
    public org.exolab.castor.mapping.FieldDescriptor getIdentity()
228
    {
229
        return identity;
230
    } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() 
231

    
232
    /**
233
     * Method getJavaClass
234
     */
235
    public java.lang.Class getJavaClass()
236
    {
237
        return org.gvsig.utils.xmlEntity.generate.Property.class;
238
    } //-- java.lang.Class getJavaClass() 
239

    
240
    /**
241
     * Method getNameSpacePrefix
242
     */
243
    public java.lang.String getNameSpacePrefix()
244
    {
245
        return nsPrefix;
246
    } //-- java.lang.String getNameSpacePrefix() 
247

    
248
    /**
249
     * Method getNameSpaceURI
250
     */
251
    public java.lang.String getNameSpaceURI()
252
    {
253
        return nsURI;
254
    } //-- java.lang.String getNameSpaceURI() 
255

    
256
    /**
257
     * Method getValidator
258
     */
259
    public org.exolab.castor.xml.TypeValidator getValidator()
260
    {
261
        return this;
262
    } //-- org.exolab.castor.xml.TypeValidator getValidator() 
263

    
264
    /**
265
     * Method getXMLName
266
     */
267
    public java.lang.String getXMLName()
268
    {
269
        return xmlName;
270
    } //-- java.lang.String getXMLName() 
271

    
272
}