Revision 23303 branches/v2_0_0_prep/libraries/libFMap_dataFile/src/org/gvsig/fmap/data/feature/file/dbf/DBFStore.java

View differences:

DBFStore.java
7 7
import java.util.Iterator;
8 8
import java.util.List;
9 9

  
10
import org.gvsig.tools.exception.BaseException;
11 10
import org.gvsig.fmap.data.CloseException;
12 11
import org.gvsig.fmap.data.DataCollection;
13 12
import org.gvsig.fmap.data.DataException;
......
35 34
import org.gvsig.metadata.IMetadata;
36 35
import org.gvsig.metadata.IMetadataManager;
37 36
import org.gvsig.metadata.MetadataManager;
37
import org.gvsig.tools.exception.BaseException;
38 38

  
39 39
public class DBFStore extends FileStore {
40 40
	public static String DATASTORE_NAME = "DBFStore";
......
137 137
	}
138 138

  
139 139
	public DataCollection getDataCollection(FeatureType type, String filter, String order) throws ReadException {
140
		if (type==null){
141
			type=getDefaultFeatureType();
142
		} else {
143
			if (!type.isSubtypeOf(this.getDefaultFeatureType())){
144
				throw new ReadException("invalid type",this.getName());
145
			}
140
		try {
141
			type = this.checkFeatureTypeForCollection(type);
142
		} catch (DataException e) {
143
			throw new ReadException(this.getName(), e);
146 144
		}
145

  
147 146
		FeatureCollection coll;
148 147
		if (order == null){
149 148
			if (featureManager==null){

Also available in: Unified diff