Revision 24433 branches/v2_0_0_prep/libraries/libFMap_data/src/org/gvsig/fmap/data/feature/impl/DefaultFeature.java
DefaultFeature.java | ||
---|---|---|
7 | 7 |
import java.util.List; |
8 | 8 |
|
9 | 9 |
import org.gvsig.fmap.data.DataTypes; |
10 |
import org.gvsig.fmap.data.exceptions.DataEvaluatorRuntimeException; |
|
10 | 11 |
import org.gvsig.fmap.data.feature.EditableFeature; |
11 | 12 |
import org.gvsig.fmap.data.feature.Feature; |
12 | 13 |
import org.gvsig.fmap.data.feature.FeatureAttributeDescriptor; |
... | ... | |
18 | 19 |
import org.gvsig.fmap.geom.primitive.Envelope; |
19 | 20 |
import org.gvsig.tools.evaluator.Evaluator; |
20 | 21 |
import org.gvsig.tools.evaluator.EvaluatorData; |
22 |
import org.gvsig.tools.evaluator.EvaluatorException; |
|
21 | 23 |
|
22 | 24 |
public class DefaultFeature implements Feature, EvaluatorData { |
23 | 25 |
|
... | ... | |
211 | 213 |
// especifico. |
212 | 214 |
return this.data.get(index); |
213 | 215 |
} |
214 |
value = eval.evaluate(this); |
|
216 |
try { |
|
217 |
value = eval.evaluate(this); |
|
218 |
} catch (EvaluatorException e) { |
|
219 |
throw new DataEvaluatorRuntimeException(e); |
|
220 |
} |
|
215 | 221 |
this.data.set(index, value); |
216 | 222 |
return value; |
217 | 223 |
} |
... | ... | |
372 | 378 |
} |
373 | 379 |
|
374 | 380 |
public Object getDataValue(String name) { |
381 |
name = name.toLowerCase(); |
|
375 | 382 |
return get(name); |
376 | 383 |
} |
377 | 384 |
|
... | ... | |
400 | 407 |
return new DataValuesIterator(this); |
401 | 408 |
} |
402 | 409 |
|
410 |
public boolean hasContextValue(String name) { |
|
411 |
name = name.toLowerCase(); |
|
412 |
if (name.equals("store")) { |
|
413 |
return true; |
|
414 |
} |
|
415 |
|
|
416 |
if (name.equals("featuretype")) { |
|
417 |
return true; |
|
418 |
} |
|
419 |
|
|
420 |
if (name.equals("feature")) { |
|
421 |
return true; |
|
422 |
} |
|
423 |
return false; |
|
424 |
} |
|
425 |
|
|
426 |
public boolean hasDataValue(String name) { |
|
427 |
name = name.toLowerCase(); |
|
428 |
return this.data.getType().getIndex(name) >= 0; |
|
429 |
} |
|
430 |
|
|
403 | 431 |
} |
Also available in: Unified diff