// feed.add(fe);
// log.info(fe);
// }
WireFeedInput input = new WireFeedInput(true);
WireFeed wf = input.build(new XmlReader(new URL(url)));
if (wf.getFeedType() != null && wf.getFeedType().startsWith("rss")) {
Channel rssFeed = (Channel)wf;
feed.setTitle(rssFeed.getTitle());
feed.setLink(rssFeed.getLink());
for (Item item : (List<Item>)rssFeed.getItems()) {
NewsFeedEntry fe = new NewsFeedEntry(
item.getLink(),
item.getTitle(),
item.getDescription() != null ? item.getDescription().getValue() : "",
item.getAuthor(),
item.getPubDate()
);
feed.add(fe);
}
} else if (wf.getFeedType() != null && wf.getFeedType().startsWith("atom")) {
com.sun.syndication.feed.atom.Feed atomFeed = (com.sun.syndication.feed.atom.Feed)wf;
feed.setTitle(atomFeed.getTitle());
for (Link link : (List<Link>)atomFeed.getAlternateLinks()) {
if ("text/html".equals(link.getType()))
feed.setLink(link.getHref());