htmlPage.setBaseUrl(rawDocument.getUrl());
// Iterate over all links found
Iterator linksIter = links.iterator();
while (linksIter.hasNext()) {
LinkTag currTag = ((LinkTag) linksIter.next());
String link = CrawlerToolkit.removeAnchor(currTag.extractLink());
// find urls which do not end with an '/' but are a directory
link = CrawlerToolkit.completeDirectory(link);
//link = CrawlerToolkit.toAbsoluteUrl(link, rawDocument.getUrl());
String linkText = (currTag.getLinkText() == null) ? "" : currTag.getLinkText();
// store all http(s)-links the link
if (currTag.isHTTPLikeLink()) {
rawDocument.addLink(link, linkText);
}
}
} catch (ParserException ex) {