My new project writeup is here:
http://projects.bigasterisk.com/sparqlhttp/doc.html

Code available upon request, but it's changing really fast right now so 
I haven't taken the time to push a release to cheeseshop.

The short version is that this is a remote rdflib API using twisted. 
Everything returns a deferred, etc.

Here's my new issue: if you do a query and get a BNode, should you be 
allowed to use that BNode in new adds?


d = graph.remoteQueryd("SELECT ?bnode WHERE { ?what ?ever ?bnode }")
def add(rows):
   b = rows[0]['bnode']
   graph.remoteAdd((b, NS['pred'], NS['obj']), context=NS['ctx#context'])
d.addCallback(rows)

If that's allowed, I need to figure out how to get the bnodes right. It 
might get really hard to implement if, say, the http server has 
restarted between the remoteQueryd and remoteAdd calls.

If I say no, you can't pass the bnode back in, then that means a 
client-side bnode is only useful within a single add (but I allow 
multiple statements in the add call). You might also get a bnode back in 
  a query, but you could only use it within the results of that query. 
Is that a reasonable restriction on remote rdf APIs?



BTW, the ad-hoc way I did add over http was to accept POST requests at 
"/add?context=http://example.org"; and receive ntriples statements in the 
postdata. Comments welcome on that part too.

_______________________________________________
Dev mailing list
Dev@rdflib.net
http://rdflib.net/mailman/listinfo/dev

Reply via email to