本文整理了Java中org.apache.abdera.model.Feed.getDocument()
方法的一些代码示例,展示了Feed.getDocument()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Feed.getDocument()
方法的具体详情如下:
包路径:org.apache.abdera.model.Feed
类名称:Feed
方法名:getDocument
暂无
代码示例来源:origin: org.xcmis/xcmis-restatom
/**
* {@inheritDoc}
*/
@Override
protected ResponseContext buildGetFeedResponse(Feed feed)
{
// The same as in super class but without ETag.
Document<Feed> document = feed.getDocument();
AbstractResponseContext rc = new BaseResponseContext<Document<Feed>>(document);
// rc.setEntityTag(calculateEntityTag(document.getRoot()));
return rc;
}
代码示例来源:origin: org.apache.abdera/abdera-extensions-opensearch
public ResponseContext search(RequestContext request, Map<String, String> parameters) {
List<T> searchResults = this.doSearch(request, parameters);
Feed feed = this.createFeed(request, parameters, searchResults);
Document<Feed> document = feed.getDocument();
ResponseContext response = new BaseResponseContext<Document<Feed>>(document);
return response;
}
代码示例来源:origin: rackerlabs/atom-hopper
public Feed addArchiveNode( Feed feed ) {
Factory factory = feed.getFactory();
Element root = feed.getDocument().getRoot();
Element elementArchive = factory.newExtensionElement( new QName( ARCHIVE_NS, ARCHIVE, ARCHIVE_PREFIX ), root );
elementArchive.setParentElement( root );
return feed;
}
}
代码示例来源:origin: org.apache.abdera/abdera-server
public ResponseContext getFeed(RequestContext request) {
try {
Feed feed = getFeed();
return feed != null ? ProviderHelper.returnBase(feed.getDocument(), 200, null) : ProviderHelper
.notfound(request);
} catch (Exception e) {
return ProviderHelper.servererror(request, e.getMessage(), e);
}
}
代码示例来源:origin: org.apache.abdera/abdera-server
/**
* Creates the ResponseContext for a GET feed request. By default, a BaseResponseContext is returned. The Etag
* header will be set.
*/
protected ResponseContext buildGetFeedResponse(Feed feed) {
Document<Feed> document = feed.getDocument();
AbstractResponseContext rc = new BaseResponseContext<Document<Feed>>(document);
rc.setEntityTag(calculateEntityTag(document.getRoot()));
return rc;
}
代码示例来源:origin: org.fuzzydb.atom/org.fuzzydb.abdera.util
private Document<Feed> init_feed_doc(Abdera abdera) {
Factory factory = abdera.getFactory();
Feed feed = factory.newFeed();
try {
feed.setId("tag:example.org,2006:feed");
feed.setTitle("Simple");
feed.setUpdated(new Date());
feed.addLink("");
feed.addLink("", "self");
feed.addAuthor("Simple");
} catch (Exception e) {
e.printStackTrace();
} // FIXME: Document this exception
return feed.getDocument();
}
代码示例来源:origin: org.apache.tuscany.sca/tuscany-binding-atom-runtime
feed.getDocument().writeTo(response.getOutputStream());
} catch (IOException ioe) {
throw new ServletException(ioe);
代码示例来源:origin: org.fuzzydb.atom/org.fuzzydb.abdera.util
/**
* Implements GET on a COLLECTION
*/
public ResponseContext getFeed(RequestContext request) {
/* Factory factory = */getAndInitFactory(request);
Feed feed;
try {
int length = ProviderHelper.getPageSize(request, "count", 25);
int offset = ProviderHelper.getOffset(request, "page", length);
String _page = request.getParameter("page");
int page =(_page != null) ? Integer.parseInt(_page) : 0;
feed = getFeedInternal(request, offset, length);
} catch (BadRequestException e) {
return makeExceptionResponse(HttpServletResponse.SC_BAD_REQUEST, e);
}
Document<Feed> doc = feed.getDocument();
AbstractResponseContext rc = new BaseResponseContext<Document<Feed>>(doc);
rc.setEntityTag(calculateEntityTag(feed));
return rc;
}
代码示例来源:origin: org.apache.abdera/abdera-filesystem
public ResponseContext getFeed(RequestContext request) {
Feed feed = abdera.newFeed();
feed.setId(config.getServerConfiguration().getServerUri() + "/" + config.getFeedId());
feed.setTitle(config.getFeedTitle());
feed.addAuthor(config.getFeedAuthor());
feed.addLink(config.getFeedUri());
feed.addLink(config.getFeedUri(), "self");
feed.setUpdated(new Date());
getEntries(request, feed, root);
return ProviderHelper.returnBase(feed.getDocument(), 200, null);
}
代码示例来源:origin: net.sf.taverna.t2.activities/interaction-activity
@Override
public ResponseContext getFeed(final RequestContext request) {
final Feed feed = this.abdera.newFeed();
feed.setId(this.config.getServerConfiguration().getServerUri() + "/"
+ this.config.getFeedId());
feed.setTitle(this.config.getFeedTitle());
feed.addAuthor(this.config.getFeedAuthor());
feed.addLink(this.config.getFeedUri());
feed.addLink(this.config.getFeedUri(), "self");
feed.setUpdated(new Date());
this.getEntries(request, feed, this.root);
return ProviderHelper.returnBase(feed.getDocument(), 200, null);
}
内容来源于网络,如有侵权,请联系作者删除!