org.erowid.sperowider.urlfilter
Class OneHopRegexSperowiderFilter

java.lang.Object
  extended byorg.erowid.sperowider.urlfilter.ADumbIndexFilter
      extended byorg.erowid.sperowider.urlfilter.OneHopRegexSperowiderFilter
All Implemented Interfaces:
IDownloadFilter, IIndexFilter, IInitializableObject, ISperowiderFilter, ISpiderFilter

public class OneHopRegexSperowiderFilter
extends ADumbIndexFilter
implements ISperowiderFilter, IInitializableObject

This class functions as filter to implement One-Hop logic using Regex for downloading and spidering.

Version:
: $Header: /cvsroot/sperowider/SPEROWIDER_MODULE/javasource/org/erowid/sperowider/urlfilter/OneHopRegexSperowiderFilter.java,v 1.3 2005/04/19 07:02:22 gurustu Exp $
Author:
: $Author: gurustu $

Constructor Summary
OneHopRegexSperowiderFilter()
           
 
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 or source Urls is in the include list, and the found URL is not in the excludes list.
 
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

OneHopRegexSperowiderFilter

public OneHopRegexSperowiderFilter()
Method Detail

getDownloadSpiderFilter

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


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 or source Urls is in the include list, and the found URL is not in the excludes list.

Specified by:
spiderMatch in interface ISpiderFilter

init

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

Specified by:
init in interface IInitializableObject
Throws:
SperowiderInstantiationException

spero logo small Sperowider is
© 2005 Erowid.org