Examples of SyndFeedImpl


Examples of com.rometools.rome.feed.synd.SyndFeedImpl

    if (response.getStatus() != Status.OK.getStatusCode()) {
      return response;
    }
    Entries entries = (Entries) response.getEntity();

    SyndFeed feed = new SyndFeedImpl();
    feed.setFeedType("rss_2.0");
    feed.setTitle("CommaFeed - " + entries.getName());
    feed.setDescription("CommaFeed - " + entries.getName());
    String publicUrl = config.getApplicationSettings().getPublicUrl();
    feed.setLink(publicUrl);

    List<SyndEntry> children = Lists.newArrayList();
    for (Entry entry : entries.getEntries()) {
      children.add(entry.asRss());
    }
    feed.setEntries(children);

    SyndFeedOutput output = new SyndFeedOutput();
    StringWriter writer = new StringWriter();
    try {
      output.output(feed, writer);
View Full Code Here

Examples of com.sun.syndication.feed.synd.SyndFeedImpl

    logger.debug("author="+author);
    logger.debug("title="+title);
    logger.debug("link="+link);
    logger.debug("pubDate="+pubDate);
    logger.debug("feedUri="+feedUri);
    SyndFeed syndFeed = new SyndFeedImpl();
    syndFeed.setAuthor(author);
    syndFeed.setTitle(title);
    syndFeed.setUri(feedUri);
    syndFeed.setLink(link);
    syndFeed.setPublishedDate(pubDate);
    List<SyndEntry> entries = new ArrayList<SyndEntry>();
    for(BookmarkDoc bmark : bookmarks){
      SyndEntry entry = new SyndEntryImpl();
      entry.setTitle(bmark.getTitle());
      entry.setAuthor(bmark.getUsername());
      entry.setLink(bmark.getUrl());
      entry.setUri("urn-x:gnizr:bookmark:"+bmark.getBookmarkId());   
      SyndContent cnt = new SyndContentImpl();
      cnt.setType("text/html");
      if(bmark.getNotes() != null){
        cnt.setValue(bmark.getNotes());
        entry.setDescription(cnt);
      }   
      entries.add(entry);     
    }
    syndFeed.setEntries(entries);
    syndFeed.setEncoding("UTF-8");
    logger.debug("done initializing syndFeed object");
    return syndFeed;
  }
View Full Code Here

Examples of com.sun.syndication.feed.synd.SyndFeedImpl

    logger.debug("author="+author);
    logger.debug("title="+title);
    logger.debug("link="+link);
    logger.debug("pubDate="+pubDate);
    logger.debug("feedUri="+feedUri);
    SyndFeed syndFeed = new SyndFeedImpl();
    syndFeed.setAuthor(author);
    syndFeed.setTitle(title);
    syndFeed.setUri(feedUri);
    syndFeed.setLink(link);
    syndFeed.setPublishedDate(pubDate);
    List<SyndEntry> entries = new ArrayList<SyndEntry>();
    for(Bookmark bmark : bookmarks){
      SyndEntry entry = new SyndEntryImpl();
      entry.setTitle(bmark.getTitle());
      entry.setAuthor(bmark.getUser().getUsername());
      entry.setLink(bmark.getLink().getUrl());
      entry.setUri("urn:bookmark:"+bmark.getId());
      entry.setUpdatedDate(bmark.getLastUpdated());
      List<String> tags = bmark.getTagList();
      List<SyndCategory> cats = new ArrayList<SyndCategory>();
      for(String aTag : tags){
        SyndCategory aCat = new SyndCategoryImpl();
        aCat.setName(aTag);
        cats.add(aCat);
      }
      if(cats.isEmpty() == false){
        entry.setCategories(cats);
      }
      SyndContent cnt = new SyndContentImpl();
      cnt.setType("text/html");
      cnt.setValue(bmark.getNotes());
      entry.setDescription(cnt);
      entries.add(entry);     
    }
    syndFeed.setEntries(entries);
    syndFeed.setEncoding("UTF-8");
    logger.debug("done initializing syndFeed object");
    return syndFeed;
  }
View Full Code Here

Examples of com.sun.syndication.feed.synd.SyndFeedImpl

        try {
            Event event = transaction.getEvent();
            if (event == null)
                return renderNotFound();

            SyndFeed feed = new SyndFeedImpl();
            feed.setFeedType("rss_2.0");
            feed.setEncoding("utf-8");

            feed.setTitle(event.getTitle() + " - [PARTAKE]");
            feed.setLink(event.getEventURL());
            feed.setDescription(event.getSummary());

            byte[] body = createEventFeed(feed, transaction.getActivities());
            if (body == null)
                return renderNotFound();
            return render(body, "application/rss+xml", "inline");
View Full Code Here

Examples of com.sun.syndication.feed.synd.SyndFeedImpl

    public static Result get() throws DAOException, PartakeException {
        return new FeedRecentEventsAction().execute();
    }

    public Result doExecute() throws DAOException, PartakeException {
        SyndFeed feed = new SyndFeedImpl();
        feed.setFeedType("rss_2.0");
        feed.setEncoding("utf-8");

        // TODO: Use resource
        feed.setTitle("Recent 100 events - [PARTAKE]");
        feed.setLink("http://partake.in/"); // TODO use in.partake.toppath from properties file
        feed.setDescription("最近登録されたイベントを(最大100)フィードします。");

        try {
            IEventSearchService searchService = PartakeApp.getEventSearchService();
            List<String> eventIds = searchService.getRecent(100);
View Full Code Here

Examples of com.sun.syndication.feed.synd.SyndFeedImpl

        // TODO: CACHE!

        if (!EventCategory.isValidCategoryName(category) && !category.equals(EventCategory.getAllEventCategory()))
            return renderNotFound();

        SyndFeed feed = new SyndFeedImpl();
        feed.setFeedType("rss_2.0");
        feed.setEncoding("utf-8");

        if (category.equals(EventCategory.getAllEventCategory())) {
            feed.setTitle("Upcoming 100 events - [PARTAKE]");
        } else {
            feed.setTitle("Upcoming 100 events - " + EventCategory.getReadableCategoryName(category) + " - [PARTAKE]");
        }
        feed.setLink("http://partake.in/"); // TODO use in.partake.toppath from properties file
        feed.setDescription("近日開催されるイベントを(最大100)フィードします。");

        try {
            IEventSearchService searchService = PartakeApp.getEventSearchService();
            List<String> eventIds = searchService.getUpcomingByCategory(category, 100);
View Full Code Here

Examples of com.sun.syndication.feed.synd.SyndFeedImpl

        // check category is correct.
        if (!EventCategory.isValidCategoryName(category))
            return renderNotFound();

        SyndFeed feed = new SyndFeedImpl();
        feed.setFeedType("rss_2.0");
        feed.setEncoding("utf-8");

        feed.setTitle("Recent 100 events - " + EventCategory.getReadableCategoryName(category) + " - [PARTAKE]");
        feed.setLink(PartakeConfiguration.toppath() + "/");
        feed.setDescription("最近登録されたイベントを(最大100)フィードします。");

        try {
            IEventSearchService searchService = PartakeApp.getEventSearchService();
            List<String> eventIds = searchService.getRecentByCategory(category, 100);
View Full Code Here

Examples of com.sun.syndication.feed.synd.SyndFeedImpl

     * is returned.
     * @return new instance of a SyndFeed
     * @see com.lowagie.text.Document
     */
    protected SyndFeed newSyndFeed() {
        return new SyndFeedImpl();
    }
View Full Code Here

Examples of com.sun.syndication.feed.synd.SyndFeedImpl

                    "ContentCannotGenerateBlogRssFeed",
                    UtilMisc.toMap("contentId", contentId), locale));
        }

        // create the feed
        SyndFeed feed = new SyndFeedImpl();
        feed.setFeedType(feedType);
        feed.setLink(mainLink);

        feed.setTitle(content.getString("contentName"));
        feed.setDescription(content.getString("description"));
        feed.setEntries(generateEntryList(dispatcher, delegator, contentId, entryLink, locale, userLogin));

        Map<String, Object> resp = ServiceUtil.returnSuccess();
        resp.put("wireFeed", feed.createWireFeed());
        return resp;
    }
View Full Code Here

Examples of com.sun.syndication.feed.synd.SyndFeedImpl

    /**
     * Constructor.
     */
    public StatSyndicationFeed()
    {
        feed = new SyndFeedImpl();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.