Package com.sun.syndication.feed.synd

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


      throws Exception
  {
    @SuppressWarnings("unchecked")
    List<SyndEntry> entries = feed.getEntries();
    for (SyndEntry entry : entries) {
      SyndContent description = entry.getDescription();
      if (description != null && description.getValue().contains(message)) {
        return;
      }
    }
    Assert.fail("Feed does not contain entry for " + message);
  }
View Full Code Here


  {
    SyndFeed feed = FeedUtil.getFeed("errorWarning");
    @SuppressWarnings("unchecked")
    List<SyndEntry> entries = feed.getEntries();
    for (SyndEntry entry : entries) {
      SyndContent description = entry.getDescription();
      if (description != null && description.getValue().contains(message)) {
        return;
      }
    }
    Assert.fail("Feed does not contain entry for " + message);
  }
View Full Code Here

  {
    SyndFeed feed = FeedUtil.getFeed("errorWarning");
    @SuppressWarnings("unchecked")
    List<SyndEntry> entries = feed.getEntries();
    for (SyndEntry entry : entries) {
      SyndContent description = entry.getDescription();
      if (description != null && description.getValue().contains(message)) {
        Assert.fail("Feed contains entry for " + message);
      }
    }
  }
View Full Code Here

          return true;
        }

        boolean missingPortion = false;

        SyndContent description = entry.getDescription();
        String value = description.getValue();
        for (int i = 0; i < bodyPortions.length; i++) {
          if (!value.contains(bodyPortions[i])) {
            missingPortion = true;
            break;
          }
View Full Code Here

          }
          else {
            entry.setLink(BaseUrlHolder.get() + event.getLink());
          }
        }
        final SyndContent content = new SyndContentImpl();
        content.setType(feedContentRenderer.getContentType(event));
        content.setValue(feedContentRenderer.getContent(event));
        entry.setDescription(content);
        entries.add(entry);
      }
      feed.setEntries(entries);
      return feed;
View Full Code Here

      }
     
      String description = fdbo.getString(DocumentPojo.description_);
      if ( description != null ) {
        // Create the content for the entry
        SyndContent content = new SyndContentImpl(); // create the content of your entry
        content.setType( "text/plain" );
        content.setValue( description );
        entry.setDescription( content );
      }
      entries.add( entry );
    }//(end loop over entries)
   
View Full Code Here

            entry.setAuthor("Play framework modules");
            entry.setPublishedDate(historicalEvent.creationDate);
            // todo this will be the url of the module
            entry.setLink("http://modules.playframework.org");
            entry.setUri("mpo-he-" + historicalEvent.id);
            SyndContent description = new SyndContentImpl();
            description.setType("text/plain");
            description.setValue(historicalEvent.message);
            entry.setDescription(description);
            entries.add(entry);
        }

        feed.setEntries(entries);
View Full Code Here

        syndFeed.setUri(aFeed.getId());

        Content aTitle = aFeed.getTitleEx();
        if (aTitle != null) {
            SyndContent c = new SyndContentImpl();
            c.setType(aTitle.getType());
            c.setValue(aTitle.getValue());
            syndFeed.setTitleEx(c);
        }

        Content aSubtitle = aFeed.getSubtitle();
        if (aSubtitle!=null) {
            SyndContent c = new SyndContentImpl();
            c.setType(aSubtitle.getType());
            c.setValue(aSubtitle.getValue());
            syndFeed.setDescriptionEx(c);
        }

        // use first alternate links as THE link
        if (aFeed.getAlternateLinks() != null
View Full Code Here

        aFeed.setEncoding(syndFeed.getEncoding());

        aFeed.setId(syndFeed.getUri());

        SyndContent sTitle = syndFeed.getTitleEx();
        if (sTitle != null) {
            Content title = new Content();
            title.setType(sTitle.getType());
            title.setValue(sTitle.getValue());
            aFeed.setTitleEx(title);
        }
       
        SyndContent sDesc = syndFeed.getDescriptionEx();
        if (sDesc != null) {
            Content subtitle = new Content();
            subtitle.setType(sDesc.getType());
            subtitle.setValue(sDesc.getValue());
            aFeed.setSubtitle(subtitle);
        }

        // separate SyndEntry's links collection into alternate and other links
        List alternateLinks = new ArrayList();
View Full Code Here

        }
        return aFeed;
    }

    protected SyndContent createSyndContent(Content content) {
        SyndContent sContent = new SyndContentImpl();
        sContent.setType(content.getType());
        sContent.setValue(content.getValue());
        return sContent;
    }
View Full Code Here

TOP

Related Classes of com.sun.syndication.feed.synd.SyndContent

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.