Package barrysoft.web

Examples of barrysoft.web.Parser.parseData()


    pr.addParam(new ParserRuleParam("city", "Rome"));
    pr.addParam(new ParserRuleParam("country", "Italy"));
   
    p.addRule(pr);
     
    p.parseData(plainData);
   
    String[][] results = p.getRule(0).getResults();
    checkResults(results, 1, new int[] {2});
   
    assertEquals("Wrong group data.", "Roma", results[0][0]);
View Full Code Here


    Parser p = new Parser("Time Parser");
    p.addRule(new ParserRule(timeRule));
   
    try {
     
      p.parseData(new WebDownloader(timeURL));
     
      String[][] results = p.getRule(0).getResults();
     
      checkResults(results, 1, new int[] {1});
View Full Code Here

    try {
     
      WebDownloader wd = new WebDownloader("http://www.italiansubs.net/index.php");
      wd.addFormElement("option", "com_remository");
     
      p.parseData(wd);

      String[][] results = p.getRule(0).getResults();
     
      int[] expected = new int[series.length];
      Arrays.fill(expected, 1);
View Full Code Here

      WebDownloader wd = new WebDownloader("http://www.italiansubs.net/index.php");
      wd.addFormElement("option", "com_remository");
      wd.addFormElement("func", "fileinfo");
      wd.addFormElement("id", "2126");
     
      p.parseData(wd);

      for (int i=0; i < multipleRules.length; i++) {
        String[][] results = p.getRule(i).getResults();
       
        checkResults(results, 1, new int[] {1});
View Full Code Here

      WebDownloader wd = new WebDownloader("http://www.italiansubs.net/index.php");
      wd.addFormElement("option", "com_remository");
      wd.addFormElement("func", "fileinfo");
      wd.addFormElement("id", "2126");
     
      p.parseData(wd);
     
      String[][] results = p.getRule(0).getResults();
      checkResults(results, 1, new int[] {1});
      System.out.println(results[0][0]);
     
View Full Code Here

    } catch (MalformedURLException e) {
      fail(e.getMessage());
    }
   
    try {
      p.parseData(dl);
    } catch (IllegalStateException e) {
      fail(e.getMessage());
    } catch (IOException e) {
      fail(e.getMessage());
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.