Statistics
| Revision:

root / branches / v2_0_0_prep / frameworks / _fwAndami / src / org / gvsig / andami / persistence / generate / PropertyDescriptor.java @ 29593

History | View | Annotate | Download (7.45 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 29593 2009-06-29 15:54:31Z jpiera $
6
 */
7

    
8
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
9
 *
10
 * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
11
 *
12
 * This program is free software; you can redistribute it and/or
13
 * modify it under the terms of the GNU General Public License
14
 * as published by the Free Software Foundation; either version 2
15
 * of the License, or (at your option) any later version.
16
 *
17
 * This program is distributed in the hope that it will be useful,
18
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20
 * GNU General Public License for more details.
21
 *
22
 * You should have received a copy of the GNU General Public License
23
 * along with this program; if not, write to the Free Software
24
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
25
 *
26
 * For more information, contact:
27
 *
28
 *  Generalitat Valenciana
29
 *   Conselleria d'Infraestructures i Transport
30
 *   Av. Blasco Ib??ez, 50
31
 *   46010 VALENCIA
32
 *   SPAIN
33
 *
34
 *      +34 963862235
35
 *   gvsig@gva.es
36
 *      www.gvsig.gva.es
37
 *
38
 *    or
39
 *
40
 *   IVER T.I. S.A
41
 *   Salamanca 50
42
 *   46005 Valencia
43
 *   Spain
44
 *
45
 *   +34 963163400
46
 *   dac@iver.es
47
 */
48
package org.gvsig.andami.persistence.generate;
49

    
50
  //---------------------------------/
51
 //- Imported classes and packages -/
52
//---------------------------------/
53

    
54
import org.exolab.castor.xml.validators.NameValidator;
55
import org.exolab.castor.xml.validators.StringValidator;
56

    
57
/**
58
 * Class PropertyDescriptor.
59
 * 
60
 * @version $Revision: 29593 $ $Date: 2009-06-29 17:54:31 +0200 (Mon, 29 Jun 2009) $
61
 */
62
public class PropertyDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl {
63

    
64

    
65
      //--------------------------/
66
     //- Class/Member Variables -/
67
    //--------------------------/
68

    
69
    /**
70
     * Field nsPrefix
71
     */
72
    private java.lang.String nsPrefix;
73

    
74
    /**
75
     * Field nsURI
76
     */
77
    private java.lang.String nsURI;
78

    
79
    /**
80
     * Field xmlName
81
     */
82
    private java.lang.String xmlName;
83

    
84
    /**
85
     * Field identity
86
     */
87
    private org.exolab.castor.xml.XMLFieldDescriptor identity;
88

    
89

    
90
      //----------------/
91
     //- Constructors -/
92
    //----------------/
93

    
94
    public PropertyDescriptor() {
95
        super();
96
        xmlName = "property";
97
        org.exolab.castor.xml.util.XMLFieldDescriptorImpl  desc           = null;
98
        org.exolab.castor.xml.XMLFieldHandler              handler        = null;
99
        org.exolab.castor.xml.FieldValidator               fieldValidator = null;
100
        //-- initialize attribute descriptors
101
        
102
        //-- _name
103
        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_name", "name", org.exolab.castor.xml.NodeType.Attribute);
104
        handler = (new org.exolab.castor.xml.XMLFieldHandler() {
105
            public java.lang.Object getValue( java.lang.Object object ) 
106
                throws IllegalStateException
107
            {
108
                Property target = (Property) object;
109
                return target.getName();
110
            }
111
            public void setValue( java.lang.Object object, java.lang.Object value) 
112
                throws IllegalStateException, IllegalArgumentException
113
            {
114
                try {
115
                    Property target = (Property) object;
116
                    target.setName( (java.lang.String) value);
117
                }
118
                catch (java.lang.Exception ex) {
119
                    throw new IllegalStateException(ex.toString());
120
                }
121
            }
122
            public java.lang.Object newInstance( java.lang.Object parent ) {
123
                return new java.lang.String();
124
            }
125
        } );
126
        desc.setHandler(handler);
127
        desc.setRequired(true);
128
        addFieldDescriptor(desc);
129
        
130
        //-- validation code for: _name
131
        fieldValidator = new org.exolab.castor.xml.FieldValidator();
132
        fieldValidator.setMinOccurs(1);
133
        { //-- local scope
134
            NameValidator typeValidator = new NameValidator(NameValidator.NMTOKEN);
135
            fieldValidator.setValidator(typeValidator);
136
        }
137
        desc.setValidator(fieldValidator);
138
        //-- _value
139
        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_value", "value", org.exolab.castor.xml.NodeType.Attribute);
140
        desc.setImmutable(true);
141
        handler = (new org.exolab.castor.xml.XMLFieldHandler() {
142
            public java.lang.Object getValue( java.lang.Object object ) 
143
                throws IllegalStateException
144
            {
145
                Property target = (Property) object;
146
                return target.getValue();
147
            }
148
            public void setValue( java.lang.Object object, java.lang.Object value) 
149
                throws IllegalStateException, IllegalArgumentException
150
            {
151
                try {
152
                    Property target = (Property) object;
153
                    target.setValue( (java.lang.String) value);
154
                }
155
                catch (java.lang.Exception ex) {
156
                    throw new IllegalStateException(ex.toString());
157
                }
158
            }
159
            public java.lang.Object newInstance( java.lang.Object parent ) {
160
                return null;
161
            }
162
        } );
163
        desc.setHandler(handler);
164
        desc.setRequired(true);
165
        addFieldDescriptor(desc);
166
        
167
        //-- validation code for: _value
168
        fieldValidator = new org.exolab.castor.xml.FieldValidator();
169
        fieldValidator.setMinOccurs(1);
170
        { //-- local scope
171
            StringValidator typeValidator = new StringValidator();
172
            typeValidator.setWhiteSpace("preserve");
173
            fieldValidator.setValidator(typeValidator);
174
        }
175
        desc.setValidator(fieldValidator);
176
        //-- initialize element descriptors
177
        
178
    } //-- com.iver.andami.persistence.generate.PropertyDescriptor()
179

    
180

    
181
      //-----------/
182
     //- Methods -/
183
    //-----------/
184

    
185
    /**
186
     * Method getAccessMode
187
     */
188
    public org.exolab.castor.mapping.AccessMode getAccessMode()
189
    {
190
        return null;
191
    } //-- org.exolab.castor.mapping.AccessMode getAccessMode() 
192

    
193
    /**
194
     * Method getExtends
195
     */
196
    public org.exolab.castor.mapping.ClassDescriptor getExtends()
197
    {
198
        return null;
199
    } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() 
200

    
201
    /**
202
     * Method getIdentity
203
     */
204
    public org.exolab.castor.mapping.FieldDescriptor getIdentity()
205
    {
206
        return identity;
207
    } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() 
208

    
209
    /**
210
     * Method getJavaClass
211
     */
212
    public java.lang.Class getJavaClass()
213
    {
214
        return org.gvsig.andami.persistence.generate.Property.class;
215
    } //-- java.lang.Class getJavaClass() 
216

    
217
    /**
218
     * Method getNameSpacePrefix
219
     */
220
    public java.lang.String getNameSpacePrefix()
221
    {
222
        return nsPrefix;
223
    } //-- java.lang.String getNameSpacePrefix() 
224

    
225
    /**
226
     * Method getNameSpaceURI
227
     */
228
    public java.lang.String getNameSpaceURI()
229
    {
230
        return nsURI;
231
    } //-- java.lang.String getNameSpaceURI() 
232

    
233
    /**
234
     * Method getValidator
235
     */
236
    public org.exolab.castor.xml.TypeValidator getValidator()
237
    {
238
        return this;
239
    } //-- org.exolab.castor.xml.TypeValidator getValidator() 
240

    
241
    /**
242
     * Method getXMLName
243
     */
244
    public java.lang.String getXMLName()
245
    {
246
        return xmlName;
247
    } //-- java.lang.String getXMLName() 
248

    
249
}