svn-gvsig-desktop / branches / v2_0_0_prep / libraries / libFMap_dalfile / src / org / gvsig / fmap / dal / store / dbf / DBFFileFilter.java @ 24569
History | View | Annotate | Download (939 Bytes)
1 |
package org.gvsig.fmap.dal.store.dbf; |
---|---|
2 |
|
3 |
import java.io.File; |
4 |
|
5 |
import org.gvsig.fmap.dal.DALLocator; |
6 |
import org.gvsig.fmap.dal.DataManager; |
7 |
import org.gvsig.fmap.dal.DataStoreParameters; |
8 |
import org.gvsig.fmap.dal.exception.DataException; |
9 |
import org.gvsig.fmap.dal.explorer.filesystem.FilesystemFileFilter; |
10 |
|
11 |
public class DBFFileFilter implements FilesystemFileFilter { |
12 |
|
13 |
public String getDataStoreProviderName() { |
14 |
return DBFStoreProvider.NAME;
|
15 |
} |
16 |
|
17 |
public boolean accept(File pathname) { |
18 |
return (pathname.getName().toLowerCase().endsWith(".dbf")); |
19 |
} |
20 |
|
21 |
public String getDescription() { |
22 |
return DBFStoreProvider.DESCRIPTION;
|
23 |
} |
24 |
|
25 |
public DataStoreParameters getParameters(File file) throws DataException { |
26 |
DataManager manager = DALLocator.getDataManager(); |
27 |
DBFStoreParameters params = (DBFStoreParameters) manager |
28 |
.createStoreParameters(this.getDataStoreProviderName());
|
29 |
params.setDBFFile(file.getPath()); |
30 |
return params;
|
31 |
} |
32 |
|
33 |
} |