KickJava   Java API By Example, From Geeks To Geeks.

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


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: RobotsTXTSkippedRule.java,v 1.2 2003/04/03 15:57:16 vanrogu Exp $
12  */

13 public class RobotsTXTSkippedRule extends BaseRuleImpl {
14
15     /**
16      * Applies the rule to the given url.
17      * @param context the context we're spidering under
18      * @param currentSite the site we're currently spidering
19      * @param url the url to be evaluated
20      * @return Decision object telling whether the url should be accepted.
21      * This implementation always returns an accept decision.
22      */

23     public Decision apply(SpiderContext context, Site currentSite, URL JavaDoc url) {
24         return new DecisionInternal(Decision.RULE_ACCEPT, "robots.txt was skipped for site - so all resources are accepted");
25     }
26
27 }
28
Popular Tags