本文整理汇总了Java中org.apache.jena.riot.WriterGraphRIOT类的典型用法代码示例。如果您正苦于以下问题:Java WriterGraphRIOT类的具体用法?Java WriterGraphRIOT怎么用?Java WriterGraphRIOT使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
WriterGraphRIOT类属于org.apache.jena.riot包,在下文中一共展示了WriterGraphRIOT类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: mergeGraph
import org.apache.jena.riot.WriterGraphRIOT; //导入依赖的package包/类
public void mergeGraph(String uri, Graph graph) {
WriterGraphRIOT writer = RDFDataMgr.createGraphWriter(Lang.NTRIPLES);
OutputStreamRIOTSender sender = new OutputStreamRIOTSender(writer);
sender.setGraph(graph);
OutputStreamHandle handle = new OutputStreamHandle(sender);
this.graphManager.merge(uri, handle, currentTransaction);
}
示例2: writeGraph
import org.apache.jena.riot.WriterGraphRIOT; //导入依赖的package包/类
public void writeGraph(String uri, Graph graph) {
WriterGraphRIOT writer = RDFDataMgr.createGraphWriter(Lang.NTRIPLES);
OutputStreamRIOTSender sender = new OutputStreamRIOTSender(writer);
sender.setGraph(graph);
OutputStreamHandle handle = new OutputStreamHandle(sender);
this.graphManager.write(uri, handle, currentTransaction);
}
示例3: createEntity
import org.apache.jena.riot.WriterGraphRIOT; //导入依赖的package包/类
@Test
public void createEntity() throws Exception {
Individual ent = provModel.createEntity(URI
.create("http://example.com/fred#test"));
provModel.createEntity(URI.create("http://example.com/test"));
OntModel model = provModel.model;
model.write(System.out, "TURTLE", "http://example.com/fred");
model.write(System.out, "RDF/XML", "http://example.com/fred");
WriterGraphRIOT writer = RDFDataMgr.createGraphWriter(RDFFormat.TURTLE_BLOCKS);
writer.write(System.out, model.getBaseModel().getGraph(), RiotLib.prefixMap(model.getGraph()), "http://example.com/fred", new Context());
}
示例4: OutputStreamRIOTSender
import org.apache.jena.riot.WriterGraphRIOT; //导入依赖的package包/类
public OutputStreamRIOTSender(WriterGraphRIOT writer) {
this.writer = writer;
}