01: /*
02: * Copyright 2005 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.filter;
18:
19: /**
20: * Defines a filter for links which should be further crawled.
21: *
22: * @author Lars Torunski
23: * @version $Revision: 1.3 $
24: */
25: public interface ILinkFilter {
26:
27: /**
28: * @param origin the complete URI of the page which contains the link
29: * @param link the absolut path of the to be checked link
30: *
31: * @return true if the <code>link</code> should be followed and returns
32: * false if <code>link</code> is null.
33: */
34: boolean accept(String origin, String link);
35:
36: }
|