我想通過http向遠程端點發送更新。 我發現joseki是這樣一個端點。如何使用Jena查詢/更新遠程RDF端點
但是,如果我只知道端點的URI,我該如何向此端點發送更新查詢?
// To do a select-query you can use this:
QueryExecution qe = QueryExecutionFactory.sparqlService(serviceURI, query);
// (Sidenote:) does the next line have the desired effect of setting the binding?
// After all, sparqlService has no alternative with initialBindang as parameter
qe.setInitialBinding(initialBinding);
result = qe.execSelect();
// But updates do not support this kind of sparqlService method
// Illegal:
// UpdateAction.sparqlServiceExecute(serviceURI, query);
// I can use the following:
UpdateAction.parseExecute(updateQuery, dataset, initialBinding);
// But dataset is a Dataset object, not the uri.
// I don't believe this is the correct way to overcome this:
Dataset dataset = DatasetFactory.create(serviceURI);
否則我想聽聽如何對只有URI已知的端點執行遠程更新查詢。
更新: 最終訴諸當地jena。這種RDF端點接受插入和刪除語句。 我沒有成功找到可以接受修改查詢的遠程RDF端點。