public boolean checkFileName(CrawledLink link) { if (getFileNameRule() != null) { if (link.getLinkState() != LinkState.ONLINE) return false; return getFileNameRule().matches(link.getName()); } return true; }
public boolean checkFileType(CrawledLink link) { if (getFiletypeFilter() != null) { if (link.getLinkState() != LinkState.ONLINE) return false; String ext = Files.getExtension(link.getName()); if (ext == null) return true; return getFiletypeFilter().matches(ext); } return true; }