Package org.apache.droids.helper.factories

Examples of org.apache.droids.helper.factories.ParserFactory


    return handlerFactory;
  }
 
  public static Droid<Link> createSimpleSaveCrawlingDroid(
      String targetURI) {
    ParserFactory parserFactory = createDefaultParserFactory();
    ProtocolFactory protocolFactory = createDefaultProtocolFactory();
    URLFiltersFactory filtersFactory = createDefaultURLFiltersFactory();

    SimpleDelayTimer simpleDelayTimer = new SimpleDelayTimer();
    simpleDelayTimer.setDelayMillis(100);
View Full Code Here


    return crawler;
  }
 
  public static Droid<Link> createSimpleReportCrawlingDroid(
      String targetURI) {
    ParserFactory parserFactory = createDefaultParserFactory();
    ProtocolFactory protocolFactory = createDefaultProtocolFactory();
    URLFiltersFactory filtersFactory = createDefaultURLFiltersFactory();

    SimpleDelayTimer simpleDelayTimer = new SimpleDelayTimer();
    simpleDelayTimer.setDelayMillis(100);
View Full Code Here

    return crawler;
  }
 
  public static Droid<Link> createSimpleExceptionCrawlingDroid(
      String targetURI) {
    ParserFactory parserFactory = createDefaultParserFactory();
    ProtocolFactory protocolFactory = createDefaultProtocolFactory();
    URLFiltersFactory filtersFactory = createDefaultURLFiltersFactory();

    SimpleDelayTimer simpleDelayTimer = new SimpleDelayTimer();
    simpleDelayTimer.setDelayMillis(100);
View Full Code Here

      System.exit(-1);
    }
    String targetURL = args[0];
   
    // Create parser factory. Support basic HTML markup only
    ParserFactory parserFactory = new ParserFactory();
    HtmlParser htmlParser = new HtmlParser();
    htmlParser.setElements(new HashMap<String, String>());
    htmlParser.getElements().put("a", "href");
    htmlParser.getElements().put("link", "href");
    htmlParser.getElements().put("img", "src");
    htmlParser.getElements().put("script", "src");
    parserFactory.getMap().put("text/html", htmlParser);

    // Create protocol factory. Support HTTP/S only.
    ProtocolFactory protocolFactory = new ProtocolFactory();
   
    // Create and configure HTTP client
View Full Code Here

TOP

Related Classes of org.apache.droids.helper.factories.ParserFactory

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.