W3C home > Mailing lists > Public > public-rdf-wg@w3.org > April 2011

Re: A use case for graph literals: Schemapedia (ISSUE-5)

From: Steve Harris <steve.harris@garlik.com>
Date: Tue, 12 Apr 2011 13:32:30 +0100
Cc: Richard Cyganiak <richard@cyganiak.de>, RDF Working Group WG <public-rdf-wg@w3.org>
Message-Id: <CE9B0D82-BACD-4F2A-8894-7EEE6D61194D@garlik.com>
To: Ian Davis <me@iandavis.com>
That's great, thanks for the response Ian.

Is there some reason why this would be helpful, but putting the triples into a named graph wouldn't? Also, do you have any usecases that would be satisfied by being able to SPARQL the contents of a turtle literal, that aren't satisfied by your current solution?

- Steve

On 2011-04-11, at 18:30, Ian Davis wrote:

> Richard, Steve,
> 
> This won't make it to the WG list but feel free to share in full or part or simply ignore :)
> 
> My use case doesn't require access to the graph literals via sparql because I pre-analyze them and pull out useful things like the schemas being used. However I could do that on the fly if I had access to a sparql processor that understood graph literals as a built in datatype. Just like I can do date arithmetic on a set of xsd datetime datatypes in sparql I can conceive a subquery extension over embedded graphs.
> 
> Ian
> 
> On 11 Apr 2011 18:23, "Richard Cyganiak" <richard@cyganiak.de> wrote:
> > On 11 Apr 2011, at 14:33, Steve Harris wrote:
> >> I'm not sure in this situation you'd want example fragments to be handled as a named graph type of first class object, but maybe I'm missing the use-case.
> >> 
> >> Suppose I write
> >> 
> >> <some-schema> a :Schema ;
> >> :example "@prefix some: <http://some.schema.example> .\n<bob> some:has <Thing> .\n" .
> >> 
> >> Do I want those example triples to be accessible for e.g. in SPARQL queries?
> > 
> > In this particular case I don't think so.
> > 
> >> Or do I just want a convenient datatype to stash the literal text in RDF?
> > 
> > Yes. It would be more  accurate  to declare explicitly that this literal is a Turtle literal. That's all.
> > 
> > It's not a particularly powerful use case for graph literals, but a real one that I happened to come across.
> > 
> > Best,
> > Richard
> > 
> > 
> >> 
> >> - Steve
> >> 
> >> On 2011-04-08, at 11:32, Richard Cyganiak wrote:
> >> 
> >>> I just had a conversation with Ian Davis on Twitter that yielded a use case for defining datatype IRIs for graph literals. I thought I'd share it as input into ISSUE-5 [1].
> >>> 
> >>> He uses Turtle snippets as literals in SchemaPedia [2]. SchemaPedia is a site that helps find RDF vocabularies, and it lists example usage snippets for the vocabularies. The site's back-end is RDF-based. Turtle literals are used to store the examples, as well as change events when examples are modified. See [3] for a typical change event.
> >>> 
> >>> Currently Ian uses plain literals, because no datatype was readily available.
> >>> 
> >>> The idea of abusing Ivan's format URIs from [4] came up.
> >>> 
> >>> Best,
> >>> Richard
> >>> 
> >>> 
> >>> [1] http://www.w3.org/2011/rdf-wg/track/issues/5
> >>> [2] http://schemapedia.com/
> >>> [3] http://api.talis.com/stores/openvocab/meta?about=http://open.vocab.org/changes/f07ca76699a536dd38b5cbbbe1ba181d&output=rdf
> >>> [4] http://www.w3.org/ns/formats/
> >> 
> >> -- 
> >> Steve Harris, CTO, Garlik Limited
> >> 1-3 Halford Road, Richmond, TW10 6AW, UK
> >> +44 20 8439 8203 http://www.garlik.com/
> >> Registered in England and Wales 535 7233 VAT # 849 0517 11
> >> Registered office: Thames House, Portsmouth Road, Esher, Surrey, KT10 9AD
> >> 
> > 

-- 
Steve Harris, CTO, Garlik Limited
1-3 Halford Road, Richmond, TW10 6AW, UK
+44 20 8439 8203  http://www.garlik.com/
Registered in England and Wales 535 7233 VAT # 849 0517 11
Registered office: Thames House, Portsmouth Road, Esher, Surrey, KT10 9AD
Received on Tuesday, 12 April 2011 12:33:02 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 16:25:41 GMT