本文整理了Java中org.apache.abdera.model.Document.getSlug()
方法的一些代码示例,展示了Document.getSlug()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Document.getSlug()
方法的具体详情如下:
包路径:org.apache.abdera.model.Document
类名称:Document
方法名:getSlug
[英]Get the slug for this document
[中]
代码示例来源:origin: org.apache.abdera/abdera-client
/**
* Sends an HTTP POST request to the specified URI.
*
* @param uri The request URI
* @param base An Abdera FOM Document or Element object providing the payload of the request
* @param options The request options
*/
public ClientResponse post(String uri, Base base, RequestOptions options) {
if (base instanceof Document) {
Document d = (Document)base;
if (options.getSlug() == null && d.getSlug() != null)
options.setSlug(d.getSlug());
}
return execute("POST", uri, new BaseRequestEntity(base, options.isUseChunked()), options);
}
代码示例来源:origin: org.apache.abdera/abdera-client
/**
* Sends an HTTP PUT request to the specified URI.
*
* @param uri The request URI
* @param base A FOM Document or Element providing the payload of the request
* @param options The request options
*/
public ClientResponse put(String uri, Base base, RequestOptions options) {
if (options == null)
options = getDefaultRequestOptions();
if (base instanceof Document) {
Document d = (Document)base;
if (options.getSlug() == null && d.getSlug() != null)
options.setSlug(d.getSlug());
if (options.isConditionalPut()) {
if (d.getEntityTag() != null)
options.setIfMatch(d.getEntityTag());
else if (d.getLastModified() != null)
options.setIfUnmodifiedSince(d.getLastModified());
}
}
return execute("PUT", uri, new BaseRequestEntity(base, options.isUseChunked()), options);
}
代码示例来源:origin: org.apache.abdera/abdera-extensions-json
private static void toJson(Document document, JSONStream jstream) throws IOException {
jstream.startObject();
jstream.writeField("base", document.getBaseUri());
jstream.writeField("content-type", document.getContentType());
jstream.writeField("etag", document.getEntityTag());
jstream.writeField("language", document.getLanguage());
jstream.writeField("slug", document.getSlug());
jstream.writeField("last-modified", document.getLastModified());
Element root = document.getRoot();
if (root != null) {
String rootname = root.getQName().getLocalPart();
writeElement(rootname, document.getRoot(), jstream);
}
jstream.endObject();
}
内容来源于网络,如有侵权,请联系作者删除!