}
private void processLink(HttpUrl base, String link) {
if (link.startsWith("http://") || link.startsWith("https://")) {
try {
HttpUrl url = new HttpUrl(link);
_model.addUnseenLink(url, base);
} catch (MalformedURLException mue) {
_logger.warning("Malformed link : " + link);
}
} else if (link.toLowerCase().startsWith("mailto:")) {
// do nothing
} else if (link.toLowerCase().startsWith("javascript:")) {
processScript(base, link.substring(10));
} else if (link.matches("^[a-zA-Z]+://.*")) {
_logger.info("Encountered an unhandled url scheme " + link);
} else {
_logger.fine("Creating a new relative URL with " + base + " and " + link + " '");
try {
HttpUrl url = new HttpUrl(base, link);
_model.addUnseenLink(url, base);
} catch (MalformedURLException mue) {
_logger.warning("Bad relative URL (" + base.toString() + ") : " + link);
}
}