KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > cocoon > components > crawler > CocoonCrawler


1 /*
2  * Copyright 1999-2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package org.apache.cocoon.components.crawler;
17
18
19 import org.apache.avalon.framework.component.Component;
20
21 import java.net.URL JavaDoc;
22 import java.util.Iterator JavaDoc;
23
24 /**
25  * The avalon behavioural component interface of crawling.
26  *
27  * @author <a HREF="mailto:berni_huber@a1.net">Bernhard Huber</a>
28  * @version CVS $Id: CocoonCrawler.java 30932 2004-07-29 17:35:38Z vgritsenko $
29  */

30 public interface CocoonCrawler extends Component
31 {
32     /**
33      * Role name of this avalon component.
34      * Its value is <code>org.apache.cocoon.components.crawler.CocoonCrawler</code>.
35      */

36     String JavaDoc ROLE = CocoonCrawler.class.getName();
37
38
39     /**
40      * This is the same as calling crawl(url,-1);
41      *
42      * @param url The URL to start crawling from.
43      */

44     void crawl(URL JavaDoc url);
45     
46     
47     /**
48      * start crawling the URL.
49      * <p>
50      * Calling this method initiates the crawling and tells the
51      * crawler not to crawl beyond a maximum depth.
52      * </p>
53      *
54      * @param url The URL to start crawling from
55      * @param maxDepth The maximum depth to crawl to. -1 for no maxiumum.
56      */

57     void crawl(URL JavaDoc url, int maxDepth);
58     
59
60     /**
61      * Iterate over crawling URLs.
62      * <p>
63      * This iterator will returns URL as result of crawling
64      * the base URL passed via crawling().
65      * </p>
66      *
67      * @return Iterator iterates over crawling URLs.
68      */

69     Iterator JavaDoc iterator();
70 }
71
72
Popular Tags