Revision 35133 branches/dal_time_support/libraries/libFMap_dal/src/org/gvsig/fmap/dal/feature/impl/DefaultFeature.java
DefaultFeature.java | ||
---|---|---|
284 | 284 |
if( index <0 || index >= type.size() ) { |
285 | 285 |
throw new IllegalArgumentException("Attribute index '"+index+"' out of range (0 to "+this.data.getType().size()+"."); |
286 | 286 |
} |
287 |
FeatureAttributeDescriptor attribute = type.getAttributeDescriptor(index); |
|
287 | 288 |
if (!this.data.getType().hasEvaluators()) { |
288 |
return this.data.get(index); |
|
289 |
} |
|
290 |
FeatureAttributeDescriptor attribute = type.getAttributeDescriptor(index); |
|
289 |
return get(attribute, this.data.get(index)); |
|
290 |
} |
|
291 | 291 |
Evaluator eval = attribute.getEvaluator(); |
292 | 292 |
if (eval == null) { |
293 | 293 |
return this.data.get(index); |
... | ... | |
296 | 296 |
if (value != null) { // FIXME: para comprobar si esta calculado usar |
297 | 297 |
// un array |
298 | 298 |
// especifico. |
299 |
return this.data.get(index);
|
|
299 |
return get(attribute, this.data.get(index));
|
|
300 | 300 |
} |
301 | 301 |
try { |
302 | 302 |
value = eval.evaluate(this); |
... | ... | |
304 | 304 |
throw new DataEvaluatorRuntimeException(e); |
305 | 305 |
} |
306 | 306 |
this.data.set(index, value); |
307 |
return value;
|
|
308 |
} |
|
307 |
return get(attribute, value);
|
|
308 |
}
|
|
309 | 309 |
} |
310 |
|
|
311 |
private Object get(FeatureAttributeDescriptor featureAttributeDescriptor, Object value){ |
|
312 |
if (featureAttributeDescriptor.getFeatureAttributeGetter() == null){ |
|
313 |
return value; |
|
314 |
}else{ |
|
315 |
return featureAttributeDescriptor.getFeatureAttributeGetter().getter(value); |
|
316 |
} |
|
317 |
} |
|
310 | 318 |
|
311 | 319 |
public Object[] getArray(String name) { |
312 | 320 |
return this.getArray(this.data.getType().getIndex(name)); |
Also available in: Unified diff