本文整理汇总了Java中com.sun.syndication.feed.synd.SyndCategory.setName方法的典型用法代码示例。如果您正苦于以下问题:Java SyndCategory.setName方法的具体用法?Java SyndCategory.setName怎么用?Java SyndCategory.setName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.sun.syndication.feed.synd.SyndCategory
的用法示例。
在下文中一共展示了SyndCategory.setName方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getCategories
import com.sun.syndication.feed.synd.SyndCategory; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
@Override
public List getCategories() {
List<SyndCategory> categories = super.getCategories();
List<SyndCategory> result = new ArrayList<SyndCategory>(categories.size());
for (SyndCategory c : categories) {
SyndCategory cc = new SyndCategoryImpl();
if (c != null) {
cc.setName(removeInvalidChars(c.getName()));
cc.setTaxonomyUri(removeInvalidChars(c.getTaxonomyUri()));
}
result.add(cc);
}
return result;
}
示例2: makeEntryFromRSSCorrespon
import com.sun.syndication.feed.synd.SyndCategory; //导入方法依赖的package包/类
/**
* コレポンからRSSのエントリー(それぞれのItem)を作成.
*/
private SyndEntry makeEntryFromRSSCorrespon(
RSSCorrespon c, String baseURL) {
if (log.isDebugEnabled()) {
log.debug("id[{}]", c.getId());
}
SyndEntry entry = new ExtendedSyndEntryImpl();
// title設定
entry.setTitle(c.getSubject());
// description設定
entry.setDescription(makeDescriptionFromRSSCorrespon(c, baseURL));
// link(とguid)設定
entry.setLink(baseURL + "correspon/correspon.jsf?id=" + c.getId()
+ "&projectId=" + c.getProjectId());
// author設定
SyndPerson author = new SyndPersonImpl();
author.setEmail(c.getProjectId() + " : " + c.getProjectNameE());
List<SyndPerson> authors = new ArrayList<SyndPerson>();
authors.add(author);
entry.setAuthors(authors);
// category設定
SyndCategory category = new SyndCategoryImpl();
category.setName(c.getCategory().getLabel());
List<SyndCategory> categories = new ArrayList<SyndCategory>();
categories.add(category);
entry.setCategories(categories);
// pubDate(とdc:date)設定
entry.setPublishedDate(c.getUpdatedAt());
return entry;
}
示例3: createSyndCategories
import com.sun.syndication.feed.synd.SyndCategory; //导入方法依赖的package包/类
protected List createSyndCategories(List rssCats) {
List syndCats = new ArrayList();
for (int i=0;i<rssCats.size();i++) {
Category rssCat = (Category) rssCats.get(i);
SyndCategory sCat = new SyndCategoryImpl();
sCat.setTaxonomyUri(rssCat.getDomain());
sCat.setName(rssCat.getValue());
syndCats.add(sCat);
}
return syndCats;
}