Since you speak of "graphs", I assume that your queries are CONSTUCT/DESCRIBE?
Labelling of blank-nodes
Are the results from the REST interface in RDF/XML? If so, unless there's rdf:nodeID attributes assigned, there are no obvious labels to assign to a blank-node. Even with rdf:nodeID values, parsers are not required to preserve these as blank-node labels, and may (varyingly) append them onto prefixes, or add counters, etc.
For RDF/XML blank-nodes without rdf:nodeID, parsers typically have a prefix like bnode or genid and append a counter _:bnode0, _:bnode1 etc. There's no agreed upon rule-of-thumb on how this should be done (and different parsers might encounter bnodes in different order).
So, you shouldn't expect consistent blank-node labelling across different parsers. Similarly, I wouldn't imagine that the bnode labelling of librdf for RDF/XML parsing is configurable.
Solutions?
An easy solution might be to try return results in N-Triples where blank-nodes are explicitly named. (I think that it's a safe assumption that librdf will keep the native labels for blank-nodes.)
If not possible (tricky)...
One option might be to not specify the blank node in the remove statement request. This will work fine if the remaining constants uniquely identify a particular triple. Otherwise, you can query Sesame with the blank-nodes as variables: this will return a set of candidate statements to remove. You can then try to figure out which candidate statement you want to delete (maybe using a simple entailment check :O).
answered
22 Feb '11, 17:53
Signified ♦
20.9k●6●22
accept rate:
39%
Strictly speaking, you can't have underscores in blank-node labels of N-Triples http://www.w3.org/2001/sw/RDFCore/ntriples/#name (the semi-colons in your N-Triples are also a little weird). But that's probably not the problem since the parser doesn't throw an exception. I'm really surprised that the
librdfN-Triples parser goes to the bother of rewriting blank-nodes. (See comments below...)