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

View differences:

DXFStore.java
9 9
import java.util.List;
10 10
import java.util.TreeSet;
11 11

  
12
import org.gvsig.tools.exception.BaseException;
13 12
import org.gvsig.fmap.data.CloseException;
14 13
import org.gvsig.fmap.data.DataCollection;
15 14
import org.gvsig.fmap.data.DataException;
......
39 38
import org.gvsig.metadata.IMetadata;
40 39
import org.gvsig.metadata.IMetadataManager;
41 40
import org.gvsig.metadata.MetadataManager;
41
import org.gvsig.tools.exception.BaseException;
42 42

  
43 43
public class DXFStore extends FileStore {
44 44
	public static String DATASTORE_NAME = "DXFStore";
......
190 190
	}
191 191

  
192 192
	public DataCollection getDataCollection(FeatureType type, String filter, String order) throws ReadException {
193
		if (type==null){
194
			type=getDefaultFeatureType();
195
		} else {
196
			if (!type.isSubtypeOf(this.getDefaultFeatureType())){
197
				throw new ReadException("invalid type",this.getName());
198
			}
193
		try {
194
			type = this.checkFeatureTypeForCollection(type);
195
		} catch (DataException e) {
196
			throw new ReadException(this.getName(), e);
199 197
		}
198

  
200 199
		FeatureCollection coll;
201 200
		DataManager manager = DataManager.getManager();
202 201

  

Also available in: Unified diff