svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.framework / org.gvsig.andami / src / main / java / org / gvsig / andami / persistence / generate / WindowDescriptor.java @ 40596
History | View | Annotate | Download (7.29 KB)
1 | 40559 | jjdelcerro | /**
|
---|---|---|---|
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 | 40435 | jjdelcerro | /*
|
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: WindowDescriptor.java 29593 2009-06-29 15:54:31Z jpiera $
|
||
29 | */
|
||
30 | |||
31 | package org.gvsig.andami.persistence.generate; |
||
32 | |||
33 | //---------------------------------/
|
||
34 | //- Imported classes and packages -/
|
||
35 | //---------------------------------/
|
||
36 | |||
37 | import org.exolab.castor.xml.validators.NameValidator; |
||
38 | import org.exolab.castor.xml.validators.StringValidator; |
||
39 | |||
40 | /**
|
||
41 | * Class WindowDescriptor.
|
||
42 | *
|
||
43 | * @version $Revision: 29593 $ $Date: 2009-06-29 17:54:31 +0200 (lun, 29 jun 2009) $
|
||
44 | */
|
||
45 | public class WindowDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { |
||
46 | |||
47 | |||
48 | //--------------------------/
|
||
49 | //- Class/Member Variables -/
|
||
50 | //--------------------------/
|
||
51 | |||
52 | /**
|
||
53 | * Field nsPrefix
|
||
54 | */
|
||
55 | private java.lang.String nsPrefix;
|
||
56 | |||
57 | /**
|
||
58 | * Field nsURI
|
||
59 | */
|
||
60 | private java.lang.String nsURI;
|
||
61 | |||
62 | /**
|
||
63 | * Field xmlName
|
||
64 | */
|
||
65 | private java.lang.String xmlName;
|
||
66 | |||
67 | /**
|
||
68 | * Field identity
|
||
69 | */
|
||
70 | private org.exolab.castor.xml.XMLFieldDescriptor identity;
|
||
71 | |||
72 | |||
73 | //----------------/
|
||
74 | //- Constructors -/
|
||
75 | //----------------/
|
||
76 | |||
77 | public WindowDescriptor() {
|
||
78 | super();
|
||
79 | xmlName = "window";
|
||
80 | org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
|
||
81 | org.exolab.castor.xml.XMLFieldHandler handler = null;
|
||
82 | org.exolab.castor.xml.FieldValidator fieldValidator = null;
|
||
83 | //-- initialize attribute descriptors
|
||
84 | |||
85 | //-- _rectangle
|
||
86 | desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_rectangle", "rectangle", org.exolab.castor.xml.NodeType.Attribute); |
||
87 | desc.setImmutable(true);
|
||
88 | handler = (new org.exolab.castor.xml.XMLFieldHandler() {
|
||
89 | public java.lang.Object getValue( java.lang.Object object )
|
||
90 | throws IllegalStateException |
||
91 | { |
||
92 | Window target = (Window) object; |
||
93 | return target.getRectangle();
|
||
94 | } |
||
95 | public void setValue( java.lang.Object object, java.lang.Object value) |
||
96 | throws IllegalStateException, IllegalArgumentException |
||
97 | { |
||
98 | try {
|
||
99 | Window target = (Window) object; |
||
100 | target.setRectangle( (java.lang.String) value); |
||
101 | } |
||
102 | catch (java.lang.Exception ex) {
|
||
103 | throw new IllegalStateException(ex.toString()); |
||
104 | } |
||
105 | } |
||
106 | public java.lang.Object newInstance( java.lang.Object parent ) {
|
||
107 | return null; |
||
108 | } |
||
109 | } ); |
||
110 | desc.setHandler(handler); |
||
111 | desc.setRequired(true);
|
||
112 | addFieldDescriptor(desc); |
||
113 | |||
114 | //-- validation code for: _rectangle
|
||
115 | fieldValidator = new org.exolab.castor.xml.FieldValidator();
|
||
116 | fieldValidator.setMinOccurs(1);
|
||
117 | { //-- local scope
|
||
118 | StringValidator typeValidator = new StringValidator();
|
||
119 | typeValidator.setWhiteSpace("preserve");
|
||
120 | fieldValidator.setValidator(typeValidator); |
||
121 | } |
||
122 | desc.setValidator(fieldValidator); |
||
123 | //-- _id
|
||
124 | desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_id", "id", org.exolab.castor.xml.NodeType.Attribute); |
||
125 | handler = (new org.exolab.castor.xml.XMLFieldHandler() {
|
||
126 | public java.lang.Object getValue( java.lang.Object object )
|
||
127 | throws IllegalStateException |
||
128 | { |
||
129 | Window target = (Window) object; |
||
130 | return target.getId();
|
||
131 | } |
||
132 | public void setValue( java.lang.Object object, java.lang.Object value) |
||
133 | throws IllegalStateException, IllegalArgumentException |
||
134 | { |
||
135 | try {
|
||
136 | Window target = (Window) object; |
||
137 | target.setId( (java.lang.String) value); |
||
138 | } |
||
139 | catch (java.lang.Exception ex) {
|
||
140 | throw new IllegalStateException(ex.toString()); |
||
141 | } |
||
142 | } |
||
143 | public java.lang.Object newInstance( java.lang.Object parent ) {
|
||
144 | return new java.lang.String(); |
||
145 | } |
||
146 | } ); |
||
147 | desc.setHandler(handler); |
||
148 | desc.setRequired(true);
|
||
149 | addFieldDescriptor(desc); |
||
150 | |||
151 | //-- validation code for: _id
|
||
152 | fieldValidator = new org.exolab.castor.xml.FieldValidator();
|
||
153 | fieldValidator.setMinOccurs(1);
|
||
154 | { //-- local scope
|
||
155 | NameValidator typeValidator = new NameValidator(NameValidator.NMTOKEN);
|
||
156 | fieldValidator.setValidator(typeValidator); |
||
157 | } |
||
158 | desc.setValidator(fieldValidator); |
||
159 | //-- initialize element descriptors
|
||
160 | |||
161 | } //-- com.iver.andami.persistence.generate.WindowDescriptor()
|
||
162 | |||
163 | |||
164 | //-----------/
|
||
165 | //- Methods -/
|
||
166 | //-----------/
|
||
167 | |||
168 | /**
|
||
169 | * Method getAccessMode
|
||
170 | */
|
||
171 | public org.exolab.castor.mapping.AccessMode getAccessMode()
|
||
172 | { |
||
173 | return null; |
||
174 | } //-- org.exolab.castor.mapping.AccessMode getAccessMode()
|
||
175 | |||
176 | /**
|
||
177 | * Method getExtends
|
||
178 | */
|
||
179 | public org.exolab.castor.mapping.ClassDescriptor getExtends()
|
||
180 | { |
||
181 | return null; |
||
182 | } //-- org.exolab.castor.mapping.ClassDescriptor getExtends()
|
||
183 | |||
184 | /**
|
||
185 | * Method getIdentity
|
||
186 | */
|
||
187 | public org.exolab.castor.mapping.FieldDescriptor getIdentity()
|
||
188 | { |
||
189 | return identity;
|
||
190 | } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity()
|
||
191 | |||
192 | /**
|
||
193 | * Method getJavaClass
|
||
194 | */
|
||
195 | public java.lang.Class getJavaClass()
|
||
196 | { |
||
197 | return org.gvsig.andami.persistence.generate.Window.class;
|
||
198 | } //-- java.lang.Class getJavaClass()
|
||
199 | |||
200 | /**
|
||
201 | * Method getNameSpacePrefix
|
||
202 | */
|
||
203 | public java.lang.String getNameSpacePrefix()
|
||
204 | { |
||
205 | return nsPrefix;
|
||
206 | } //-- java.lang.String getNameSpacePrefix()
|
||
207 | |||
208 | /**
|
||
209 | * Method getNameSpaceURI
|
||
210 | */
|
||
211 | public java.lang.String getNameSpaceURI()
|
||
212 | { |
||
213 | return nsURI;
|
||
214 | } //-- java.lang.String getNameSpaceURI()
|
||
215 | |||
216 | /**
|
||
217 | * Method getValidator
|
||
218 | */
|
||
219 | public org.exolab.castor.xml.TypeValidator getValidator()
|
||
220 | { |
||
221 | return this; |
||
222 | } //-- org.exolab.castor.xml.TypeValidator getValidator()
|
||
223 | |||
224 | /**
|
||
225 | * Method getXMLName
|
||
226 | */
|
||
227 | public java.lang.String getXMLName()
|
||
228 | { |
||
229 | return xmlName;
|
||
230 | } //-- java.lang.String getXMLName()
|
||
231 | |||
232 | } |