import com.hp.hpl.jena.update.UpdateRequest;
import com.hp.hpl.jena.update.*;
UpdateRequest ur = new UpdateRequest();
UpdateProcessor up;
String service ="http://127.0.0.1:3030/ds/update";
void setup(){
ur.add("INSERT {<bola> <bolb> <bolc>} WHERE {?s ?p ?o}");
up=UpdateExecutionFactory.createRemote(ur,service);
up.execute();
}
void draw(){
}
AVEC CURL:
curl --data 'update=PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX ex: <http://example.org/>
PREFIX zoo: <http://example.org/zoo/>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
INSERT DATA {
ex:dog1 rdf:type ex:animal .
ex:cat1 rdf:type ex:cat .
ex:cat rdfs:subClassOf ex:animal .
zoo:host rdfs:range ex:animal .
ex:zoo1 zoo:host ex:cat2 .
ex:cat3 owl:sameAs ex:cat2 .
}' http://192.168.1.52:3030/ds/update
sources:
http://answers.semanticweb.com/questions/20541/fuseki-update-sparql-query-error
https://baach.de/Members/jhb/getting-started-with-jena-fuseki-and-owl-reasoning
import com.hp.hpl.jena.update.*;
UpdateRequest ur = new UpdateRequest();
UpdateProcessor up;
String service ="http://127.0.0.1:3030/ds/update";
void setup(){
ur.add("INSERT {<bola> <bolb> <bolc>} WHERE {?s ?p ?o}");
up=UpdateExecutionFactory.createRemote(ur,service);
up.execute();
}
void draw(){
}
AVEC CURL:
curl --data 'update=PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX ex: <http://example.org/>
PREFIX zoo: <http://example.org/zoo/>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
INSERT DATA {
ex:dog1 rdf:type ex:animal .
ex:cat1 rdf:type ex:cat .
ex:cat rdfs:subClassOf ex:animal .
zoo:host rdfs:range ex:animal .
ex:zoo1 zoo:host ex:cat2 .
ex:cat3 owl:sameAs ex:cat2 .
}' http://192.168.1.52:3030/ds/update
sources:
http://answers.semanticweb.com/questions/20541/fuseki-update-sparql-query-error
https://baach.de/Members/jhb/getting-started-with-jena-fuseki-and-owl-reasoning
Aucun commentaire:
Enregistrer un commentaire