svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.framework / org.gvsig.andami / src / main / java / org / gvsig / andami / persistence / generate / BookmarkDescriptor.java @ 40596
History | View | Annotate | Download (7.34 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: BookmarkDescriptor.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.StringValidator; |
38 |
|
39 |
/**
|
40 |
* Class BookmarkDescriptor.
|
41 |
*
|
42 |
* @version $Revision: 29593 $ $Date: 2009-06-29 17:54:31 +0200 (lun, 29 jun 2009) $
|
43 |
*/
|
44 |
public class BookmarkDescriptor 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 BookmarkDescriptor() {
|
77 |
super();
|
78 |
xmlName = "bookmark";
|
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 |
//-- _text
|
88 |
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_text", "text", org.exolab.castor.xml.NodeType.Attribute); |
89 |
desc.setImmutable(true);
|
90 |
handler = (new org.exolab.castor.xml.XMLFieldHandler() {
|
91 |
public java.lang.Object getValue( java.lang.Object object )
|
92 |
throws IllegalStateException |
93 |
{ |
94 |
Bookmark target = (Bookmark) object; |
95 |
return target.getText();
|
96 |
} |
97 |
public void setValue( java.lang.Object object, java.lang.Object value) |
98 |
throws IllegalStateException, IllegalArgumentException |
99 |
{ |
100 |
try {
|
101 |
Bookmark target = (Bookmark) object; |
102 |
target.setText( (java.lang.String) value); |
103 |
} |
104 |
catch (java.lang.Exception ex) {
|
105 |
throw new IllegalStateException(ex.toString()); |
106 |
} |
107 |
} |
108 |
public java.lang.Object newInstance( java.lang.Object parent ) {
|
109 |
return null; |
110 |
} |
111 |
} ); |
112 |
desc.setHandler(handler); |
113 |
desc.setRequired(true);
|
114 |
addFieldDescriptor(desc); |
115 |
|
116 |
//-- validation code for: _text
|
117 |
fieldValidator = new org.exolab.castor.xml.FieldValidator();
|
118 |
fieldValidator.setMinOccurs(1);
|
119 |
{ //-- local scope
|
120 |
StringValidator typeValidator = new StringValidator();
|
121 |
typeValidator.setWhiteSpace("preserve");
|
122 |
fieldValidator.setValidator(typeValidator); |
123 |
} |
124 |
desc.setValidator(fieldValidator); |
125 |
//-- initialize element descriptors
|
126 |
|
127 |
//-- _xmlEntity
|
128 |
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.gvsig.andami.persistence.generate.XmlEntity.class, "_xmlEntity", "xml-entity", org.exolab.castor.xml.NodeType.Element); |
129 |
handler = (new org.exolab.castor.xml.XMLFieldHandler() {
|
130 |
public java.lang.Object getValue( java.lang.Object object )
|
131 |
throws IllegalStateException |
132 |
{ |
133 |
Bookmark target = (Bookmark) object; |
134 |
return target.getXmlEntity();
|
135 |
} |
136 |
public void setValue( java.lang.Object object, java.lang.Object value) |
137 |
throws IllegalStateException, IllegalArgumentException |
138 |
{ |
139 |
try {
|
140 |
Bookmark target = (Bookmark) object; |
141 |
target.setXmlEntity( (org.gvsig.andami.persistence.generate.XmlEntity) value); |
142 |
} |
143 |
catch (java.lang.Exception ex) {
|
144 |
throw new IllegalStateException(ex.toString()); |
145 |
} |
146 |
} |
147 |
public java.lang.Object newInstance( java.lang.Object parent ) {
|
148 |
return new org.gvsig.andami.persistence.generate.XmlEntity(); |
149 |
} |
150 |
} ); |
151 |
desc.setHandler(handler); |
152 |
desc.setRequired(true);
|
153 |
desc.setMultivalued(false);
|
154 |
addFieldDescriptor(desc); |
155 |
|
156 |
//-- validation code for: _xmlEntity
|
157 |
fieldValidator = new org.exolab.castor.xml.FieldValidator();
|
158 |
fieldValidator.setMinOccurs(1);
|
159 |
{ //-- local scope
|
160 |
} |
161 |
desc.setValidator(fieldValidator); |
162 |
} //-- com.iver.andami.persistence.generate.BookmarkDescriptor()
|
163 |
|
164 |
|
165 |
//-----------/
|
166 |
//- Methods -/
|
167 |
//-----------/
|
168 |
|
169 |
/**
|
170 |
* Method getAccessMode
|
171 |
*/
|
172 |
public org.exolab.castor.mapping.AccessMode getAccessMode()
|
173 |
{ |
174 |
return null; |
175 |
} //-- org.exolab.castor.mapping.AccessMode getAccessMode()
|
176 |
|
177 |
/**
|
178 |
* Method getExtends
|
179 |
*/
|
180 |
public org.exolab.castor.mapping.ClassDescriptor getExtends()
|
181 |
{ |
182 |
return null; |
183 |
} //-- org.exolab.castor.mapping.ClassDescriptor getExtends()
|
184 |
|
185 |
/**
|
186 |
* Method getIdentity
|
187 |
*/
|
188 |
public org.exolab.castor.mapping.FieldDescriptor getIdentity()
|
189 |
{ |
190 |
return identity;
|
191 |
} //-- org.exolab.castor.mapping.FieldDescriptor getIdentity()
|
192 |
|
193 |
/**
|
194 |
* Method getJavaClass
|
195 |
*/
|
196 |
public java.lang.Class getJavaClass()
|
197 |
{ |
198 |
return org.gvsig.andami.persistence.generate.Bookmark.class;
|
199 |
} //-- java.lang.Class getJavaClass()
|
200 |
|
201 |
/**
|
202 |
* Method getNameSpacePrefix
|
203 |
*/
|
204 |
public java.lang.String getNameSpacePrefix()
|
205 |
{ |
206 |
return nsPrefix;
|
207 |
} //-- java.lang.String getNameSpacePrefix()
|
208 |
|
209 |
/**
|
210 |
* Method getNameSpaceURI
|
211 |
*/
|
212 |
public java.lang.String getNameSpaceURI()
|
213 |
{ |
214 |
return nsURI;
|
215 |
} //-- java.lang.String getNameSpaceURI()
|
216 |
|
217 |
/**
|
218 |
* Method getValidator
|
219 |
*/
|
220 |
public org.exolab.castor.xml.TypeValidator getValidator()
|
221 |
{ |
222 |
return this; |
223 |
} //-- org.exolab.castor.xml.TypeValidator getValidator()
|
224 |
|
225 |
/**
|
226 |
* Method getXMLName
|
227 |
*/
|
228 |
public java.lang.String getXMLName()
|
229 |
{ |
230 |
return xmlName;
|
231 |
} //-- java.lang.String getXMLName()
|
232 |
|
233 |
} |