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

View differences:

DGNStore.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;
......
38 37
import org.gvsig.metadata.IMetadata;
39 38
import org.gvsig.metadata.IMetadataManager;
40 39
import org.gvsig.metadata.MetadataManager;
40
import org.gvsig.tools.exception.BaseException;
41 41

  
42 42
public class DGNStore extends FileStore{
43 43
	public static String DATASTORE_NAME = "DGNStore";
......
165 165
	}
166 166

  
167 167
	public DataCollection getDataCollection(FeatureType type, String filter, String order) throws ReadException {
168
		if (type==null){
169
			type=getDefaultFeatureType();
170
		}else{
171
			if (!type.isSubtypeOf(this.getDefaultFeatureType())){
172
				throw new ReadException("invalid type",this.getName());
173
			}
168
		try {
169
			type = this.checkFeatureTypeForCollection(type);
170
		} catch (DataException e) {
171
			throw new ReadException(this.getName(), e);
174 172
		}
173

  
175 174
		FeatureCollection coll;
176 175

  
177 176
		DataManager manager = DataManager.getManager();

Also available in: Unified diff