Regain 2.1.0-STABLE API

net.sf.regain.crawler.config
Class UrlMatcherResult

java.lang.Object
  extended by net.sf.regain.crawler.config.UrlMatcherResult
All Implemented Interfaces:
UrlMatcher
Direct Known Subclasses:
PrefixUrlMatcher, RegexUrlMatcher

public class UrlMatcherResult
extends Object
implements UrlMatcher

An UrlMatcherResult that implements the UrlMatcher interface. This URLMatcher holds only the result of another URLMatcher.

Author:
Thomas Tesche, cluster:Consult, http://www.thtesche.com/

Field Summary
private  boolean mMatches
          The result of the matching.
private  boolean mShouldBeIndexed
          The content indexing flag
private  boolean mShouldBeParsed
          The link extraction flag
 
Constructor Summary
UrlMatcherResult(boolean shouldBeParsed, boolean shouldBeIndexed)
          Creates a new instance of UrlMatcher.
 
Method Summary
 boolean getShouldBeIndexed()
          Gets a flag whether the content should be indexed.
 boolean getShouldBeParsed()
          Gets a flag whether links should be extracted from the content
 boolean matches(String url)
          Checks whether a URL matches to the rules of this matcher.
 void setShouldBeIndexed(boolean shouldBeIndexed)
          Sets a flag whether the content should be indexed.
 void setShouldBeParsed(boolean shouldBeParsed)
          Sets a flag whether links should be extracted from the content
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mShouldBeParsed

private boolean mShouldBeParsed
The link extraction flag


mShouldBeIndexed

private boolean mShouldBeIndexed
The content indexing flag


mMatches

private boolean mMatches
The result of the matching.

Constructor Detail

UrlMatcherResult

public UrlMatcherResult(boolean shouldBeParsed,
                        boolean shouldBeIndexed)
Creates a new instance of UrlMatcher.

Parameters:
shouldBeParsed, - whether from a match for matches(url) possibly inclosed links should be extracted.
shouldBeIndexed - whether from a match for matches(url) the content from the URL should be indexed.
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
Parameters:
url - The URL to check.
Returns:
Whether the given URL matches to the rules of this matcher.

getShouldBeParsed

public boolean getShouldBeParsed()
Gets a flag whether links should be extracted from the content

Specified by:
getShouldBeParsed in interface UrlMatcher
Returns:
Whether from a match for matches(url) possibly inclosed links should be extracted.

getShouldBeIndexed

public boolean getShouldBeIndexed()
Gets a flag whether the content should be indexed.

Specified by:
getShouldBeIndexed in interface UrlMatcher
Returns:
Whether from a match for matches(url) the content from the URL should be indexed.

setShouldBeParsed

public void setShouldBeParsed(boolean shouldBeParsed)
Sets a flag whether links should be extracted from the content

Specified by:
setShouldBeParsed in interface UrlMatcher

setShouldBeIndexed

public void setShouldBeIndexed(boolean shouldBeIndexed)
Sets a flag whether the content should be indexed.

Specified by:
setShouldBeIndexed in interface UrlMatcher

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