- From: Andy Seaborne <andy.seaborne@epimorphics.com>
- Date: Wed, 02 Mar 2011 08:57:58 +0000
- To: Lee Feigenbaum <lee@thefigtrees.net>
- CC: Fabien Gandon <fabien.gandon@inria.fr>, RDF WG <public-rdf-wg@w3.org>
On 02/03/11 01:21, Lee Feigenbaum wrote: > On 3/1/2011 8:20 PM, Lee Feigenbaum wrote: >> On 3/1/2011 6:33 PM, Fabien Gandon wrote: >>> Hello, >>> >>> Going through the numerous messages about RDF graphs, g-*, named >>> graphs, graph literals, etc. I felt that there is one question which >>> has not been explicitly addressed and which for me is important for >>> instance when it comes to handling blank nodes. >>> >>> One of the things I liked in the notion of "surface" as proposed by >>> Pat (unless I am mistaken) is that they natively support overlapping >>> i.e. a given triple can belong to several surfaces. This ability to >>> support multiple partitioning of a triple set, overlapping g-boxes, >>> would lead me to say that a blank node participating to the overlap of >>> two g-boxes should be considered the same shared blank node in the two >>> g-boxes. >>> >>> In other words I believe we need to decide if there can be overlaps >>> between g-boxes, between g-snaps and between g-texts. >>> >>> I am convinced we need to allow overlapping g-boxes. >>> I am not too sure about overlapping g-snaps and overlapping g-texts. >> >> What do existing systems do? >> >> All triples within Anzo live inside of named graphs, which are analogous >> to Sandro's g-boxes. The same blank node can appear in multiple g-boxes, >> and so any triple can appear in multiple g-boxes. >> >> I don't recall offhand whether our TriG parser scopes blank node labels >> to a particular graph, and the existing TriG document doesn't specify >> one way or the other. (i.e. given "Example Document 3" in >> http://www4.wiwiss.fu-berlin.de/bizer/TriG/, what is the answer to this >> query: >> >> PREFIX : <http://example.org/> >> PREFIX foaf: <http://xmlns.com/foaf/0.1/> >> ASK >> FROM NAMED :alice >> FROM NAMED :bob >> { >> GRAPH ?g1 { >> ?p foaf:name "Alice" >> } >> GRAPH ?g2 { >> ?p foaf:name "Bob" >> } >> } >> >> Given the data, I'd assume that the implicit understanding is that bnode >> labels are scoped to a graph, and so the answer to this query would be >> "false". I _think_ that's what our parser does. Despite that, you can >> still programmatically put the same blank node into 2 graphs (err >> g-boxes) within Anzo. >> >> (Note that I think this can only be tested using "FROM NAMED" in SPARQL, >> as multiple "FROM" clauses use RDF merge to combine the source graphs, >> which explicitly prevents any shared blank nodes, IIUC.) > > For completeness, I should add that I don't care all that much about > this particular issue, since we rarely use blank nodes :-) In Jena, a blank node can be in more than one graph. We have derived graphs, e.g. one graph is a subgraph of another, a graph is inference over another base data. TriG does not say what the label scope is (Richard will recall I asked). To use TriG for serializing compound graph setups, and be true to Turtle etc, the Jena/RIOT TriG and N-quads parsers default to label scoped to document, not label scoped to graph in document. Andy
Received on Wednesday, 2 March 2011 08:58:45 UTC