Hi,

We are running TDB-backed Fuseki started with an assembler file with
tdb:unionDefaultGraph set to true. There are two named graphs in our
dataset. If I want to delete an item from one of the graphs I can do so
using the WITH clause as in the following example...

PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX dri: <http://nationalarchives.gov.uk/terms/dri#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>

WITH <http://nationalarchives.gov.uk/dri/catalogue>
DELETE
{
  <http://nationalarchives.gov.uk/dri/catalogue/record-list/abc>
dri:recordListMember ?item .
}
WHERE
{
  ?item dcterms:identifier "123"^^xsd:string .
}

However I am sending my updates over HTTP using the SPAQRL Protocol and so
I would prefer not to use the WITH clause but instead to use the
using-graph-uri parameter in my HTTP POST request. My understanding from
the specs is that the following HTTP request should be equivalent but it
doesn't seem to be. Can anyone confirm if this should work? Although it
executes successfully (response 204) - the data is not deleted...

POST 
/catalogue/update?using-graph-uri=http%3A%2F%2Fnationalarchives.gov.uk%2Fdri%2Fcatalogue
HTTP/1.1
Host: localhost:3030
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.5) Gecko/20120606
Firefox/10.0.5
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip, deflate
Connection: keep-alive
Content-Type: application/sparql-update; charset=UTF-8
Content-Length: 557
Pragma: no-cache
Cache-Control: no-cache
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX dri: <http://nationalarchives.gov.uk/terms/dri#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
DELETE { <http://nationalarchives.gov.uk/dri/catalogue/record-list/abc>
dri:recordListMember ?item . }
WHERE { ?item dcterms:identifier "123"^^xsd:string . }
HTTP/1.1 204 No Content
Fuseki-Request-ID: 40
Access-Control-Allow-Origin: *
Server: Fuseki (1.0.2)
----------------------------------------------------------

Thanks
Rob

-- 

Rob Walpole
Email robkwalp...@gmail.com
Tel. +44 (0)7969 869881
Skype: RobertWalpolehttp://www.linkedin.com/in/robwalpole

Reply via email to