Revision 47594 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/DefaultEditableFeature.java
DefaultEditableFeature.java | ||
---|---|---|
519 | 519 |
} |
520 | 520 |
|
521 | 521 |
@Override |
522 |
public void copyFrom(Feature source, Predicate<FeatureAttributeDescriptor> filter) {
|
|
523 |
copyFrom(source, filter, null);
|
|
522 |
public void copyFrom(Feature source, Predicate<FeatureAttributeDescriptor> copy) {
|
|
523 |
copyFrom(source, copy, null);
|
|
524 | 524 |
} |
525 | 525 |
|
526 | 526 |
@Override |
527 |
public void copyFrom(Feature source, Predicate<FeatureAttributeDescriptor> filter, Invocable onerror) {
|
|
527 |
public void copyFrom(Feature source, Predicate<FeatureAttributeDescriptor> copy, Invocable onerror) {
|
|
528 | 528 |
// iterate over the attributes and copy one by one |
529 | 529 |
if( source == null ) { |
530 | 530 |
throw new IllegalArgumentException("'source' argument can't be null"); |
531 | 531 |
} |
532 | 532 |
FeatureType sourceType = source.getType(); |
533 | 533 |
for (FeatureAttributeDescriptor attrTarget : this.getType()) { |
534 |
if( !canSetValue(attrTarget, filter) ) {
|
|
534 |
if( !canSetValue(attrTarget, copy) ) {
|
|
535 | 535 |
continue; |
536 | 536 |
} |
537 | 537 |
String attrname = attrTarget.getName(); |
Also available in: Unified diff