// push all url with depth = 0
level = 0;
Collection<AbstractSiteMap> sm = ((SiteMapIndex)asm).getSitemaps();
Iterator<AbstractSiteMap> i=sm.iterator();
while(i.hasNext()) {
SiteMap s = (SiteMap) i.next();
URL url = s.getUrl();
links.add(url.toExternalForm());
}
}
else {
// push all url with depth = 1
level = 1;
Collection<SiteMapURL> u = ((SiteMap)asm).getSiteMapUrls();
Iterator<SiteMapURL> i = u.iterator();
while(i.hasNext()) {
SiteMapURL s = (SiteMapURL) i.next();
URL url = s.getUrl();
if (!src.isFirstCrawlCompleted() || src.isReset() || s.getLastModified() == null || src.getCrawlLastTimeStart().before(s.getLastModified())) {
links.add(url.toExternalForm());
}
}
}
for (String strLink : links) {