KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > javacoding > jspider > core > rule > impl > RobotsTXTErrorRule


1 package net.javacoding.jspider.core.rule.impl;
2
3 import net.javacoding.jspider.api.model.Decision;
4 import net.javacoding.jspider.api.model.Site;
5 import net.javacoding.jspider.core.SpiderContext;
6 import net.javacoding.jspider.core.model.DecisionInternal;
7
8 import java.net.URL JavaDoc;
9
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, URL JavaDoc url) {
23         return new DecisionInternal(Decision.RULE_IGNORE, "robots.txt fetch resulted in an error - all resources in site are ignored");
24     }
25
26 }
27
Popular Tags