Package org.apache.droids

Examples of org.apache.droids.LinkTask


   * Setting Anchor text of last added anchor
   * @param anchorText Text to be added
   */
  private void addAnchorText(String anchorText) {
    if (!links.isEmpty()) {
      LinkTask l = (LinkTask) links.get(links.size() - 1);
      l.setAnchorText(anchorText.replaceAll("\\s+", " ").trim());
      LOG.debug("Adding anchor: " + l.getAnchorText() + " on link: " + l);
    }
  }
View Full Code Here


    if (history == null)
      history = new HashSet<String>();
    if (links == null)
      links = new ArrayList<Link>();
    if (history.add(link.toString())) {
      links.add(new LinkTask(base, link, base.getDepth() + 1));
      LOG.debug("Added outlink: " + link + " with depth: " + base.getDepth() + 1);
    }
  }
View Full Code Here

TOP

Related Classes of org.apache.droids.LinkTask

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.