Package com.crawljax.core

Examples of com.crawljax.core.TagElement


        TagAttribute tag =
                new TagAttribute(crawlAttribute.getName(), crawlAttribute.getValue());
        attributes.add(tag);
      }

      TagElement tagElement = new TagElement(attributes, crawlElement.getTagName());

      tagElement.setId(crawlElement.getId());

      tagElements.add(tagElement);
    }

    return tagElements;
View Full Code Here


        TagAttribute tag =
                new TagAttribute(crawlAttribute.getName(), crawlAttribute.getValue());
        attributes.add(tag);
      }

      TagElement tagElement = new TagElement(attributes, crawlElement.getTagName());

      tagElement.setId(crawlElement.getId());

      tagElements.add(tagElement);
    }

    return tagElements;
View Full Code Here

   */
  @SuppressWarnings("unchecked")
  private void setClickTags(PropertiesConfiguration file, CrawlSpecification crawler) {
    /* set click tags */
    List<String> tags = file.getList(CRAWLTAGS);
    TagElement tagElement;

    /* walk through all elements */
    for (String tag : tags) {
      /* call the correct api stuff on the crawler for tag */
      tagElement = parseTagElement(tag);

      CrawlElement element = crawler.click(tagElement.getName());
      for (TagAttribute attrib : tagElement.getAttributes()) {
        element.withAttribute(attrib.getName(), attrib.getValue());
      }
    }

    /* do the same for the exclude tags */
    tags = file.getList(CRAWLEXCLUDETAGS);

    /* walk through all elements */
    for (String tag : tags) {
      /* call the correct api stuff on the crawler for tag */
      tagElement = parseTagElement(tag);

      CrawlElement element = crawler.dontClick(tagElement.getName());
      for (TagAttribute attrib : tagElement.getAttributes()) {
        element.withAttribute(attrib.getName(), attrib.getValue());
      }
    }
  }
View Full Code Here

      matcher = patternId.matcher(substring);
      if (matcher.find()) {
        id = matcher.group(2);
      }

      TagElement el = new TagElement(attributes, name);
      if (id != null) {
        el.setId(id);
      }
      return el;
    }

    return null;
View Full Code Here

   */
  @SuppressWarnings("unchecked")
  private void setClickTags(PropertiesConfiguration file, CrawlSpecification crawler) {
    /* set click tags */
    List<String> tags = file.getList(CRAWLTAGS);
    TagElement tagElement;

    /* walk through all elements */
    for (String tag : tags) {
      /* call the correct api stuff on the crawler for tag */
      tagElement = parseTagElement(tag);

      CrawlElement element = crawler.click(tagElement.getName());
      for (TagAttribute attrib : tagElement.getAttributes()) {
        element.withAttribute(attrib.getName(), attrib.getValue());
      }
    }

    /* do the same for the exclude tags */
    tags = file.getList(CRAWLEXCLUDETAGS);

    /* walk through all elements */
    for (String tag : tags) {
      /* call the correct api stuff on the crawler for tag */
      tagElement = parseTagElement(tag);

      CrawlElement element = crawler.dontClick(tagElement.getName());
      for (TagAttribute attrib : tagElement.getAttributes()) {
        element.withAttribute(attrib.getName(), attrib.getValue());
      }
    }
  }
View Full Code Here

      matcher = patternId.matcher(substring);
      if (matcher.find()) {
        id = matcher.group(2);
      }

      TagElement el = new TagElement(attributes, name);
      if (id != null) {
        el.setId(id);
      }
      return el;
    }

    return null;
View Full Code Here

        TagAttribute tag =
                new TagAttribute(crawlAttribute.getName(), crawlAttribute.getValue());
        attributes.add(tag);
      }

      TagElement tagElement = new TagElement(attributes, crawlElement.getTagName());

      tagElement.setId(crawlElement.getId());

      tagElements.add(tagElement);
    }

    return tagElements;
View Full Code Here

        TagAttribute tag =
                new TagAttribute(crawlAttribute.getName(), crawlAttribute.getValue());
        attributes.add(tag);
      }

      TagElement tagElement = new TagElement(attributes, crawlElement.getTagName());

      tagElement.setId(crawlElement.getId());

      tagElements.add(tagElement);
    }

    return tagElements;
View Full Code Here

TOP

Related Classes of com.crawljax.core.TagElement

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.