/**
* @return
*/
private IOFileFilter createDefaultGranuleExclusionFilter() {
final IOFileFilter specialWildCardFileFilter = new WildcardFileFilter(configHandler
.getRunConfiguration().getParameter(Prop.WILDCARD), IOCase.INSENSITIVE);
IOFileFilter dirFilter = FileFilterUtils.and(FileFilterUtils.directoryFileFilter(),
HiddenFileFilter.VISIBLE);
IOFileFilter filesFilter = Utils.excludeFilters(FileFilterUtils
.makeSVNAware(FileFilterUtils.makeFileOnly(FileFilterUtils.and(
specialWildCardFileFilter, HiddenFileFilter.VISIBLE))), FileFilterUtils
.suffixFileFilter("shp"), FileFilterUtils.suffixFileFilter("dbf"), FileFilterUtils
.suffixFileFilter("sbn"), FileFilterUtils.suffixFileFilter("sbx"), FileFilterUtils
.suffixFileFilter("shx"), FileFilterUtils.suffixFileFilter("qix"), FileFilterUtils
.suffixFileFilter("lyr"), FileFilterUtils.suffixFileFilter("prj"), FileFilterUtils
.nameFileFilter("error.txt"), FileFilterUtils.nameFileFilter("error.txt.lck"),
FileFilterUtils.suffixFileFilter("properties"), FileFilterUtils
.suffixFileFilter("svn-base"), FileFilterUtils.suffixFileFilter("ncx"),
FileFilterUtils.suffixFileFilter("gbx9"));
filesFilter = FileFilterUtils.or(filesFilter,
FileFilterUtils.nameFileFilter("indexer.properties"));
// exclude common extensions
Set<String> extensions = WorldImageFormat.getWorldExtension("png");
for (String ext : extensions) {
filesFilter = FileFilterUtils.and(filesFilter, FileFilterUtils
.notFileFilter(FileFilterUtils.suffixFileFilter(ext.substring(1))));
}
extensions = WorldImageFormat.getWorldExtension("gif");
for (String ext : extensions) {
filesFilter = FileFilterUtils.and(filesFilter, FileFilterUtils
.notFileFilter(FileFilterUtils.suffixFileFilter(ext.substring(1))));
}
extensions = WorldImageFormat.getWorldExtension("jpg");
for (String ext : extensions) {
filesFilter = FileFilterUtils.and(filesFilter, FileFilterUtils
.notFileFilter(FileFilterUtils.suffixFileFilter(ext.substring(1))));
}
extensions = WorldImageFormat.getWorldExtension("tiff");
for (String ext : extensions) {
filesFilter = FileFilterUtils.and(filesFilter, FileFilterUtils
.notFileFilter(FileFilterUtils.suffixFileFilter(ext.substring(1))));
}
extensions = WorldImageFormat.getWorldExtension("bmp");
for (String ext : extensions) {
filesFilter = FileFilterUtils.and(filesFilter, FileFilterUtils
.notFileFilter(FileFilterUtils.suffixFileFilter(ext.substring(1))));
}
// sdw
filesFilter = FileFilterUtils.and(filesFilter,
FileFilterUtils.notFileFilter(FileFilterUtils.suffixFileFilter("sdw"))
, FileFilterUtils.notFileFilter(FileFilterUtils.suffixFileFilter("aux"))
, FileFilterUtils.notFileFilter(FileFilterUtils.suffixFileFilter("wld"))
, FileFilterUtils.notFileFilter(FileFilterUtils.suffixFileFilter("svn")));
if (this.fileFilter != null) {
filesFilter = FileFilterUtils.and(this.fileFilter, filesFilter);
}
final IOFileFilter finalFilter = FileFilterUtils.or(dirFilter, filesFilter);
return finalFilter;
}