01: package net.javacoding.jspider.core.rule.impl;
02:
03: import net.javacoding.jspider.api.model.Decision;
04: import net.javacoding.jspider.api.model.Site;
05: import net.javacoding.jspider.core.SpiderContext;
06: import net.javacoding.jspider.core.model.DecisionInternal;
07:
08: import java.net.URL;
09:
10: /**
11: * $Id: RobotsTXTErrorRule.java,v 1.2 2003/04/03 15:57:16 vanrogu Exp $
12: */
13: public class RobotsTXTErrorRule extends BaseRuleImpl {
14: /**
15: * Applies the rule to the given url.
16: * @param context the context we're spidering under
17: * @param currentSite the site we're currently spidering
18: * @param url the url to be evaluated
19: * @return Decision object telling whether the url should be accepted.
20: * This implementation always returns a reject decision.
21: */
22: public Decision apply(SpiderContext context, Site currentSite,
23: URL url) {
24: return new DecisionInternal(Decision.RULE_IGNORE,
25: "robots.txt fetch resulted in an error - all resources in site are ignored");
26: }
27:
28: }
|