W3C home > Mailing lists > Public > public-rdfa-wg@w3.org > January 2011

Re: RDF/RDFa API: Structuring graph data

From: Manu Sporny <msporny@digitalbazaar.com>
Date: Thu, 27 Jan 2011 09:09:07 -0500
Message-ID: <4D417C83.4070302@digitalbazaar.com>
To: RDFa WG <public-rdfa-wg@w3.org>
On 01/26/2011 08:29 PM, Nathan wrote:
> Manu Sporny wrote:
>> var library = jsonld.toObject(jsonLdText, objectFrame);
> That's very JSON-LD specific, and the problem, as you noted, affects all
> RDF(a).

Yes, but it's only JSON-LD specific because we were talking about
JSON-LD at the time. I believe it's something we can generalize, but
don't quite know the best way to do so at the moment.

> I'd put it simply, that we need to be able to turn a graph, in to a
> tree, or in to a set of objects.

Exactly right.

>  graph.toObjects( bookFilter, myterms ).forEach( function(book) {
>   book.contains.forEach( function(chapter) {
>    console.log("Book: " + book.title + " Chapter: " + chapter.title);
>   });
>  });

This was problematic to our developers. Their challenge was that they
should be able to work with the raw data as an associative array and not
depend on an API that can't be implemented in C++ very easily. That is,
the code above is natural to most JavaScript programmers, but isn't that
natural to C++ or even Python programmers.

Can we do this using only an associative array data structure?

> That said, it may be even easier to take a selector type approach,
> syntax such as:
>   select("Book.title Book.contains.title")

Yes, that would be neat. More about the nuances of object framing, query
by example and pure query languages here:


-- manu

Manu Sporny (skype: msporny, twitter: manusporny)
President/CEO - Digital Bazaar, Inc.
blog: Linked Data in JSON
Received on Thursday, 27 January 2011 14:09:40 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:05:23 UTC