Package com.flaptor.hounder.crawler

Examples of com.flaptor.hounder.crawler.UrlPatterns$PatternAndTokens


        super(name, globalConfig);
        maxTitleLength = getModuleConfig().getInt("max.title.length");
        titleSpamActive = (maxTitleLength > 0);
        String urlPatternFile = getModuleConfig().getString("url.pattern.file");
        urlMatchSpamActive = !("".equals(urlPatternFile));
        patterns = new UrlPatterns(urlPatternFile);
    }
View Full Code Here


   */
    public MatchUrlModule (String name, Config globalConfig) throws IOException{
        super(name, globalConfig);
        String filename = getModuleConfig().getString("url.pattern.file");
        String filepath = FileUtil.getFilePathFromClasspath(filename);
        patterns = new UrlPatterns(filepath); // TODO: hotspots should be singleton, otherwise we have two copies in ram.
    }
View Full Code Here

            logger.error(error);
            // TODO check what kind of exception to throw
            throw new RuntimeException(error);
        }
        try {
            patterns = new UrlPatterns(filename);
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
View Full Code Here

  /**
   * @todo UrlPatterns are not singleton, but should be. @link UrlPatterns
   */
    public WhiteListModule (String name, Config globalConfig) throws IOException{
        super(name, globalConfig);
        patterns = new UrlPatterns(getModuleConfig().getString("whitelist.file"));
    }
View Full Code Here

                patterns.add(list);
            }
        }

        try {
            this.urlPatterns = new UrlPatterns(patternFile.getAbsolutePath());
        } catch (Exception e) {
            this.urlPatterns = null;
        }
       
        return patterns;
View Full Code Here

            writer.newLine();
        }
        writer.close();

        patterns = list;
        urlPatterns = new UrlPatterns(orig.getAbsolutePath());
    }
View Full Code Here

        super(config);
        field = config.getString("method.keyword.applyto.field");
        String filename = config.getString("method.keyword.patterns.file");
        String filepath = FileUtil.getFilePathFromClasspath(filename);
        try {
            patterns = new UrlPatterns(filepath);
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
View Full Code Here

    public UrlPatternBoostCondition (Config config) {
        super(config);
        String filename = config.getString("condition.url.patterns.file");
        String filepath = FileUtil.getFilePathFromClasspath(filename);
        try {
            patterns = new UrlPatterns(filepath);
        } catch (IOException e) {  
            throw new RuntimeException(e);
        }
    }
View Full Code Here

TOP

Related Classes of com.flaptor.hounder.crawler.UrlPatterns$PatternAndTokens

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.