How to request / update remote RDF endpoint using Jena

I would like to send updates to the remote endpoint via http. I found that joseki is such an endpoint.

However, how can I send update requests to this endpoint if I only know the endpoint 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);

Otherwise, I would like to hear how to make remote update requests to endpoints for which only URIs are known.

Update: In the end, resorted to a local jena . This type of RDF endpoint accepts insert and delete instructions. I was unable to find a remote RDF endpoint that will accept modifying requests.

+3
source share
2

, URI.

, . sparql/update. , .

, sparql, , SQL- .

: "", "", "", "", "", .

, , , , .

, URL-, HTTP-. 4store, /sparql /update .

W3C examples , sparql.

+1

Joseki . , Fuseki, SPARQL Update.

+1

Source: https://habr.com/ru/post/1759879/


All Articles