RE: bNodes as graph identifiers

On Monday, June 03, 2013 12:45 PM, Steve Harris wrote:
> >>> Right. Expecting to be able to access bnode IDs from outside their
> >>> scope is something we should strongly discourage. Even if it works,
> >>> it is Bad Practice.
> >>
> >> Right, but that *severely* limits the utility of this feature.
> >
> > Why?
> 
> Well, you have no persistent identifier, and no easy (legitimate) way
> to refer to the graph in your code, except by example. That can be
> difficult to deal with in the real world.
> 
> Suppose I have:
> 
> _:a {
>    :s1 :p "foo" .
>    :s1 :q "bar" .
> }
> 
> _:b {
>    :s1 :p "foo" .
>    :s1 :q "baz" .
> }
> 
> The only way I can refer to the graph labelled as _:b in my system is
> by noting that it has :s1 :p "foo", :s1 :q "baz" - it has no identity
> beyond that.

Except if I would also have something like this in, e.g., the default graph

:s0 :x _:a
:s0 :y _:b

Then I can navigate to the graph. But unfortunately _:a doesn't denote the
graph (even an IRI wouldn't) and so it is not clear whether _:a (or :a for
that matter) identifies the graph stored using that label or something else.
I'm sure most people would intuitively say that _:a does identify that graph
- but that's the topic of another thread.


> >> I'm willing to bet that if you presented this view to the JSON-LD
> >> people (who requested anonymous graphs in the first place) they
> >> wouldn't be keen on this as a solution to their representational
> >> issue.
> >
> > That's definitely not the case. In most cases I would expect that
> > there isn't even a bnode identifier associated with the graph.
> 
> I don't think I understand that statement.

In JSON-LD you can do something like this:

{
  "@context": ...,
  "@id": "/product/xyz",
  "priceAtExample.com": 19.99,
  "priceAtExample.org": 17.39,
  "sources": [
    {
      "retrievedOn": "2012-04-09",
      "retrievedFrom": "http://example.com/...",
      "@graph": [
        ... the graph containing the price ...
      ]
    },
    ...
  ]
}

Sources contains anonymous graphs. There's no bnode ID in the serialization,
that's what I meant. Of course no external system would be able to reference
such an anonymous graph.



--
Markus Lanthaler
@markuslanthaler

Received on Monday, 3 June 2013 11:23:28 UTC