当前位置: 首页>>代码示例>>Java>>正文


Java SyndContentImpl.setValue方法代码示例

本文整理汇总了Java中com.sun.syndication.feed.synd.SyndContentImpl.setValue方法的典型用法代码示例。如果您正苦于以下问题:Java SyndContentImpl.setValue方法的具体用法?Java SyndContentImpl.setValue怎么用?Java SyndContentImpl.setValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.sun.syndication.feed.synd.SyndContentImpl的用法示例。


在下文中一共展示了SyndContentImpl.setValue方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getTitleEx

import com.sun.syndication.feed.synd.SyndContentImpl; //导入方法依赖的package包/类
@Override
public SyndContent getTitleEx() {
    SyndContent c = super.getTitleEx();
    SyndContentImpl result = new SyndContentImpl();
    if (c != null) {
        result.setMode(removeInvalidChars(c.getMode()));
        result.setType(removeInvalidChars(c.getType()));
        result.setValue(removeInvalidChars(c.getValue()));
    }
    return result;
}
 
开发者ID:otsecbsol,项目名称:linkbinder,代码行数:12,代码来源:ExtendedSyndEntryImpl.java

示例2: createInvalidLinkedEntriesWithTestDescription

import com.sun.syndication.feed.synd.SyndContentImpl; //导入方法依赖的package包/类
private List<SyndEntry> createInvalidLinkedEntriesWithTestDescription() {
	SyndEntry entry1 = new SyndEntryImpl();
	entry1.setLink("test://not_exists1.html");
	SyndContentImpl syndContent1 = new SyndContentImpl();
	syndContent1.setValue("Test");
	entry1.setDescription(syndContent1);

	SyndEntry entry2 = new SyndEntryImpl();
	entry2.setLink("test://not_exists2.html");
	SyndContentImpl syndContent2 = new SyndContentImpl();
	syndContent2.setValue("Test");
	entry2.setDescription(syndContent2);

	return Arrays.asList(entry1, entry2);
}
 
开发者ID:rrauschenbach,项目名称:FeedExpander,代码行数:16,代码来源:FeedContentExchangerTest.java

示例3: createValidLinkedEntriesWithEmptyDescription

import com.sun.syndication.feed.synd.SyndContentImpl; //导入方法依赖的package包/类
private List<SyndEntry> createValidLinkedEntriesWithEmptyDescription(String content) {
	SyndEntry entry1 = new SyndEntryImpl();
	entry1.setLink("test://feeds/valid_feed/content_1.html");
	SyndContentImpl syndContent1 = new SyndContentImpl();
	syndContent1.setValue(content);
	entry1.setDescription(syndContent1);

	SyndEntry entry2 = new SyndEntryImpl();
	entry2.setLink("test://feeds/valid_feed/content_2.html");
	SyndContentImpl syndContent2 = new SyndContentImpl();
	syndContent2.setValue(content);
	entry2.setDescription(syndContent2);

	return Arrays.asList(entry1, entry2);
}
 
开发者ID:rrauschenbach,项目名称:FeedExpander,代码行数:16,代码来源:FeedContentExchangerTest.java

示例4: applyFeedEntry

import com.sun.syndication.feed.synd.SyndContentImpl; //导入方法依赖的package包/类
private void applyFeedEntry(List<SyndEntry> result, String author, String content) {
	SyndEntryImpl entry = new SyndEntryImpl();
	entry.setAuthor(author);
	
	SyndContentImpl desc = new SyndContentImpl();
	desc.setValue(content);
	entry.setDescription(desc);
	
	entry.setContents(Arrays.asList(desc));
	result.add(entry);
}
 
开发者ID:rrauschenbach,项目名称:FeedExpander,代码行数:12,代码来源:FeedContentFilterTest.java

示例5: rss

import com.sun.syndication.feed.synd.SyndContentImpl; //导入方法依赖的package包/类
public String rss() throws IOException, FeedException {
    SyndFeed feed = new SyndFeedImpl();
    feed.setTitle("hiscores.shmup.com");
    feed.setFeedType("rss_2.0");
    feed.setDescription("hiscores.shmup.com");
    feed.setLink("http://hiscores.shmup.com");
    List entries = new ArrayList();
    feed.setEntries(entries);
    for (Score score : scores) {
        SyndEntry entry = new SyndEntryImpl();
        entry.setTitle(score.getGameTitle());
        entry.setAuthor(score.player.name);
        entry.setLink("http://hiscores.shmup.com/score/" + score.id);
        SyndContentImpl content = new SyndContentImpl();
        content.setValue(score.tweet());
        entry.setDescription(content);
        entry.setPublishedDate(score.getCreatedAt());
        entry.setUpdatedDate(score.getCreatedAt());
        SyndEnclosureImpl enclosure = new SyndEnclosureImpl();
        enclosure.setUrl(score.game.cover);
        enclosure.setType(score.game.getCoverType());
        entry.setEnclosures(Lists.newArrayList(enclosure));
        entries.add(entry);
    }
    Writer writer = new StringWriter();
    SyndFeedOutput output = new SyndFeedOutput();
    output.output(feed, writer);
    writer.close();
    Controller.response().setContentType("application/rss+xml");
    return writer.toString();
}
 
开发者ID:jsmadja,项目名称:shmuphiscores,代码行数:32,代码来源:Timeline.java


注:本文中的com.sun.syndication.feed.synd.SyndContentImpl.setValue方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。