Package org.jboss.seam.wiki.core.model

Examples of org.jboss.seam.wiki.core.model.Feed


            SyndFeedInput input = new SyndFeedInput();
            SyndFeed syndFeed = input.build(new XmlReader(feedSource));

            log.debug("starting conversion from feed URL: " + feedURL);

            Feed feed = convertSyndFeed(syndFeed);

            for (Object o : syndFeed.getEntries()) {
                SyndEntry syndEntry = (SyndEntry)o;
                FeedEntry fe = convertSyndEntry(syndEntry);

                // Append some information on the title
                fe.setTitlePrefix("(" + feed.getTitle() + ") ");
                //fe.setTitleSuffix(" (" + fe.getAuthor() + ")");

                // Linking it in our model makes it persistable/cachable
                feed.getFeedEntries().add(fe);

                // Now project them so the client has a unified view without iterating collections of Feeds
                FeedEntryDTO dto = new FeedEntryDTO(feed, fe);
                feedEntryDTOs.add(dto);
            }
View Full Code Here


        return Collections.EMPTY_LIST;
    }

    private Feed convertSyndFeed(SyndFeed syndFeed) {
        log.debug("converting SyndFeed: " + syndFeed.getTitle());
        Feed feed = new Feed();
        feed.setLink(syndFeed.getLink());
        feed.setTitle(syndFeed.getTitle());
        feed.setPublishedDate(syndFeed.getPublishedDate());
        feed.setDescription(syndFeed.getDescription());
        feed.setAuthor(syndFeed.getAuthor());
        return feed;
    }
View Full Code Here

                FeedEntry feTwo = new FeedEntry();
                feTwo.setTitle("Two");
                feTwo.setPublishedDate(new Date());

                Feed feed = new Feed();
                feed.setTitle("Foo");
                feed.getFeedEntries().add(feOne);
                feed.getFeedEntries().add(feTwo);

                entries.add(new FeedEntryDTO(feed, feOne));
                entries.add(new FeedEntryDTO(feed, feTwo));

            } else if (feedURL.equals("http://bar")) {

                FeedEntry feOne = new FeedEntry();
                feOne.setTitle("One");
                feOne.setPublishedDate(new Date());

                Feed feed = new Feed();
                feed.setTitle("Bar");
                feed.getFeedEntries().add(feOne);

                entries.add(new FeedEntryDTO(feed, feOne));
            }

            return entries;
View Full Code Here

TOP

Related Classes of org.jboss.seam.wiki.core.model.Feed

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.