Revision 43562 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 | ||
---|---|---|
29 | 29 |
import org.gvsig.fmap.dal.feature.EditableFeature; |
30 | 30 |
import org.gvsig.fmap.dal.feature.Feature; |
31 | 31 |
import org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor; |
32 |
import org.gvsig.fmap.dal.feature.FeatureType; |
|
32 | 33 |
import org.gvsig.fmap.dal.feature.spi.FeatureProvider; |
33 | 34 |
import org.gvsig.fmap.geom.Geometry; |
34 | 35 |
import org.gvsig.timesupport.Instant; |
... | ... | |
236 | 237 |
|
237 | 238 |
public void copyFrom(Feature source) { |
238 | 239 |
// iterate over the attributes and copy one by one |
240 |
FeatureType sourceType = source.getType(); |
|
239 | 241 |
Iterator it = this.getType().iterator(); |
240 | 242 |
while ( it.hasNext() ) { |
241 | 243 |
FeatureAttributeDescriptor attr = (FeatureAttributeDescriptor) it.next(); |
242 |
set(attr.getIndex(), source.get(attr.getIndex())); |
|
244 |
if( sourceType.get(attr.getName())!=null ) { |
|
245 |
set(attr.getIndex(), source.get(attr.getName())); |
|
246 |
} |
|
243 | 247 |
} |
244 | 248 |
} |
245 | 249 |
|
Also available in: Unified diff