Revision 25407 branches/v2_0_0_prep/libraries/libFMap_dal/src/org/gvsig/fmap/dal/feature/impl/DefaultEditableFeature.java
DefaultEditableFeature.java | ||
---|---|---|
1 | 1 |
package org.gvsig.fmap.dal.feature.impl; |
2 | 2 |
|
3 | 3 |
import java.util.Date; |
4 |
import java.util.Iterator; |
|
4 | 5 |
|
5 | 6 |
import org.gvsig.fmap.dal.feature.EditableFeature; |
6 | 7 |
import org.gvsig.fmap.dal.feature.Feature; |
... | ... | |
207 | 208 |
this.set(attribute, value); |
208 | 209 |
} |
209 | 210 |
|
211 |
public void copyFrom(Feature source) { |
|
212 |
// iterate over the attributes and copy one by one |
|
213 |
Iterator it = this.getType().iterator(); |
|
214 |
while( it.hasNext() ) { |
|
215 |
FeatureAttributeDescriptor attr = (FeatureAttributeDescriptor) it.next(); |
|
216 |
set(attr.getIndex(), source.get(attr.getIndex())); |
|
217 |
} |
|
218 |
} |
|
210 | 219 |
|
211 | 220 |
|
212 | 221 |
} |
Also available in: Unified diff