Statistics
| Revision:

svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.framework / org.gvsig.andami / src / main / java / org / gvsig / andami / persistence / generate / XmlEntityDescriptor.java @ 40596

History | View | Annotate | Download (5.7 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
/*
26
 * This class was automatically generated with 
27
 * <a href="http://www.castor.org">Castor 0.9.5.3</a>, using an XML
28
 * Schema.
29
 * $Id: XmlEntityDescriptor.java 29593 2009-06-29 15:54:31Z jpiera $
30
 */
31

    
32
package org.gvsig.andami.persistence.generate;
33

    
34
  //---------------------------------/
35
 //- Imported classes and packages -/
36
//---------------------------------/
37

    
38

    
39
/**
40
 * Class XmlEntityDescriptor.
41
 * 
42
 * @version $Revision: 29593 $ $Date: 2009-06-29 17:54:31 +0200 (lun, 29 jun 2009) $
43
 */
44
public class XmlEntityDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl {
45

    
46

    
47
      //--------------------------/
48
     //- Class/Member Variables -/
49
    //--------------------------/
50

    
51
    /**
52
     * Field nsPrefix
53
     */
54
    private java.lang.String nsPrefix;
55

    
56
    /**
57
     * Field nsURI
58
     */
59
    private java.lang.String nsURI;
60

    
61
    /**
62
     * Field xmlName
63
     */
64
    private java.lang.String xmlName;
65

    
66
    /**
67
     * Field identity
68
     */
69
    private org.exolab.castor.xml.XMLFieldDescriptor identity;
70

    
71

    
72
      //----------------/
73
     //- Constructors -/
74
    //----------------/
75

    
76
    public XmlEntityDescriptor() {
77
        super();
78
        xmlName = "xml-entity";
79
        
80
        //-- set grouping compositor
81
        setCompositorAsSequence();
82
        org.exolab.castor.xml.util.XMLFieldDescriptorImpl  desc           = null;
83
        org.exolab.castor.xml.XMLFieldHandler              handler        = null;
84
        org.exolab.castor.xml.FieldValidator               fieldValidator = null;
85
        //-- initialize attribute descriptors
86
        
87
        //-- initialize element descriptors
88
        
89
        //-- _propertyList
90
        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.gvsig.andami.persistence.generate.Property.class, "_propertyList", "property", org.exolab.castor.xml.NodeType.Element);
91
        handler = (new org.exolab.castor.xml.XMLFieldHandler() {
92
            public java.lang.Object getValue( java.lang.Object object ) 
93
                throws IllegalStateException
94
            {
95
                XmlEntity target = (XmlEntity) object;
96
                return target.getProperty();
97
            }
98
            public void setValue( java.lang.Object object, java.lang.Object value) 
99
                throws IllegalStateException, IllegalArgumentException
100
            {
101
                try {
102
                    XmlEntity target = (XmlEntity) object;
103
                    target.addProperty( (org.gvsig.andami.persistence.generate.Property) value);
104
                }
105
                catch (java.lang.Exception ex) {
106
                    throw new IllegalStateException(ex.toString());
107
                }
108
            }
109
            public java.lang.Object newInstance( java.lang.Object parent ) {
110
                return new org.gvsig.andami.persistence.generate.Property();
111
            }
112
        } );
113
        desc.setHandler(handler);
114
        desc.setRequired(true);
115
        desc.setMultivalued(true);
116
        addFieldDescriptor(desc);
117
        
118
        //-- validation code for: _propertyList
119
        fieldValidator = new org.exolab.castor.xml.FieldValidator();
120
        fieldValidator.setMinOccurs(1);
121
        { //-- local scope
122
        }
123
        desc.setValidator(fieldValidator);
124
    } //-- com.iver.andami.persistence.generate.XmlEntityDescriptor()
125

    
126

    
127
      //-----------/
128
     //- Methods -/
129
    //-----------/
130

    
131
    /**
132
     * Method getAccessMode
133
     */
134
    public org.exolab.castor.mapping.AccessMode getAccessMode()
135
    {
136
        return null;
137
    } //-- org.exolab.castor.mapping.AccessMode getAccessMode() 
138

    
139
    /**
140
     * Method getExtends
141
     */
142
    public org.exolab.castor.mapping.ClassDescriptor getExtends()
143
    {
144
        return null;
145
    } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() 
146

    
147
    /**
148
     * Method getIdentity
149
     */
150
    public org.exolab.castor.mapping.FieldDescriptor getIdentity()
151
    {
152
        return identity;
153
    } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() 
154

    
155
    /**
156
     * Method getJavaClass
157
     */
158
    public java.lang.Class getJavaClass()
159
    {
160
        return org.gvsig.andami.persistence.generate.XmlEntity.class;
161
    } //-- java.lang.Class getJavaClass() 
162

    
163
    /**
164
     * Method getNameSpacePrefix
165
     */
166
    public java.lang.String getNameSpacePrefix()
167
    {
168
        return nsPrefix;
169
    } //-- java.lang.String getNameSpacePrefix() 
170

    
171
    /**
172
     * Method getNameSpaceURI
173
     */
174
    public java.lang.String getNameSpaceURI()
175
    {
176
        return nsURI;
177
    } //-- java.lang.String getNameSpaceURI() 
178

    
179
    /**
180
     * Method getValidator
181
     */
182
    public org.exolab.castor.xml.TypeValidator getValidator()
183
    {
184
        return this;
185
    } //-- org.exolab.castor.xml.TypeValidator getValidator() 
186

    
187
    /**
188
     * Method getXMLName
189
     */
190
    public java.lang.String getXMLName()
191
    {
192
        return xmlName;
193
    } //-- java.lang.String getXMLName() 
194

    
195
}