root / branches / v2_0_0_prep / libraries / libFMap_dataFile / src / org / gvsig / fmap / data / store / shp / SHPFileFilter.java @ 24452
History | View | Annotate | Download (596 Bytes)
1 |
package org.gvsig.fmap.data.store.shp; |
---|---|
2 |
|
3 |
import java.io.File; |
4 |
|
5 |
import org.gvsig.fmap.data.explorer.filesystem.FilesystemFileFilter; |
6 |
import org.gvsig.fmap.data.feature.file.shp.utils.SHP; |
7 |
|
8 |
public class SHPFileFilter implements FilesystemFileFilter { |
9 |
|
10 |
public String getDataStoreProviderName() { |
11 |
return SHPStoreProvider.NAME;
|
12 |
} |
13 |
|
14 |
public boolean accept(File pathname) { |
15 |
return (pathname.getName().toLowerCase().endsWith(".shp")) |
16 |
&& SHP.getDbfFile(pathname).exists() |
17 |
&& SHP.getShxFile(pathname).exists(); |
18 |
} |
19 |
|
20 |
public String getDescription() { |
21 |
return SHPStoreProvider.DESCRIPTION;
|
22 |
} |
23 |
|
24 |
} |