本文整理了Java中org.apache.abdera.model.Feed.getAsSource()
方法的一些代码示例,展示了Feed.getAsSource()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Feed.getAsSource()
方法的具体详情如下:
包路径:org.apache.abdera.model.Feed
类名称:Feed
方法名:getAsSource
[英]Creates a Source element from this Feed
[中]从该提要创建源元素
代码示例来源:origin: org.apache.abdera/abdera-parser
public Entry setSource(Source source) {
complete();
if (source != null) {
if (source instanceof Feed)
source = ((Feed)source).getAsSource();
_setChild(SOURCE, (OMElement)source);
} else {
_removeChildren(SOURCE, false);
}
return this;
}
代码示例来源:origin: org.apache.abdera/abdera-server
/**
* Creates the ResponseContext for a GET entry request. By default, a BaseResponseContext is returned. The Entry
* will contain an appropriate atom:source element and the Etag header will be set.
*/
protected ResponseContext buildGetEntryResponse(RequestContext request, Entry entry)
throws ResponseContextException {
Feed feed = createFeedBase(request);
entry.setSource(feed.getAsSource());
Document<Entry> entry_doc = entry.getDocument();
AbstractResponseContext rc = new BaseResponseContext<Document<Entry>>(entry_doc);
rc.setEntityTag(calculateEntityTag(entry));
return rc;
}
代码示例来源:origin: org.fuzzydb.atom/org.fuzzydb.abdera.util
public ResponseContext getEntry(RequestContext request) {
Entry entry = getAbderaEntry(request);
if (entry != null) {
Feed feed = entry.getParentElement();
entry = (Entry) entry.clone();
entry.setSource(feed.getAsSource());
Document<Entry> entry_doc = entry.getDocument();
AbstractResponseContext rc = new BaseResponseContext<Document<Entry>>(
entry_doc);
rc.setEntityTag(calculateEntityTag(entry));
return rc;
} else {
return new EmptyResponseContext(404);
}
}
内容来源于网络,如有侵权,请联系作者删除!