|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.nutch.urlfilter.api.RegexRule
public abstract class RegexRule
A generic regular expression rule.
Constructor Summary | |
---|---|
protected |
RegexRule(boolean sign,
String regex)
Constructs a new regular expression rule. |
Method Summary | |
---|---|
protected boolean |
accept()
Return if this rule is used for filtering-in or out. |
protected abstract boolean |
match(String url)
Checks if a url matches this rule. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected RegexRule(boolean sign, String regex)
sign
- specifies if this rule must filter-in or filter-out.
A true
value means that any url matching this rule
must be accepted, a false
value means that any url
matching this rule must be rejected.regex
- is the regular expression used for matching (see
match(String)
method).Method Detail |
---|
protected boolean accept()
true
if any url matching this rule must be accepted,
otherwise false
.protected abstract boolean match(String url)
url
- is the url to check.
true
if the specified url matches this rule,
otherwise false
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |