plt-tud / r43ples

Revision Management for the Semantic Web
Other
19 stars 16 forks source link

MERGE syntax #88

Open white-gecko opened 6 years ago

white-gecko commented 6 years ago

How is the exact merge syntax?

Executing the following query as described in the README does not work:

USER "me" MESSAGE "test merge" MERGE GRAPH <http://example.org/> BRANCH "master" INTO "develop"

The store says:

USER "me" MESSAGE "test merge" MERGE GRAPH <http://example.org/> BRANCH "master" INTO "develop"
22.01.2018 18:33:51 de.tud.plt.r43ples.exception.InternalErrorException - No R43ples query detected

To reproduce it, I've executed the following queries:

CREATE GRAPH <http://example.org/>
query=USER "me" MESSAGE "test commit on master" INSERT DATA { GRAPH <http://example.org/> REVISION "master" { <urn:1> <urn:2> <urn:3> .}}
USER "me" BRANCH GRAPH <http://example.org/> REVISION "master" TO "develop"
SELECT * WHERE { GRAPH <http://example.org/> REVISION "master" {?s ?p ?o }}
SELECT * WHERE { GRAPH <http://example.org/> REVISION "develop" {?s ?p ?o }}
USER "me" MESSAGE "test commit on master" INSERT DATA { GRAPH <http://example.org/> REVISION "master" { <urn:3> <urn:2> <urn:1> .}}
USER "me" MESSAGE "test commit on master" INSERT DATA { GRAPH <http://example.org/> REVISION "develop" { <urn:3> <urn:4> <urn:1> .}}
SELECT * WHERE { GRAPH <http://example.org/> REVISION "master" {?s ?p ?o }}
SELECT * WHERE { GRAPH <http://example.org/> REVISION "develop" {?s ?p ?o }}
USER "me" MESSAGE "test merge" MERGE GRAPH <http://example.org/> BRANCH "master" INTO "develop"
stephanhensel commented 6 years ago

Which version or branch of R43ples do you use?

white-gecko commented 6 years ago

We are working with this docker image: https://hub.docker.com/r/aksw/r43ples/, which is using the develop branch.

stephanhensel commented 6 years ago

We updated the develop branch. Now merges should be working. Please check out the latest develop branch. I tried your example and corrected it to the current SPARQL syntax which we use. You can find the current query syntax within the readme (There are for example more possibilites to apply a 3-Way-Merge).

Please give me a short notice if it works for you.

Your example with corrected syntax:

USER "me" MESSAGE "create" CREATE GRAPH <http://example.org/>

USER "me" MESSAGE "test commit on master" INSERT DATA { GRAPH <http://example.org/> BRANCH "master" { <urn:1> <urn:2> <urn:3> .}}

USER "me" MESSAGE "branch" BRANCH GRAPH <http://example.org/> REVISION "1" TO "develop"

SELECT * WHERE { GRAPH <http://example.org/> REVISION "master" {?s ?p ?o }}

SELECT * WHERE { GRAPH <http://example.org/> REVISION "develop" {?s ?p ?o }}

USER "me" MESSAGE "test commit on master" INSERT DATA { GRAPH <http://example.org/> BRANCH "master" { <urn:3> <urn:2> <urn:1> .}}

USER "me" MESSAGE "test commit on master" INSERT DATA { GRAPH <http://example.org/> BRANCH "develop" { <urn:3> <urn:4> <urn:1> .}}

SELECT * WHERE { GRAPH <http://example.org/> REVISION "master" {?s ?p ?o }}

SELECT * WHERE { GRAPH <http://example.org/> REVISION "develop" {?s ?p ?o }}

USER "me" MESSAGE "test merge" MERGE AUTO GRAPH <http://example.org/> BRANCH "develop" INTO BRANCH "master"

SELECT * WHERE { GRAPH <http://example.org/> REVISION "master" {?s ?p ?o }}

SELECT * WHERE { GRAPH <http://example.org/> REVISION "develop" {?s ?p ?o }}