Revision 44641 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/DefaultFeature.java
DefaultFeature.java | ||
---|---|---|
107 | 107 |
FeatureType sourceType = sourceFeature.getType(); |
108 | 108 |
|
109 | 109 |
for (FeatureAttributeDescriptor targetAttrDescriptor : targetType) { |
110 |
if ( targetAttrDescriptor.isAutomatic() || |
|
111 |
targetAttrDescriptor.isReadOnly() || |
|
112 |
targetAttrDescriptor.getEvaluator() != null) { |
|
110 |
if ( targetAttrDescriptor.isComputed() ) { |
|
113 | 111 |
continue; |
114 | 112 |
} |
115 | 113 |
int sourceIndex = sourceType.getIndex(targetAttrDescriptor.getName()); |
... | ... | |
120 | 118 |
if (value == null && !targetAttrDescriptor.allowNull()) { |
121 | 119 |
continue; |
122 | 120 |
} |
123 |
this.set(targetAttrDescriptor,value);
|
|
121 |
this.setforced(targetAttrDescriptor.getIndex(), targetAttrDescriptor,value);
|
|
124 | 122 |
} |
125 | 123 |
} |
126 | 124 |
|
... | ... | |
141 | 139 |
return dataTypesManager; |
142 | 140 |
} |
143 | 141 |
|
144 |
void set(FeatureAttributeDescriptor attribute, Object value) { |
|
142 |
protected void set(FeatureAttributeDescriptor attribute, Object value) {
|
|
145 | 143 |
int i = attribute.getIndex(); |
146 | 144 |
|
147 | 145 |
if ( attribute.isReadOnly() ) { |
... | ... | |
167 | 165 |
if ( attribute.getFeatureAttributeGetter() != null ) { |
168 | 166 |
value = attribute.getFeatureAttributeGetter().setter(value); |
169 | 167 |
} |
168 |
this.setforced(i, attribute, value); |
|
169 |
} |
|
170 | 170 |
|
171 |
private void setforced(int i, FeatureAttributeDescriptor attribute, Object value) { |
|
172 |
|
|
171 | 173 |
Class objectClass = attribute.getObjectClass(); |
172 | 174 |
if( objectClass!=null ) { |
173 | 175 |
if ( objectClass.isInstance(value) ) { |
Also available in: Unified diff