org.apache.cocoon.components.crawler
Interface CocoonCrawler

All Known Implementing Classes:
SimpleCocoonCrawlerImpl

public interface CocoonCrawler

The avalon behavioural component interface of crawling.

Version:
$Id: CocoonCrawler.html 1304280 2012-03-23 11:18:01Z ilgrosso $

Field Summary
static String ROLE
          Role name of this avalon component.
 
Method Summary
 void crawl(URL url)
          This is the same as calling crawl(url,-1);
 void crawl(URL url, int maxDepth)
          start crawling the URL.
 Iterator iterator()
          Iterate over crawling URLs.
 

Field Detail

ROLE

public static final String ROLE
Role name of this avalon component. Its value is org.apache.cocoon.components.crawler.CocoonCrawler.

Method Detail

crawl

public void crawl(URL url)
This is the same as calling crawl(url,-1);

Parameters:
url - The URL to start crawling from.

crawl

public void crawl(URL url,
                  int maxDepth)
start crawling the URL.

Calling this method initiates the crawling and tells the crawler not to crawl beyond a maximum depth.

Parameters:
url - The URL to start crawling from
maxDepth - The maximum depth to crawl to. -1 for no maxiumum.

iterator

public Iterator iterator()
Iterate over crawling URLs.

This iterator will returns URL as result of crawling the base URL passed via crawling().

Returns:
Iterator iterates over crawling URLs.


Copyright © 1999-2008 The Apache Software Foundation. All Rights Reserved.