String sLink = syndFeed.getLink();
List slinks = syndFeed.getLinks();
if (slinks != null) {
for (Iterator iter=slinks.iterator(); iter.hasNext();) {
SyndLink syndLink = (SyndLink)iter.next();
Link link = new Link();
link.setRel(syndLink.getRel());
link.setHref(syndLink.getHref());
link.setHreflang(syndLink.getHreflang());
link.setLength(syndLink.getLength());
if ("alternate".equals(syndLink.getRel())) {
alternateLinks.add(link);
} else {
otherLinks.add(link);
}
}
}
// no alternate link? then use THE link if there is one
if (alternateLinks.size() == 0 && syndFeed.getLink() != null) {
Link link = new Link();
link.setRel("alternate");
link.setHref(syndFeed.getLink());
alternateLinks.add(link);
}
if (alternateLinks.size() > 0) aFeed.setAlternateLinks(alternateLinks);
if (otherLinks.size() > 0) aFeed.setOtherLinks(otherLinks);