Search in sources :

Example 26 with SyndFeed

use of com.sun.syndication.feed.synd.SyndFeed in project asterixdb by apache.

the class FetcherEventListenerImpl method fetchFeed.

@SuppressWarnings("unchecked")
private void fetchFeed() throws IllegalArgumentException, IOException, FeedException, FetcherException {
    // Retrieve the feed.
    // We will get a Feed Polled Event and then a
    // Feed Retrieved event (assuming the feed is valid)
    SyndFeed feed = fetcher.retrieveFeed(feedUrl);
    if (modified) {
        if (LOGGER.isInfoEnabled()) {
            LOGGER.info(feedUrl + " retrieved");
            LOGGER.info(feedUrl + " has a title: " + feed.getTitle() + " and contains " + feed.getEntries().size() + " entries.");
        }
        List<? extends SyndEntryImpl> fetchedFeeds = feed.getEntries();
        rssFeedBuffer.addAll(fetchedFeeds);
    }
}
Also used : SyndFeed(com.sun.syndication.feed.synd.SyndFeed)

Aggregations

SyndFeed (com.sun.syndication.feed.synd.SyndFeed)26 SyndEntry (com.sun.syndication.feed.synd.SyndEntry)11 SyndEntryImpl (com.sun.syndication.feed.synd.SyndEntryImpl)10 ArrayList (java.util.ArrayList)10 SyndFeedImpl (com.sun.syndication.feed.synd.SyndFeedImpl)9 SyndContent (com.sun.syndication.feed.synd.SyndContent)6 SyndContentImpl (com.sun.syndication.feed.synd.SyndContentImpl)6 Test (org.junit.Test)6 SyndFeedOutput (com.sun.syndication.io.SyndFeedOutput)5 FeedException (com.sun.syndication.io.FeedException)4 Date (java.util.Date)4 SyndFeedInput (com.sun.syndication.io.SyndFeedInput)3 IOException (java.io.IOException)3 URL (java.net.URL)3 SQLException (java.sql.SQLException)3 FeedEntryModel (com.gitblit.models.FeedEntryModel)2 SyndCategory (com.sun.syndication.feed.synd.SyndCategory)2 FeedFetcherCache (com.sun.syndication.fetcher.impl.FeedFetcherCache)2 SyndFeedInfo (com.sun.syndication.fetcher.impl.SyndFeedInfo)2 XmlReader (com.sun.syndication.io.XmlReader)2