Re: What do you get when you dereference the URI of a named graph?

Frans,

I don't find (as I have said many times before) the term "named graph" useful,
and this is one example of why.   A graph (in N3, say) is a value, like a string.

Documents, on the other hand, have URIs, and when you look up those
URIs you get back RDF (like turtle) which you can parse to a graph.

cwm for example does this lookup.  It calls the built-in function which maps a document
information resource) onto its semantics as an RDF (or N3) graph log:semantics.
http://www.w3.org/2000/10/swap/log#semantics

So "http://www.w3.org/2000/10/swap/log" is a string,
< http://www.w3.org/2000/10/swap/log> is a document, and 

{  [...]
  log:semantics     a rdf:Property;
         :comment """The log:semantics of a document is [...] """;
         :domain doc:Work;
         :label "semantics";
         :range log:Formula .
  [...]
}

is a graph which is related to the document by log:semantics.

You can think of log:semantics as "all the triples that belong to that graph representing the document x"
That's in the cwm ontology.

Of course, there are many ways in which this is simplistic, as
you can have documents whose log:semantics varies with time, and so on,
and don't even start discussing wether the localid "semantics" was a
good one to pick back then.  

The log: ontology also has functions relating a graph to a string etc.

If you really want to give a name to a graph then you can with owl:sameAs
('=' in Turtle) I suppose,  like in n3 document <foo.n3> say

	<#g1> = {   <#s> <#p> 123 } .

and in this case when you look up <foo.n3> you will get all the
triples in foo.n3, not just the one above.  
You will get all the triples the author of <foo.n3> decided to make available.

When you use "foo.n3#g1" as an identifier for the graph, in talking to someone else,
 then you do it knowing that the other person will get that info in  <foo.n3> if they
look it up.   

Of course, in tis sense, many people can given URIs to the same graph, say in <bar.n3>


	<#answer4> = {   <foo.n3#s> <foo.n3#p> 123 } .

so that the same graph can have many URIs.

When SPARQL uses the syntax like  "GRAPPH <foo.n3>"    I take that 
as being a shorthand for saying the graph you would get by getting the document 
<foo.n3>.  ((In n3 you would write that out as  [is log:semantics of  <foo.n3>] or as
<foo.n3>^log:semantics )).

The graph isn't being directly named, a document is.
Of course loosely people muddle them in common parlance, but in general I
come back to not liking the term "named graph".   The thing in curly braces
can be called a graph literal.

Simple, in fact, yes.

Tim

On 2012-01 -04, at 09:24, Frans Knibbe | Geodan wrote:

> Hello,
> 
> I have a (hopefully) simple question: What can you expect when you dereference the URI of a named graph?
> 
> I would expect the answer to be "all the triples that belong to that graph", but I  could not find a source for such a mandate or consensus.
> 
> Thanks in advance,
> Frans
> 
> 
> 
> 

Received on Wednesday, 4 January 2012 20:56:26 UTC