Revision 40964

View differences:

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/DefaultEditableFeatureAttributeDescriptor.java
26 26
import java.util.HashMap;
27 27

  
28 28
import org.cresques.cts.IProjection;
29
import org.slf4j.Logger;
30
import org.slf4j.LoggerFactory;
29 31

  
30 32
import org.gvsig.fmap.dal.feature.EditableFeatureAttributeDescriptor;
31 33
import org.gvsig.fmap.dal.feature.exception.AttributeFeatureTypeIntegrityException;
......
37 39
public class DefaultEditableFeatureAttributeDescriptor extends
38 40
    DefaultFeatureAttributeDescriptor implements
39 41
    EditableFeatureAttributeDescriptor {
42
    
43
    private static Logger logger = LoggerFactory.getLogger(
44
        DefaultEditableFeatureAttributeDescriptor.class);
40 45

  
41 46
    private DefaultFeatureAttributeDescriptor source;
42 47
    private boolean hasStrongChanges;
......
76 81
            ex.add(new AttributeFeatureTypeSizeException(this.size));
77 82
        }
78 83

  
79
        // TODO: a?adir resto de comprobaciones de integridad.
84
        if( this.dataType.isObject() && this.objectClass == null ) {
85
            logger.warn("Incorrect data type object, objectClass is null.");
86
            ex.add(new AttributeFeatureTypeIntegrityException(this.name));
87
        }
88
        
89
        // TODO: Add other integrity checks...
80 90

  
81 91
        if (ex.size() > 0) {
82 92
            throw ex;
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
132 132
            value = attribute.getFeatureAttributeGetter().setter(value);	            
133 133
        }
134 134
        
135
        if (attribute.getObjectClass() != null) {
136
            
137 135
        if (attribute.getObjectClass().isInstance(value)) {
138 136
            this.data.set(i, value);
139 137
            return;
......
152 150
                    + value.toString() + "'.");
153 151
            }
154 152
		}
155
        
156
        }
157 153
		
158 154
        this.data.set(i, value);
159 155
    }

Also available in: Unified diff