Revision 47643 trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.file/org.gvsig.fmap.dal.file.csv/src/main/java/org/gvsig/fmap/dal/store/csv/CSVStoreParameters.java

View differences:

CSVStoreParameters.java
96 96
        super(parametersDefinitionName, CSVStoreProvider.NAME);
97 97
    }
98 98

  
99
    protected FeatureType getFeatureType() {
100
        if( this.featureType==null ) {
101
            try {
102
                EditableFeatureType ftype = DALLocator.getDataManager().createFeatureType();
103
                SimpleReaderFeatureTypeLoader featureTypeLoader = new CSVFeatureTypeLoader(this);
104
                featureTypeLoader.loadFeatureType(ftype, false, null);
105
                boolean all_fields_declare_type = featureTypeLoader.isAllFieldsDeclareType();
106
                defaultValueOfAutomaticTypesDetection = !all_fields_declare_type;
107
                this.featureType = ftype;
108
            } catch (Exception ex) {
109
                LOGGER.debug("Can't detect feature type from csv header", ex);
110
                // Do nothing, continue
111
            }
112
        }
113
        return this.featureType;
99
    @Override
100
    protected SimpleReaderFeatureTypeLoader getFeatureTypeLoader() {
101
        return new CSVFeatureTypeLoader(this);
114 102
    }
115 103
    
116 104
    @Override

Also available in: Unified diff