Hi Colin,

On 21/09/14 14:25, Colin Maudry wrote:
Unfortunately, both Marmotta documentation and practice seem to tell me
that the methods to replace a graph in the repo are limited, at least
from command line.

We have some bash script we internally use for some project. If there are users who find it relevant, we can include them int he client library.

Ideally, I would expect to be able to issue such command to replace a
graph in the repo:

curl -X PUT -H "Content-Type: application/rdf+xml; charset=utf-8" -d @file.rdf 
http://host/marmotta/import/upload

I guess the target URL would be different but you get the idea: instead of 
using POST and updating the target graph, I use PUT to drop the target graph 
and create it again with new data.

Unfortunately, this request returns a 405 error (Method Not Allowed):

Well, the import web service is just part of the infrastructure that support the admin ui. At the webservice tab you can always see some documentation, where the /import/upload endpoint allows you to POST raw RDF serialized according the sent Content-Type header to the context specified by the 'context' query parameter (default if missing).

Since PUT (and DELETE) are not supported, is there a way to use POST to delete 
a graph? In any case, I hope the support of PUT and DELETE are on the roadmap :)

In addition to the import infrastructure, Marmotta 3.2.1 also provides partial support to the SPARQL 1.1 Graph Store HTTP Protocol <http://www.w3.org/TR/sparql11-http-rdf-update/>, where you can do some operations directly to the contexts (named graphs) URI. That's will be fully supported in 3.3.0 (see MARMOTTA-544 for the details).

Hope that helps.

Cheers,

--
Sergio Fernández
Partner Technology Manager
Redlink GmbH
m: +43 660 2747 925
e: sergio.fernan...@redlink.co
w: http://redlink.co

Reply via email to