本文整理汇总了Java中com.rometools.rome.feed.synd.SyndFeed.copyFrom方法的典型用法代码示例。如果您正苦于以下问题:Java SyndFeed.copyFrom方法的具体用法?Java SyndFeed.copyFrom怎么用?Java SyndFeed.copyFrom使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.rometools.rome.feed.synd.SyndFeed
的用法示例。
在下文中一共展示了SyndFeed.copyFrom方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initializeForSorting
import com.rometools.rome.feed.synd.SyndFeed; //导入方法依赖的package包/类
/**
* This method will take a SyndFeed object with a SimpleListExtension on it and populate the
* entries with current SleEntry values for sorting and grouping. <b>NB</b>: This basically does
* this by re-generating the XML for all the entries then re-parsing them into the SLE data
* structures. It is a very heavy operation and should not be called frequently!
*/
public static void initializeForSorting(final SyndFeed feed) throws FeedException {
// TODO: the null parameter below will break delegating parsers and generators
// final ModuleGenerators g = new ModuleGenerators(feed.getFeedType() +
// ITEM_MODULE_GENERATORS_POSFIX_KEY, null);
final SyndFeedOutput output = new SyndFeedOutput();
final Document document = output.outputJDom(feed);
final SyndFeed copy = new SyndFeedInput().build(document);
feed.copyFrom(copy);
}
示例2: testCopiedFeedCategories
import com.rometools.rome.feed.synd.SyndFeed; //导入方法依赖的package包/类
public void testCopiedFeedCategories() throws Exception {
final SyndFeed copiedFeed = new SyndFeedImpl();
copiedFeed.copyFrom(getCachedSyndFeed());
checkFeed(copiedFeed);
}