BaseRuleImpl.java
上传用户:qing5858
上传日期:2015-10-27
资源大小:6056k
文件大小:1k
源码类别:

搜索引擎

开发平台:

Java

  1. package net.javacoding.jspider.core.rule.impl;
  2. import net.javacoding.jspider.api.model.Decision;
  3. import net.javacoding.jspider.api.model.Site;
  4. import net.javacoding.jspider.core.SpiderContext;
  5. import net.javacoding.jspider.spi.Rule;
  6. import java.net.URL;
  7. /**
  8.  * Base implemenation of a Rule.  To be subclasses by concrete rules.
  9.  *
  10.  * $Id: BaseRuleImpl.java,v 1.10 2003/04/03 16:24:54 vanrogu Exp $
  11.  *
  12.  * @author G黱ther Van Roey
  13.  */
  14. public abstract class BaseRuleImpl implements Rule {
  15.     /**
  16.      * Returns the name of the rule.
  17.      * @return the name of the rule
  18.      */
  19.     public String getName() {
  20.         return this.getClass().getName();
  21.     }
  22.     public abstract Decision apply(SpiderContext context, Site currentSite, URL url);
  23. }