}
@Override
protected ProcessResult innerProcessResult(CrawlURI puri) {
CrawlURI curi = (CrawlURI)puri;
// Check if uris should be blocked
if (getBlockAll()) {
curi.setFetchStatus(S_BLOCKED_BY_USER);
return ProcessResult.FINISH;
}
// Check if allowed by regular expression
String regex = getAllowByRegex();
if (regex != null && !regex.equals("")) {
if (!TextUtils.matches(regex, curi.toString())) {
curi.setFetchStatus(S_BLOCKED_BY_USER);
return ProcessResult.FINISH;
}
}
// Check if blocked by regular expression
regex = getBlockByRegex();
if (regex != null && !regex.equals("")) {
if (TextUtils.matches(regex, curi.toString())) {
curi.setFetchStatus(S_BLOCKED_BY_USER);
return ProcessResult.FINISH;
}
}
// Possibly recheck scope
if (getRecheckScope()) {
if (!isInScope(curi)) {
// Scope rejected
curi.setFetchStatus(S_OUT_OF_SCOPE);
return ProcessResult.FINISH;
}
}
return ProcessResult.PROCEED;