Revision 45784 trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/fmap/dal/feature/impl/DefaultEditableFeatureType.java
DefaultEditableFeatureType.java | ||
---|---|---|
26 | 26 |
|
27 | 27 |
import java.util.Iterator; |
28 | 28 |
import javax.json.JsonObject; |
29 |
import org.apache.commons.lang3.StringUtils; |
|
30 |
import org.gvsig.fmap.dal.DataTypeUtils; |
|
29 | 31 |
|
30 | 32 |
import org.gvsig.fmap.dal.DataTypes; |
31 | 33 |
import org.gvsig.fmap.dal.exception.DataListException; |
... | ... | |
466 | 468 |
} |
467 | 469 |
|
468 | 470 |
public void copyFrom(JsonObject json) { |
469 |
|
|
471 |
// TODO: falta por implementar copyFrom(json) |
|
470 | 472 |
} |
473 |
|
|
474 |
@Override |
|
475 |
public void set(String name, String value) { |
|
476 |
if (StringUtils.isBlank(name)) { |
|
477 |
throw new IllegalArgumentException("Name can't be empty"); |
|
478 |
} |
|
479 |
switch (name.trim().toLowerCase()) { |
|
480 |
case "checkfeaturesatfinishediting": |
|
481 |
this.setCheckFeaturesAtFinishEditing(DataTypeUtils.toBoolean(value, false)); |
|
482 |
break; |
|
483 |
case "checkfeaturesatinsert": |
|
484 |
this.setCheckFeaturesAtInsert(DataTypeUtils.toBoolean(value, false)); |
|
485 |
break; |
|
486 |
case "defaultgeometryattributename": |
|
487 |
case "defaultgeometryname": |
|
488 |
case "defaultgeometry": |
|
489 |
this.setDefaultGeometryAttributeName(DataTypeUtils.toString(value, null)); |
|
490 |
break; |
|
491 |
default: |
|
492 |
throw new IllegalArgumentException("Name attribute '" + name + "' not valid."); |
|
493 |
} |
|
494 |
} |
|
495 |
|
|
471 | 496 |
} |
Also available in: Unified diff