Playing with the RDF DSL on the clerezza console. Accessing the planet-rdf feed and exploring some nodes using the / and the /- methods to traverse incoming and outgoing properties
The following works with the most recent launcher: zz>:silent zz>val planetRdf = $[TcManager].getGraph("http://planetrdf.com/index.rdf".uri) zz>val rss = "http://purl.org/rss/1.0/".uri zz>val preamble = new Preamble(planetRdf) zz>import preamble._ zz>out.println("http://planetrdf.com/".uri/DC.date*) 2011-05-16T06:05:43.29Z zz>out.println("http://planetrdf.com/".uri/(rss+'description)*) It's triples all the way down zz>out.println(((rss+'item)/-RDF.`type`).size) 28 zz>out.println((rss+'item)/-RDF.`type`/(rss+'title)*) SPARQL 1.1 Query: negated property sets and the algebra zz>for (item <- (rss+'item)/-RDF.`type`) {out.println(item/(rss+'title)*)} SPARQL 1.1 Query: negated property sets and the algebra Editorial ACSRDF2010 online (on RDF in chemistry) Importing RDF input in R for analysis Radify – RDFa Annotation Tool ... Reto On Thu, May 12, 2011 at 8:07 PM, Danny Ayers <danny.ay...@gmail.com> wrote: > As usual you're way ahead of me Reto (not a big compliment, the dogs are too). > > Didn't know about the DSL. > > But clerezza must tick some boxes for it to be worthwhile: science > project, tick. Blog engine is a tick, but no more a big one, Facebook > won that game. Doing ID well is a good tick, but not if it's just some > random project on github. > > I like the raw engine of HTTP, but that can be satisfied by sticking a > 4-bit chip up my dog's bum (sorry Sasha). > > Reto, I want to find Clerezza so compelling I have no choice. Hoppity. > > On 12 May 2011 19:50, Reto Bachmann-Gmuer <reto.bachm...@trialox.org> wrote: >> On Thu, May 12, 2011 at 7:16 PM, Danny Ayers <danny.ay...@gmail.com> wrote: >>> Right, but the auth distinction could be made along similar lines to >>> http/https - it's orthogonal. I do think at some point we end up >>> caching graphs (and their provenance to, I hope) but the bit I like >>> about danbri's Gremlin play is that it's a really stateless wander. >>> Starting from the assumption that the graph is public, we go and forth >>> as we choose. >> I don't think an implementation without caching is possible. What >> happens when you iterate through properties, an rdf:List or retrieve >> the properties of neigbouring nodes that have a hash or is bnode, I >> assume in all these cases only one request is made an then it is >> cached. >> >>> >>> You know I'm a big fan of SPARQL, but the Gremlin approach really does >>> seem to render a lot of that redundant. Ok, maybe while you're walking >>> the Web you might want to pass the data into a local SQL DB (for >>> example), but being able to walk the paths could be really useful. >> Tha's exactly the approach of the clerezza RDF DSL you use / and /- to >> wander through the nodes, adding a virtual Semweb graph (GGG) that >> dereferences resources is trivial with or without caching (but with no >> caching at all you would have sever limitations). Curious what the >> caching policy of Gremlin is. >> >>> SPARQL 1.1 has path stuff, looks good on paper, but let's say you've >>> set up your eCommerce site, being able to walk with data spectacles on >>> looks good to me. >> exactly. >> >> Reto >> >>> >>> On 12 May 2011 14:57, Reto Bachmann-Gmuer <reto.bachm...@trialox.org> wrote: >>>> HI, >>>> >>>> The .in .out seem to be equivalent to / and /- in graphnode. Now for >>>> navigating the web-of data we could simply add a virtual graph that >>>> dereferences named resources in a triple pattern adding the triples to >>>> a cache. A simple solution for authority would be the MSG, this >>>> wouldn't prevent me from saying that you know me and for this triple >>>> to be in the virtual graph as if you had asserted it but it would >>>> prevent me from linking two named resource without having authority >>>> (i.e. control resolution of the uri-space) over at least one of them. >>>> Another approach would to limit authority to the non-symmetric CBD >>>> (expanding only objects but not subjects) of the dereferenced >>>> resource. >>>> >>>> Cheers, >>>> Reto >>>> >>>> On Thu, May 12, 2011 at 2:10 PM, Danny Ayers <danny.ay...@gmail.com> wrote: >>>>> Hi Henry, >>>>> >>>>> I did have problems seeing the relevance of your work on friendly RDF >>>>> syntax to the Clerezza project, while it's good work the tie-in isn't >>>>> obvious. But I just had a demo of Gremlin from danbri, and now I think >>>>> there's a way of pulling this stuff together. >>>>> Gremlin is a little language for graph traversal which allows you to >>>>> walk the Web of data, node by node. The key part is that as you are >>>>> going through the graph, HTTP GETs are taking place. Get that into >>>>> your Friendly code and it's a winner! >>>>> >>>>> The way I imagine it working is using the command line bits to visit >>>>> the parts of the published data from the point of view of a client - a >>>>> browser or crawler, hopefully more intelligent things too. >>>>> >>>>> Check Dan's blog post (and the addendums in comments), I think you'll >>>>> like this: >>>>> >>>>> http://danbri.org/words/2011/05/10/675 >>>>> >>>>> Cheers, >>>>> Danny. >>>>> >>>>> -- >>>>> http://danny.ayers.name >>>>> >>>> >>> >>> >>> >>> -- >>> http://danny.ayers.name >>> >> > > > > -- > http://danny.ayers.name >