org.erowid.sperowider.urlfilter
Class NoHopSimpleSperowiderFilter

java.lang.Object
  extended byorg.erowid.sperowider.urlfilter.ADumbIndexFilter
      extended byorg.erowid.sperowider.urlfilter.NoHopSimpleSperowiderFilter
All Implemented Interfaces:
IDownloadFilter, IIndexFilter, IInitializableObject, ISperowiderFilter, ISpiderFilter
Direct Known Subclasses:
SimpleURLFilter, URLFilter

public class NoHopSimpleSperowiderFilter
extends ADumbIndexFilter
implements ISperowiderFilter, IInitializableObject

This class functions as filter to implement No-Hop logic using Regex for downloading and spidering. The found Url will always have to appear on the includes list and not appear on the excludes list.

Version:
: $Header: /cvsroot/sperowider/SPEROWIDER_MODULE/javasource/org/erowid/sperowider/urlfilter/NoHopSimpleSperowiderFilter.java,v 1.2 2005/01/16 06:47:26 gurustu Exp $
Author:
: $Author: gurustu $

Constructor Summary
NoHopSimpleSperowiderFilter()
           
 
Method Summary
 boolean downloadMatch(String url)
          Returns true if the passed in URL matches at least one of the include patterns, and matches none of the exclude patterns.
 AIncludeExcludeFilter getDownloadSpiderFilter()
          Returns the filter used to make decisions about what Urls to download and spider.
 void init(Element configNode)
          Implements filter config
 boolean spiderMatch(String sourceUrl, String foundUrl)
          Returns true if the found URL matches at least one of the include patterns, and matches none of the exclude patterns.
 
Methods inherited from class org.erowid.sperowider.urlfilter.ADumbIndexFilter
indexMatch
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.erowid.sperowider.urlfilter.IIndexFilter
indexMatch
 

Constructor Detail

NoHopSimpleSperowiderFilter

public NoHopSimpleSperowiderFilter()
Method Detail

getDownloadSpiderFilter

public AIncludeExcludeFilter getDownloadSpiderFilter()
Returns the filter used to make decisions about what Urls to download and spider.


init

public void init(Element configNode)
          throws SperowiderInstantiationException
Implements filter config

Specified by:
init in interface IInitializableObject
Throws:
SperowiderInstantiationException

downloadMatch

public boolean downloadMatch(String url)
Returns true if the passed in URL matches at least one of the include patterns, and matches none of the exclude patterns.

Specified by:
downloadMatch in interface IDownloadFilter

spiderMatch

public boolean spiderMatch(String sourceUrl,
                           String foundUrl)
Returns true if the found URL matches at least one of the include patterns, and matches none of the exclude patterns. The source URL is ignored.

Specified by:
spiderMatch in interface ISpiderFilter

spero logo small Sperowider is
© 2005 Erowid.org