本文整理汇总了Java中com.rometools.modules.itunes.FeedInformation类的典型用法代码示例。如果您正苦于以下问题:Java FeedInformation类的具体用法?Java FeedInformation怎么用?Java FeedInformation使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
FeedInformation类属于com.rometools.modules.itunes包,在下文中一共展示了FeedInformation类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testCreate
import com.rometools.modules.itunes.FeedInformation; //导入依赖的package包/类
public void testCreate() throws Exception {
final SyndFeed feed = new SyndFeedImpl();
final String feedType = "rss_2.0";
feed.setFeedType(feedType);
feed.setLanguage("en-us");
feed.setTitle("sales.com on the Radio!");
feed.setDescription("sales.com radio shows in MP3 format");
feed.setLink("http://foo/rss/podcasts.rss");
final FeedInformation fi = new FeedInformationImpl();
fi.setOwnerName("sales.com");
fi.getCategories().add(new Category("Shopping"));
fi.setOwnerEmailAddress("[email protected]");
fi.setType("serial");
feed.getModules().add(fi);
final SyndFeedOutput output = new SyndFeedOutput();
final StringWriter writer = new StringWriter();
output.output(feed, writer);
LOG.debug("{}", writer);
}
示例2: testCreate
import com.rometools.modules.itunes.FeedInformation; //导入依赖的package包/类
public void testCreate() throws Exception {
final SyndFeed feed = new SyndFeedImpl();
final String feedType = "rss_2.0";
feed.setFeedType(feedType);
feed.setLanguage("en-us");
feed.setTitle("sales.com on the Radio!");
feed.setDescription("sales.com radio shows in MP3 format");
feed.setLink("http://foo/rss/podcasts.rss");
final FeedInformation fi = new FeedInformationImpl();
fi.setOwnerName("sales.com");
fi.getCategories().add(new Category("Shopping"));
fi.setOwnerEmailAddress("[email protected]");
feed.getModules().add(fi);
final SyndFeedOutput output = new SyndFeedOutput();
final StringWriter writer = new StringWriter();
output.output(feed, writer);
LOG.debug("{}", writer);
}
示例3: test
import com.rometools.modules.itunes.FeedInformation; //导入依赖的package包/类
@Test
public void test() throws Exception {
final XmlReader reader = new XmlReader(getClass().getResourceAsStream("modules.xml"));
final SyndFeed feed = new SyndFeedInput().build(reader);
final FeedInformation itunes = (FeedInformation) feed.getModule(ITunes.URI);
assertNotNull(itunes);
assertEquals("test-author", itunes.getAuthor());
}