本文整理了Java中org.apache.abdera.factory.Factory.newContent()
方法的一些代码示例,展示了Factory.newContent()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Factory.newContent()
方法的具体详情如下:
包路径:org.apache.abdera.factory.Factory
类名称:Factory
方法名:newContent
[英]Create a new Content element.
[中]创建一个新的内容元素。
代码示例来源:origin: apache/cxf
protected void setEntryContent(Factory factory, Entry e, String content) {
Content ct = factory.newContent(Content.Type.XML);
ct.setValue(content);
e.setContentElement(ct);
}
代码示例来源:origin: org.apache.cxf/cxf-rt-rs-extension-providers
protected void setEntryContent(Factory factory, Entry e, String content) {
Content ct = factory.newContent(Content.Type.XML);
ct.setValue(content);
e.setContentElement(ct);
}
代码示例来源:origin: org.apache.cxf/cxf-bundle-jaxrs
protected void setEntryContent(Factory factory, Entry e, String content) {
Content ct = factory.newContent(Content.Type.XML);
ct.setValue(content);
e.setContentElement(ct);
}
代码示例来源:origin: apache/cxf
private Entry createBookEntry(int id, String name) throws Exception {
Book b = new Book();
b.setId(id);
b.setName(name);
Factory factory = Abdera.getNewFactory();
JAXBContext jc = JAXBContext.newInstance(Book.class);
Entry e = factory.getAbdera().newEntry();
e.setTitle(b.getName());
e.setId(Long.toString(b.getId()));
StringWriter writer = new StringWriter();
jc.createMarshaller().marshal(b, writer);
Content ct = factory.newContent(Content.Type.XML);
ct.setValue(writer.toString());
e.setContentElement(ct);
return e;
}
代码示例来源:origin: org.apache.tuscany.sca/tuscany-binding-atom-runtime
Content content = factory.newContent();
content.setContentType(Content.Type.XML);
content.setValue(value);
代码示例来源:origin: org.xcmis/xcmis-restatom
Content content = factory.newContent();
content.setContentType(null);
content.setSrc(contentLink);
内容来源于网络,如有侵权,请联系作者删除!