This wiki is locked. Future workgroup activity and specification development must take place at our new wiki. For more information, see this blog post about the new governance model and this post about changes to the website.
I think we are lacking a restful means of updating named graphs. SPARQL update (see w3c) provides a update semantics for named graphs but there is no RESTful resource model for this.

There is some interest in the linked data community in coming up with such a rest model for named graphs.

Addressing triples in a named graph requires two things

  1. to be able to address the named graph, and,
  2. to be able to address the triple within that graph

for (1) we can identify the named graph with the RDF/XML representation of the OSLC Defined Resource. (The URI of the named graph is the URI of the RDF/XML (Turtle etc) document that serialises those triples.)

for (2) i suggest that we use the following query-like presentation (i think Martin used this first on the OSLC blog. need to search out the citation.)

for triple <s,p,o> in graph g we have

U ::= g?subject=s&predicate=p&object=o

Often, g and s are the same URI so this can be abbreviated, if desired.

A GET on U yields <s,p,o>

A PUT on U replaces <s,p,o> in g with <s,p,o> in the body

A POST on U with body <s,p,o> adds <s,p,o> to g

A DELETE on U removes <s,p,o> from g


Some examples.

consder the following resource:

<R rdf:about="http://example.com/req1">

<dc:title>A title for req1<dc:title/>

<dc:contributor>Ian</dc:contributor>

<implementedBy rdf:resource="urn:wi1"/>

<elaboratedBy rdf:resource="urn:model1"/>

</R>

Assume that implementedBy and elaboratedBy are multi-valued properties.

The URI of the graph is the URI of the document; in OSLC we typically identify the HTTP resource with the subject of the rdf:Description node in the RDF/XML. In this case, that's "http://example.com/req1".

So g == http://example.com/req1

Example: GET http://example.com/req1

returns the representation shown above

Example: GET http://example.com/req1?predicate=implementedBy

returns

<R rdf:about="http://example.com/req1">

<implementedBy rdf:resource="urn:wi1"/>

</R>

Example: PUT http://example.com/req1?predicate=implementedBy

Body:

<R rdf:about="http://example.com/req1">

<implementedBy rdf:resource="urn:wi1"/>

<implementedBy rdf:resource="urn:wi3"/>

</R>

Adds an implemented by link to req1.

DELETE http://example.com/req1?predicate=implementedBy&object=urn:wi3

removes the link to wi3.

POST http://example.com/req1

<R rdf:about="http://example.com/req1">

<supportedBy rdf:resource="urn:model2"/>

</R>

Creates a new "supportedBy" link to model2

Edit | Attach | Print version | History: r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r1 - 28 Apr 2010 - 20:30:09 - IanGreen
Main.RmRestfulSPARQLUpdate moved from Main.RmRestfulSPARQL on 28 Apr 2010 - 20:14 by IanGreen - put it back
 
This site is powered by the TWiki collaboration platform Copyright � by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Contributions are governed by our Terms of Use
Ideas, requests, problems regarding this site? Send feedback