01: /*
02: * Copyright 2005, 2006 by Lars Torunski
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
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: */
17: package com.torunski.crawler.core;
18:
19: import com.torunski.crawler.events.IParserEventListener;
20: import com.torunski.crawler.filter.ILinkFilter;
21: import com.torunski.crawler.model.ICrawlerModel;
22: import com.torunski.crawler.parser.IParser;
23:
24: /**
25: * All crawlers implement the common methods descriped below.
26: *
27: * @author Lars Torunski
28: * @version $Revision: 1.5 $
29: */
30: public interface ICrawler {
31:
32: /**
33: * @return Returns the parser.
34: */
35: IParser getParser();
36:
37: /**
38: * @param parser The parser to set.
39: */
40: void setParser(IParser parser);
41:
42: /**
43: * @return Returns the crawler model.
44: */
45: ICrawlerModel getModel();
46:
47: /**
48: * @param model The crawler model to set.
49: */
50: void setModel(ICrawlerModel model);
51:
52: /**
53: * @return Returns the linkFilter.
54: */
55: ILinkFilter getLinkFilter();
56:
57: /**
58: * @param linkFilter The linkFilter to set.
59: */
60: void setLinkFilter(ILinkFilter linkFilter);
61:
62: /**
63: * @param l listener to be added to the event list.
64: */
65: void addParserListener(IParserEventListener l);
66:
67: /**
68: * @param l listener to be removed from the event list.
69: */
70: void removeParserListener(IParserEventListener l);
71:
72: /**
73: * Starts the crawling process.
74: */
75: void start();
76:
77: }
|