jmvanel / semantic_forms

Form generators leveraging semantic web standards (RDF(S), OWL, SPARQL , ...
Other
75 stars 23 forks source link

SPARQL query and wget script for moving data to another named graph #165

Closed jmvanel closed 7 years ago

jmvanel commented 7 years ago

use case: moving data

<S> ?P ?O .

from a named graph to another; typically for moving a FOAF profile typed by the wrong user.

SebLemoine commented 7 years ago

query :

DELETE { GRAPH <oldGraph> { <S> ?P ?O }} INSERT{ GRAPH <newGraph> { <S> ?P ?O }} WHERE {GRAPH <oldGraph> { <S> ?P ?O}}
jmvanel commented 7 years ago

OK , after thinking more, replace <S> by ?S

And put this in a script dist/scripts/rgraphmove.sh like dist/scripts/rgraphremove.sh

SebLemoine commented 7 years ago

you need to have < S > to be sure of moving the good content. Imagin if you have more than 1 content in the graph, you need to precise the subject

SebLemoine commented 7 years ago

I have done a script who the suject is obtionnal