Пример #1
0
  public boolean checkFileName(CrawledLink link) {

    if (getFileNameRule() != null) {
      if (link.getLinkState() != LinkState.ONLINE) return false;

      return getFileNameRule().matches(link.getName());
    }
    return true;
  }
Пример #2
0
 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;
 }