Shortcuts in Update

Hi,

While we closed ISSUE-24 [1] and allow moving data between graphs [2], I'd like to re-open the discussion on shortcuts for the related commands - started by Steve and Andy [3].

In particular:

1) Copy data from one graph to another

COPY ( [GRAPH] <g2> | DEFAULT) INTO ( [GRAPH] <g1> | DEFAULT)

shortcut for

DROP SILENT (GRAPH <g1> | DEFAULT)
INSERT { ( GRAPH <g1> | DEFAULT) { ?s ?p ?o } } WHERE { ( GRAPH <g2> | DEFAULT) { ?s ?p ?o } }

2) Move data from one graph to another

MOVE ( [GRAPH] <g2> | DEFAULT) INTO ( [GRAPH] <g1> | DEFAULT)

shortcut for

DROP SILENT ( GRAPH <g1> | DEFAULT)
INSERT { (GRAPH <g1> | DEFAULT) { ?s ?p ?o } } WHERE { (GRAPH <g2> | DEFAULT) { ?s ?p ?o } }
DROP ( GRAPH <g2> | DEFAULT)

2) Add data from one graph to another

ADD ( [GRAPH] <g2> | DEFAULT) INTO ( [GRAPH] <g1> | DEFAULT)

shortcut for

INSERT { (GRAPH <g1> | DEFAULT) { ?s ?p ?o } } WHERE { (GRAPH <g2> | DEFAULT)  { ?s ?p ?o } }

Previous concerns by Andy and Steve where about "attempting to define syntactic shortcuts in a language that's not in widespread use yet".
Yet, I find that these command could reduce the burden of some useful patterns, e.g. when having temporary graphs and then moving their data into "permanent graphs".
Might be relevant when dealing with temporal information (blogs, sensors, etc.) that needs to be processed / validated before being considered stable enough.

I'd like to start the discussion here and follow-up on a next t-con (27th, I'm not available next week) depending on how it goes.

Alex.

[1] http://www.w3.org/2009/sparql/track/issues/24
[2] http://www.w3.org/2009/sparql/meeting/2010-01-12#resolution_8
[3] http://lists.w3.org/Archives/Public/public-rdf-dawg/2009OctDec/0676.html

--
Dr. Alexandre Passant
Digital Enterprise Research Institute
National University of Ireland, Galway
:me owl:sameAs <http://apassant.net/alex> .

Received on Friday, 16 July 2010 17:02:45 UTC