Statistics
| Revision:

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

History | View | Annotate | Download (9.93 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: XmlTagDescriptor.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 XmlTagDescriptor.
81
 * 
82
 * @version $Revision: 29631 $ $Date: 2009-06-29 18:56:19 +0200 (lun, 29 jun 2009) $
83
 */
84
public class XmlTagDescriptor 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 XmlTagDescriptor() {
117
        super();
118
        nsURI = "http://www.gvsig.gva.es";
119
        xmlName = "xml-tag";
120
        
121
        //-- set grouping compositor
122
        setCompositorAsSequence();
123
        org.exolab.castor.xml.util.XMLFieldDescriptorImpl  desc           = null;
124
        org.exolab.castor.xml.XMLFieldHandler              handler        = null;
125
        org.exolab.castor.xml.FieldValidator               fieldValidator = null;
126
        //-- initialize attribute descriptors
127
        
128
        //-- _name
129
        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_name", "name", org.exolab.castor.xml.NodeType.Attribute);
130
        desc.setImmutable(true);
131
        handler = (new org.exolab.castor.xml.XMLFieldHandler() {
132
            public java.lang.Object getValue( java.lang.Object object ) 
133
                throws IllegalStateException
134
            {
135
                XmlTag target = (XmlTag) object;
136
                return target.getName();
137
            }
138
            public void setValue( java.lang.Object object, java.lang.Object value) 
139
                throws IllegalStateException, IllegalArgumentException
140
            {
141
                try {
142
                    XmlTag target = (XmlTag) object;
143
                    target.setName( (java.lang.String) value);
144
                }
145
                catch (java.lang.Exception ex) {
146
                    throw new IllegalStateException(ex.toString());
147
                }
148
            }
149
            public java.lang.Object newInstance( java.lang.Object parent ) {
150
                return null;
151
            }
152
        } );
153
        desc.setHandler(handler);
154
        addFieldDescriptor(desc);
155
        
156
        //-- validation code for: _name
157
        fieldValidator = new org.exolab.castor.xml.FieldValidator();
158
        { //-- local scope
159
            StringValidator typeValidator = new StringValidator();
160
            typeValidator.setWhiteSpace("preserve");
161
            fieldValidator.setValidator(typeValidator);
162
        }
163
        desc.setValidator(fieldValidator);
164
        //-- initialize element descriptors
165
        
166
        //-- _propertyList
167
        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.gvsig.utils.xmlEntity.generate.Property.class, "_propertyList", "property", org.exolab.castor.xml.NodeType.Element);
168
        handler = (new org.exolab.castor.xml.XMLFieldHandler() {
169
            public java.lang.Object getValue( java.lang.Object object ) 
170
                throws IllegalStateException
171
            {
172
                XmlTag target = (XmlTag) object;
173
                return target.getProperty();
174
            }
175
            public void setValue( java.lang.Object object, java.lang.Object value) 
176
                throws IllegalStateException, IllegalArgumentException
177
            {
178
                try {
179
                    XmlTag target = (XmlTag) object;
180
                    target.addProperty( (org.gvsig.utils.xmlEntity.generate.Property) value);
181
                }
182
                catch (java.lang.Exception ex) {
183
                    throw new IllegalStateException(ex.toString());
184
                }
185
            }
186
            public java.lang.Object newInstance( java.lang.Object parent ) {
187
                return new org.gvsig.utils.xmlEntity.generate.Property();
188
            }
189
        } );
190
        desc.setHandler(handler);
191
        desc.setMultivalued(true);
192
        addFieldDescriptor(desc);
193
        
194
        //-- validation code for: _propertyList
195
        fieldValidator = new org.exolab.castor.xml.FieldValidator();
196
        fieldValidator.setMinOccurs(0);
197
        { //-- local scope
198
        }
199
        desc.setValidator(fieldValidator);
200
        //-- _xmlTagList
201
        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.gvsig.utils.xmlEntity.generate.XmlTag.class, "_xmlTagList", "xml-tag", org.exolab.castor.xml.NodeType.Element);
202
        handler = (new org.exolab.castor.xml.XMLFieldHandler() {
203
            public java.lang.Object getValue( java.lang.Object object ) 
204
                throws IllegalStateException
205
            {
206
                XmlTag target = (XmlTag) object;
207
                return target.getXmlTag();
208
            }
209
            public void setValue( java.lang.Object object, java.lang.Object value) 
210
                throws IllegalStateException, IllegalArgumentException
211
            {
212
                try {
213
                    XmlTag target = (XmlTag) object;
214
                    target.addXmlTag( (org.gvsig.utils.xmlEntity.generate.XmlTag) value);
215
                }
216
                catch (java.lang.Exception ex) {
217
                    throw new IllegalStateException(ex.toString());
218
                }
219
            }
220
            public java.lang.Object newInstance( java.lang.Object parent ) {
221
                return new org.gvsig.utils.xmlEntity.generate.XmlTag();
222
            }
223
        } );
224
        desc.setHandler(handler);
225
        desc.setMultivalued(true);
226
        addFieldDescriptor(desc);
227
        
228
        //-- validation code for: _xmlTagList
229
        fieldValidator = new org.exolab.castor.xml.FieldValidator();
230
        fieldValidator.setMinOccurs(0);
231
        { //-- local scope
232
        }
233
        desc.setValidator(fieldValidator);
234
    } //-- com.iver.utiles.xmlEntity.generate.XmlTagDescriptor()
235

    
236

    
237
      //-----------/
238
     //- Methods -/
239
    //-----------/
240

    
241
    /**
242
     * Method getAccessMode
243
     */
244
    public org.exolab.castor.mapping.AccessMode getAccessMode()
245
    {
246
        return null;
247
    } //-- org.exolab.castor.mapping.AccessMode getAccessMode() 
248

    
249
    /**
250
     * Method getExtends
251
     */
252
    public org.exolab.castor.mapping.ClassDescriptor getExtends()
253
    {
254
        return null;
255
    } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() 
256

    
257
    /**
258
     * Method getIdentity
259
     */
260
    public org.exolab.castor.mapping.FieldDescriptor getIdentity()
261
    {
262
        return identity;
263
    } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() 
264

    
265
    /**
266
     * Method getJavaClass
267
     */
268
    public java.lang.Class getJavaClass()
269
    {
270
        return org.gvsig.utils.xmlEntity.generate.XmlTag.class;
271
    } //-- java.lang.Class getJavaClass() 
272

    
273
    /**
274
     * Method getNameSpacePrefix
275
     */
276
    public java.lang.String getNameSpacePrefix()
277
    {
278
        return nsPrefix;
279
    } //-- java.lang.String getNameSpacePrefix() 
280

    
281
    /**
282
     * Method getNameSpaceURI
283
     */
284
    public java.lang.String getNameSpaceURI()
285
    {
286
        return nsURI;
287
    } //-- java.lang.String getNameSpaceURI() 
288

    
289
    /**
290
     * Method getValidator
291
     */
292
    public org.exolab.castor.xml.TypeValidator getValidator()
293
    {
294
        return this;
295
    } //-- org.exolab.castor.xml.TypeValidator getValidator() 
296

    
297
    /**
298
     * Method getXMLName
299
     */
300
    public java.lang.String getXMLName()
301
    {
302
        return xmlName;
303
    } //-- java.lang.String getXMLName() 
304

    
305
}