map.put("-> valid links", String.valueOf(fValidLinks));
}
protected void checkVisits(final WebClient webClient, final HtmlPage response) {
final Set urls = getGoodLinks(response);
final RegExStringVerifier verifier = new RegExStringVerifier();
for (final Iterator iter = urls.iterator(); iter.hasNext();) {
final URL url = (URL) iter.next();
if (fVisitedUrls.contains(url)) {
LOG.debug("Skipped already visited: " + url);
fValidLinks++;
continue;
}
if (!StringUtils.isEmpty(getIncludes()) && (!verifier.verifyStrings(getIncludes(), url.toString()))) {
LOG.info("Skipped link as it doesn't match the includes list: " + url);
continue;
}
if (!StringUtils.isEmpty(getExcludes()) && (verifier.verifyStrings(getExcludes(), url.toString()))) {
LOG.info("Skipped link as matched the excludes list: " + url);
continue;
}
visit(response, url, webClient);
}