java中的Jena Fuseki Sparlql插入和删除
我正在使用ApacheJenaSparQLAPI与远程JenaFuseki服务器通信,使用uri中的uri:。除了select之外,我还想执行sparql insert和delete查询。以下是我的select查询代码:java中的Jena Fuseki Sparlql插入和删除,java,insert,sparql,jena,apache-jena,Java,Insert,Sparql,Jena,Apache Jena,我正在使用ApacheJenaSparQLAPI与远程JenaFuseki服务器通信,使用uri中的uri:。除了select之外,我还想执行sparql insert和delete查询。以下是我的select查询代码: private String serviceURI = "http://localhost:3030/Test"; /** * This method prints the result of a sparql query as table * @
private String serviceURI = "http://localhost:3030/Test";
/**
* This method prints the result of a sparql query as table
* @param Query to get the result of
*/
public void printSparqlResult(String query){
QueryExecution q = QueryExecutionFactory.sparqlService(this.serviceURI,query);
ResultSet results = q.execSelect(); // get result-set
ResultSetFormatter.out(System.out, results); // print results
}
SPARQL查询和SPARQL更新是不同的语言 使用UpdateExecutionFactory创建SPARQL更新的执行
终结点将不是“”--更可能是“”。查询服务是/Test/query,尽管直接在数据集上运行。SPARQL查询和SPARQL更新是不同的语言 使用UpdateExecutionFactory创建SPARQL更新的执行 终结点将不是“”--更可能是“”。查询服务是/Test/query,但直接在数据集上运行通常是可行的