svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.compat.cdc / org.gvsig.fmap.dal / org.gvsig.fmap.dal.swing / org.gvsig.fmap.dal.swing.impl / src / main / java / org / gvsig / fmap / dal / swing / impl / featuretable / table / DynFieldFacadeOfAFeatureAttributeDescriptor.java @ 43739
History | View | Annotate | Download (11 KB)
1 | 42775 | jjdelcerro | |
---|---|---|---|
2 | package org.gvsig.fmap.dal.swing.impl.featuretable.table; |
||
3 | |||
4 | import java.text.DateFormat; |
||
5 | import java.util.List; |
||
6 | import org.cresques.cts.IProjection; |
||
7 | import org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor; |
||
8 | import org.gvsig.fmap.dal.feature.FeatureAttributeEmulator; |
||
9 | import org.gvsig.fmap.dal.feature.FeatureAttributeGetter; |
||
10 | 43739 | jjdelcerro | import org.gvsig.fmap.dal.feature.FeatureStore; |
11 | import org.gvsig.fmap.dal.feature.FeatureType; |
||
12 | 42775 | jjdelcerro | import org.gvsig.fmap.geom.Geometry; |
13 | import org.gvsig.fmap.geom.type.GeometryType; |
||
14 | import org.gvsig.tools.dataTypes.CoercionException; |
||
15 | import org.gvsig.tools.dataTypes.DataType; |
||
16 | import org.gvsig.tools.dynobject.DynField; |
||
17 | 43136 | jjdelcerro | import org.gvsig.tools.dynobject.DynField_v2; |
18 | 42775 | jjdelcerro | import org.gvsig.tools.dynobject.DynObjectValueItem; |
19 | import org.gvsig.tools.dynobject.DynStruct; |
||
20 | import org.gvsig.tools.dynobject.exception.DynFieldIsNotAContainerException; |
||
21 | import org.gvsig.tools.dynobject.exception.DynFieldValidateException; |
||
22 | import org.gvsig.tools.evaluator.Evaluator; |
||
23 | |||
24 | |||
25 | public class DynFieldFacadeOfAFeatureAttributeDescriptor implements FeatureAttributeDescriptor { |
||
26 | |||
27 | private DynField field;
|
||
28 | public DynFieldFacadeOfAFeatureAttributeDescriptor(DynField field) {
|
||
29 | this.field = field;
|
||
30 | } |
||
31 | |||
32 | @Override
|
||
33 | public FeatureAttributeDescriptor getCopy() {
|
||
34 | try {
|
||
35 | return (FeatureAttributeDescriptor) field.clone();
|
||
36 | } catch (CloneNotSupportedException ex) { |
||
37 | throw new RuntimeException(ex); |
||
38 | } |
||
39 | } |
||
40 | |||
41 | @Override
|
||
42 | public String getDataTypeName() { |
||
43 | return field.getDataType().getName();
|
||
44 | } |
||
45 | |||
46 | @Override
|
||
47 | public int getSize() { |
||
48 | return 1; |
||
49 | } |
||
50 | |||
51 | @Override
|
||
52 | public int getPrecision() { |
||
53 | return 0; |
||
54 | } |
||
55 | |||
56 | @Override
|
||
57 | public Class getObjectClass() { |
||
58 | return this.getDataType().getDefaultClass(); |
||
59 | } |
||
60 | |||
61 | @Override
|
||
62 | public int getMinimumOccurrences() { |
||
63 | return 0; |
||
64 | } |
||
65 | |||
66 | @Override
|
||
67 | public int getMaximumOccurrences() { |
||
68 | return 0; |
||
69 | } |
||
70 | |||
71 | @Override
|
||
72 | public boolean isPrimaryKey() { |
||
73 | return false; |
||
74 | } |
||
75 | |||
76 | @Override
|
||
77 | public boolean allowNull() { |
||
78 | return true; |
||
79 | } |
||
80 | |||
81 | @Override
|
||
82 | public Evaluator getEvaluator() {
|
||
83 | return null; |
||
84 | } |
||
85 | |||
86 | @Override
|
||
87 | public IProjection getSRS() {
|
||
88 | return null; |
||
89 | } |
||
90 | |||
91 | @Override
|
||
92 | public int getGeometryType() { |
||
93 | return Geometry.TYPES.GEOMETRY;
|
||
94 | } |
||
95 | |||
96 | @Override
|
||
97 | public int getGeometrySubType() { |
||
98 | return Geometry.SUBTYPES.UNKNOWN;
|
||
99 | } |
||
100 | |||
101 | @Override
|
||
102 | public GeometryType getGeomType() {
|
||
103 | return null; |
||
104 | } |
||
105 | |||
106 | @Override
|
||
107 | public DateFormat getDateFormat() { |
||
108 | return null; |
||
109 | } |
||
110 | |||
111 | @Override
|
||
112 | public int getIndex() { |
||
113 | return -1; |
||
114 | } |
||
115 | |||
116 | @Override
|
||
117 | public Object getAdditionalInfo(String infoName) { |
||
118 | return null; |
||
119 | } |
||
120 | |||
121 | @Override
|
||
122 | public boolean isAutomatic() { |
||
123 | return false; |
||
124 | } |
||
125 | |||
126 | @Override
|
||
127 | public boolean isTime() { |
||
128 | return false; |
||
129 | } |
||
130 | |||
131 | @Override
|
||
132 | public boolean isIndexed() { |
||
133 | return false; |
||
134 | } |
||
135 | |||
136 | @Override
|
||
137 | public boolean allowIndexDuplicateds() { |
||
138 | return false; |
||
139 | } |
||
140 | |||
141 | @Override
|
||
142 | public boolean isIndexAscending() { |
||
143 | return false; |
||
144 | } |
||
145 | |||
146 | @Override
|
||
147 | public FeatureAttributeGetter getFeatureAttributeGetter() {
|
||
148 | return null; |
||
149 | } |
||
150 | |||
151 | @Override
|
||
152 | public void setFeatureAttributeGetter(FeatureAttributeGetter featureAttributeGetter) { |
||
153 | } |
||
154 | |||
155 | @Override
|
||
156 | public FeatureAttributeEmulator getFeatureAttributeEmulator() {
|
||
157 | return null; |
||
158 | } |
||
159 | |||
160 | @Override
|
||
161 | public String getName() { |
||
162 | return this.field.getName(); |
||
163 | } |
||
164 | |||
165 | @Override
|
||
166 | public int getType() { |
||
167 | return this.field.getDataType().getType(); |
||
168 | } |
||
169 | |||
170 | @Override
|
||
171 | public DataType getDataType() {
|
||
172 | return this.field.getDataType(); |
||
173 | } |
||
174 | |||
175 | @Override
|
||
176 | public String getSubtype() { |
||
177 | return null; |
||
178 | } |
||
179 | |||
180 | @Override
|
||
181 | public String getDescription() { |
||
182 | return this.field.getDescription(); |
||
183 | } |
||
184 | |||
185 | @Override
|
||
186 | public Object getDefaultValue() { |
||
187 | return this.field.getDefaultValue(); |
||
188 | } |
||
189 | |||
190 | @Override
|
||
191 | public String getGroup() { |
||
192 | return this.field.getGroup(); |
||
193 | } |
||
194 | |||
195 | @Override
|
||
196 | public int getOder() { |
||
197 | return this.field.getOder(); |
||
198 | } |
||
199 | |||
200 | @Override
|
||
201 | public boolean isMandatory() { |
||
202 | return this.field.isMandatory(); |
||
203 | } |
||
204 | |||
205 | @Override
|
||
206 | public boolean isPersistent() { |
||
207 | return this.field.isPersistent(); |
||
208 | } |
||
209 | |||
210 | @Override
|
||
211 | public boolean isHidden() { |
||
212 | return this.field.isHidden(); |
||
213 | } |
||
214 | |||
215 | @Override
|
||
216 | public boolean isReadOnly() { |
||
217 | return this.field.isReadOnly(); |
||
218 | } |
||
219 | |||
220 | @Override
|
||
221 | public boolean isContainer() { |
||
222 | return this.field.isContainer(); |
||
223 | } |
||
224 | |||
225 | @Override
|
||
226 | public DynObjectValueItem[] getAvailableValues() { |
||
227 | return this.field.getAvailableValues(); |
||
228 | } |
||
229 | |||
230 | @Override
|
||
231 | public Object getMinValue() { |
||
232 | return this.field.getMinValue(); |
||
233 | } |
||
234 | |||
235 | @Override
|
||
236 | public Object getMaxValue() { |
||
237 | return this.field.getMaxValue(); |
||
238 | } |
||
239 | |||
240 | @Override
|
||
241 | public Class getClassOfValue() { |
||
242 | return this.field.getClassOfValue(); |
||
243 | } |
||
244 | |||
245 | @Override
|
||
246 | public Class getClassOfItems() { |
||
247 | return this.field.getClassOfItems(); |
||
248 | } |
||
249 | |||
250 | @Override
|
||
251 | public DynField setDescription(String description) { |
||
252 | throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. |
||
253 | } |
||
254 | |||
255 | @Override
|
||
256 | public DynField setType(int type) { |
||
257 | throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. |
||
258 | } |
||
259 | |||
260 | @Override
|
||
261 | public DynField setType(DataType type) {
|
||
262 | throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. |
||
263 | } |
||
264 | |||
265 | @Override
|
||
266 | public DynField setSubtype(String subtype) { |
||
267 | throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. |
||
268 | } |
||
269 | |||
270 | @Override
|
||
271 | public DynField setDefaultFieldValue(Object defaultValue) { |
||
272 | throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. |
||
273 | } |
||
274 | |||
275 | @Override
|
||
276 | public DynField setGroup(String groupName) { |
||
277 | throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. |
||
278 | } |
||
279 | |||
280 | @Override
|
||
281 | public DynField setOrder(int order) { |
||
282 | throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. |
||
283 | } |
||
284 | |||
285 | @Override
|
||
286 | public DynField setMandatory(boolean mandatory) { |
||
287 | throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. |
||
288 | } |
||
289 | |||
290 | @Override
|
||
291 | public DynField setHidden(boolean hidden) { |
||
292 | throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. |
||
293 | } |
||
294 | |||
295 | @Override
|
||
296 | public DynField setPersistent(boolean persistent) { |
||
297 | throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. |
||
298 | } |
||
299 | |||
300 | @Override
|
||
301 | public DynField setAvailableValues(DynObjectValueItem[] values) { |
||
302 | throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. |
||
303 | } |
||
304 | |||
305 | @Override
|
||
306 | public DynField setAvailableValues(List values) { |
||
307 | throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. |
||
308 | } |
||
309 | |||
310 | @Override
|
||
311 | public DynField setMinValue(Object minValue) { |
||
312 | throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. |
||
313 | } |
||
314 | |||
315 | @Override
|
||
316 | public DynField setMaxValue(Object maxValue) { |
||
317 | throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. |
||
318 | } |
||
319 | |||
320 | @Override
|
||
321 | public DynField setClassOfValue(Class theClass) throws DynFieldIsNotAContainerException { |
||
322 | throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. |
||
323 | } |
||
324 | |||
325 | @Override
|
||
326 | public DynField setClassOfItems(Class theClass) throws DynFieldIsNotAContainerException { |
||
327 | throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. |
||
328 | } |
||
329 | |||
330 | @Override
|
||
331 | public DynField setReadOnly(boolean isReadOnly) { |
||
332 | throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. |
||
333 | } |
||
334 | |||
335 | @Override
|
||
336 | public DynField getElementsType() {
|
||
337 | throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. |
||
338 | } |
||
339 | |||
340 | @Override
|
||
341 | public DynField setElementsType(int type) throws DynFieldIsNotAContainerException { |
||
342 | throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. |
||
343 | } |
||
344 | |||
345 | @Override
|
||
346 | public DynField setElementsType(DynStruct type) throws DynFieldIsNotAContainerException { |
||
347 | throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. |
||
348 | } |
||
349 | |||
350 | @Override
|
||
351 | public void validate(Object value) throws DynFieldValidateException { |
||
352 | throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. |
||
353 | } |
||
354 | |||
355 | @Override
|
||
356 | public Object coerce(Object value) throws CoercionException { |
||
357 | throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. |
||
358 | } |
||
359 | |||
360 | @Override
|
||
361 | public int getTheTypeOfAvailableValues() { |
||
362 | return this.field.getTheTypeOfAvailableValues(); |
||
363 | } |
||
364 | |||
365 | @Override
|
||
366 | public DynField setDefaultDynValue(Object defaultValue) { |
||
367 | throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. |
||
368 | } |
||
369 | |||
370 | @Override
|
||
371 | public DynField setTheTypeOfAvailableValues(int type) { |
||
372 | throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. |
||
373 | } |
||
374 | |||
375 | @Override
|
||
376 | public Object clone() throws CloneNotSupportedException { |
||
377 | DynFieldFacadeOfAFeatureAttributeDescriptor other = (DynFieldFacadeOfAFeatureAttributeDescriptor) super.clone();
|
||
378 | other.field = (DynField) other.field.clone(); |
||
379 | return other;
|
||
380 | } |
||
381 | 43136 | jjdelcerro | |
382 | @Override
|
||
383 | public boolean isComputed() { |
||
384 | if( field instanceof DynField_v2 ) { |
||
385 | return ((DynField_v2)field).isCalculated();
|
||
386 | } |
||
387 | return false; |
||
388 | } |
||
389 | 43739 | jjdelcerro | |
390 | @Override
|
||
391 | public FeatureStore getStore() {
|
||
392 | return null; |
||
393 | } |
||
394 | |||
395 | @Override
|
||
396 | public FeatureType getFeatureType() {
|
||
397 | return null; |
||
398 | } |
||
399 | 42775 | jjdelcerro | } |