Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rename a graph with sparql update

Is possible to rename a graph using sparql update?

The only way through that I see is this:

INSERT {GRAPH uri:graphNEW {?s ?p ?o}}
WHERE  {GRAPH uri:graphOLD {?s ?p ?o}};
DROP GRAPH uri:graphOLD

but I'm not 100% sure that all the triples and attributes (like langue tags and xsd format) will be copied in the new graph.

Is there a cleverer way to do it?

EDIT: question improved thanks to Roman Susi suggestion

like image 413
ffa Avatar asked May 13 '15 07:05

ffa


1 Answers

From http://www.w3.org/TR/sparql11-update/#graphManagement

MOVE uri:graphOLD TO uri:graphNEW

which will replace uri:graphNEW

ADD uri:graphOLD TO uri:graphNEW

which will add all of old into new and keep existing triples in uri:graphNEW.

like image 53
AndyS Avatar answered Sep 22 '22 02:09

AndyS