Revision 20421 trunk/libraries/libDataSourceBaseDrivers/src/org/gvsig/data/datastores/vectorial/file/dbf/DBFStore.java

View differences:

DBFStore.java
31 31
import org.gvsig.data.vectorial.IFeatureCollection;
32 32
import org.gvsig.data.vectorial.IFeatureID;
33 33
import org.gvsig.data.vectorial.IFeatureType;
34
import org.gvsig.data.vectorial.IsNotAttributeSettingException;
34 35
import org.gvsig.data.vectorial.IsNotFeatureSettingException;
35 36
import org.gvsig.exceptions.BaseException;
36 37
import org.gvsig.metadata.IMetadata;
......
54 55
			dbf.open(file);
55 56
			featureType=new DefaultFeatureType();
56 57
			    for (int i = 0; i < dbf.getFieldCount(); i++) {
57
			    	IFeatureAttributeDescriptor fad=createFeatureAttribute(i);
58
			    	IFeatureAttributeDescriptor fad;
59
					try {
60
						fad = createFeatureAttribute(i);
61
					} catch (IsNotAttributeSettingException e) {
62
						throw new InitializeException(this.getName(),e);
63
					}
58 64
	                featureType.add(fad);
59 65
	            }
60 66
	    }
61 67

  
62 68

  
63
	 private IFeatureAttributeDescriptor createFeatureAttribute(int i) {
69
	 private IFeatureAttributeDescriptor createFeatureAttribute(int i) throws IsNotAttributeSettingException {
64 70
	        char fieldType = dbf.getFieldType(i);
65 71
	        DefaultAttributeDescriptor dad=new DefaultAttributeDescriptor();
72
	        dad.loading();
66 73
	        dad.setName(dbf.getFieldName(i));
67 74
	        dad.setSize(dbf.getFieldLength(i));
68 75
	        if (fieldType == 'L') {
......
83 90
	        } else {
84 91
//	            throw new BadFieldDriverException(getName(),null,String.valueOf(fieldType));
85 92
	        }
93
	        dad.stopLoading();
86 94
	      	return dad;
87 95

  
88 96
	    }
89 97

  
90
	protected void doFinishEdition() throws WriteException, ReadException, IsNotFeatureSettingException {
98
	protected void doFinishEdition() throws WriteException, ReadException {
91 99
		IFeaturesWriter writer = getFeaturesWriter();
92 100
        writer.init(this);
93 101
        writer.updateFeatureType(featureType);
......
119 127

  
120 128
	}
121 129

  
122
	public IFeature getFeatureByID(IFeatureID id) throws ReadException, IsNotFeatureSettingException {
130
	public IFeature getFeatureByID(IFeatureID id) throws ReadException {
123 131
		if (this.alterMode){
124 132
    		if (featureManager.contains(id)) {
125 133
    			return featureManager.getFeature(id);
......
224 232
		return metadata;
225 233
	}
226 234

  
227
	protected IFeature getFeatureByPosition(IFeatureType ft,long position) throws ReadException, IsNotFeatureSettingException {
235
	protected IFeature getFeatureByPosition(IFeatureType ft,long position) throws ReadException {
228 236
//		 Field Type (C  or M)
229 237
//       char cfieldType = fieldTypes[fieldId];
230 238
//       int fieldType = getFieldType(fieldId);

Also available in: Unified diff