Regain 2.1.0-STABLE API

net.sf.regain.crawler.config
Class PrefixUrlMatcher

java.lang.Object
  extended by net.sf.regain.crawler.config.UrlMatcherResult
      extended by net.sf.regain.crawler.config.PrefixUrlMatcher
All Implemented Interfaces:
UrlMatcher

public class PrefixUrlMatcher
extends UrlMatcherResult

A UrlMatcher that matches URLs that start with a certain prefix.

Author:
Tilman Schneider, STZ-IDA an der FH Karlsruhe

Field Summary
private static org.apache.log4j.Logger mLog
          The logger for this class.
private  String mUrlPrefix
          The prefix a URL must start with in order to be matched by this matcher.
 
Constructor Summary
PrefixUrlMatcher(String urlPrefix, boolean shouldBeParsed, boolean shouldBeIndexed)
          Creates a new instance of PrefixUrlMatcher.
 
Method Summary
 boolean matches(String url)
          Checks whether a URL matches to the rules of this matcher.
 String toString()
          Gets a String representation of this UrlMatcher.
 
Methods inherited from class net.sf.regain.crawler.config.UrlMatcherResult
getShouldBeIndexed, getShouldBeParsed, setShouldBeIndexed, setShouldBeParsed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

mLog

private static org.apache.log4j.Logger mLog
The logger for this class.


mUrlPrefix

private String mUrlPrefix
The prefix a URL must start with in order to be matched by this matcher.

Constructor Detail

PrefixUrlMatcher

public PrefixUrlMatcher(String urlPrefix,
                        boolean shouldBeParsed,
                        boolean shouldBeIndexed)
Creates a new instance of PrefixUrlMatcher.

Parameters:
urlPrefix - The prefix a URL must start with to be matched by this matcher.
Method Detail

matches

public boolean matches(String url)
Checks whether a URL matches to the rules of this matcher.

Specified by:
matches in interface UrlMatcher
Overrides:
matches in class UrlMatcherResult
Parameters:
url - The URL to check.
Returns:
Whether the given URL matches to the rules of this matcher.

toString

public String toString()
Gets a String representation of this UrlMatcher.

Overrides:
toString in class Object

Regain 2.1.0-STABLE API

Regain 2.1.0-STABLE, Copyright (C) 2004-2010 Til Schneider, www.murfman.de, Thomas Tesche, www.clustersystems.info