本文整理了Java中org.apache.abdera.model.Feed.addCategory()
方法的一些代码示例,展示了Feed.addCategory()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Feed.addCategory()
方法的具体详情如下:
包路径:org.apache.abdera.model.Feed
类名称:Feed
方法名:addCategory
暂无
代码示例来源:origin: org.fcrepo/fcrepo-server
private void addObjectProperties(DigitalObject obj, Feed feed) throws ObjectIntegrityException {
String state = DOTranslationUtility.getStateAttribute(obj);
String ownerId = obj.getOwnerId();
String label = obj.getLabel();
Date cdate = obj.getCreateDate();
Date mdate = obj.getLastModDate();
feed.setId(PID.toURI(obj.getPid()));
feed.setTitle(label == null ? "" : label);
feed.setUpdated(mdate);
feed.addAuthor(ownerId == null ? "" : StreamUtility.enc(ownerId));
feed.addCategory(MODEL.STATE.uri, state, null);
if (cdate != null) {
feed.addCategory(MODEL.CREATED_DATE.uri, DateUtility
.convertDateToString(cdate), null);
}
// TODO not sure I'm satisfied with this representation of extProperties
for (String extProp : obj.getExtProperties().keySet()) {
feed.addCategory(MODEL.EXT_PROPERTY.uri, extProp, obj
.getExtProperty(extProp));
}
}
代码示例来源:origin: fcrepo3/fcrepo
private void addObjectProperties(DigitalObject obj, Feed feed) throws ObjectIntegrityException {
String state = DOTranslationUtility.getStateAttribute(obj);
String ownerId = obj.getOwnerId();
String label = obj.getLabel();
Date cdate = obj.getCreateDate();
Date mdate = obj.getLastModDate();
feed.setId(PID.toURI(obj.getPid()));
feed.setTitle(label == null ? "" : label);
feed.setUpdated(mdate);
feed.addAuthor(ownerId == null ? "" : StreamUtility.enc(ownerId));
feed.addCategory(MODEL.STATE.uri, state, null);
if (cdate != null) {
feed.addCategory(MODEL.CREATED_DATE.uri, DateUtility
.convertDateToString(cdate), null);
}
// TODO not sure I'm satisfied with this representation of extProperties
for (String extProp : obj.getExtProperties().keySet()) {
feed.addCategory(MODEL.EXT_PROPERTY.uri, extProp, obj
.getExtProperty(extProp));
}
}
代码示例来源:origin: org.apache.cxf/cxf-rt-management-web
protected void setDefaultFeedProperties(Feed feed, List<LogRecord> records) {
if (feedBuilder != null) {
feed.setId(feedBuilder.getId(records));
feed.addAuthor(feedBuilder.getAuthor(records));
feed.setTitle(feedBuilder.getTitle(records));
feed.setUpdated(feedBuilder.getUpdated(records));
feed.setBaseUri(feedBuilder.getBaseUri(records));
List<String> categories = feedBuilder.getCategories(records);
if (categories != null) {
for (String category : categories) {
feed.addCategory(category);
}
}
Map<String, String> links = feedBuilder.getLinks(records);
if (links != null) {
for (java.util.Map.Entry<String, String> mapEntry : links.entrySet()) {
feed.addLink(mapEntry.getKey(), mapEntry.getValue());
}
}
} else {
feed.setId("uuid:" + UUID.randomUUID().toString());
feed.addAuthor("CXF");
feed.setTitle("CXF Service Log Entries");
feed.setUpdated(new Date());
}
}
代码示例来源:origin: apache/cxf
if (terms != null) {
for (String term : terms) {
feed.addCategory(term);
代码示例来源:origin: org.apache.cxf/cxf-rt-rs-extension-providers
if (terms != null) {
for (String term : terms) {
feed.addCategory(term);
代码示例来源:origin: org.apache.cxf/cxf-bundle-jaxrs
if (terms != null) {
for (String term : terms) {
feed.addCategory(term);
内容来源于网络,如有侵权,请联系作者删除!