KickJava   Java API By Example, From Geeks To Geeks.

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


1 package net.javacoding.jspider.core.rule.impl;
2
3
4 import net.javacoding.jspider.api.model.Decision;
5 import net.javacoding.jspider.api.model.Site;
6 import net.javacoding.jspider.core.SpiderContext;
7 import net.javacoding.jspider.spi.Rule;
8
9 import java.net.URL JavaDoc;
10
11
12 /**
13  * Base implemenation of a Rule. To be subclasses by concrete rules.
14  *
15  * $Id: BaseRuleImpl.java,v 1.10 2003/04/03 16:24:54 vanrogu Exp $
16  *
17  * @author Günther Van Roey
18  */

19 public abstract class BaseRuleImpl implements Rule {
20
21     /**
22      * Returns the name of the rule.
23      * @return the name of the rule
24      */

25     public String JavaDoc getName() {
26         return this.getClass().getName();
27     }
28
29     public abstract Decision apply(SpiderContext context, Site currentSite, URL JavaDoc url);
30
31 }
32
Popular Tags