W3C home > Mailing lists > Public > www-archive@w3.org > November 2007

foaf:Group SPARQL and PGP example

From: Dan Brickley <danbrickley@gmail.com>
Date: Tue, 6 Nov 2007 00:59:55 +0000
Message-ID: <a8d312c10711051659u3a721d98v4ad4222f7a73d24d@mail.gmail.com>
To: "Tim Berners-Lee" <timbl@w3.org>
Cc: www-archive@w3.org

Hi TimBL,

Care to dig out a GPG key and try signing some RDF? Am playing with
ideas for expressing foaf:Group membership rules in SPARQL. SPARQL
rather than OWL or RIF since properties of the graph/doc are
interesting here. One example (which goes back to SWAD days) is to say
things like, "the members of this group are people who are said to
have a workplaceHomepage of www.w3.org by timbl". Since SPARQL isnt' a
full rule language, the query needs to be a bit hardcoded. But I'd be
interested in getting this running...

Example follows (uses wrong key fingerprint, but you get the idea?)

cheers,

Dan

"Someone's in the W3C Staff group if a document signed by TimBL says
their workplaceHomepage is http://www.w3.org/".

<foaf:Group rdf:about="#w3t_according_to_timbl"
xmlns:foaf="http://xmlns.com/foaf/0.1/">
  <foaf:name>W3C Team members</foaf:name>
  <foaf:membershipClass> <!-- previously used OWL -->

     <foaf:Query foaf:var="?x"> <![CDATA[

     PREFIX : <http://xmlns.com/foaf/0.1/>
     PREFIX wot: <http://xmlns.com/wot/0.1/>
     SELECT ?x
#     FROM <http://www.w3.org/People/TimBL/staff.rdf> # hardcode the
src? or just properties of it?
# or use Construct? ?x foaf:member foo_group etc
     WHERE {
        GRAPH ?doc {
          ?x a :Person .
          ?x :workplaceHomepage <http://www.w3.org/> .
        } .
          ?doc wot:assuredBy [ a :Agent;   wot:keyid = "B573B63A" ] .
     }

     ]]>
    </foaf:Query>
  </foaf:membershipClass>
</foaf:Group>
Received on Tuesday, 6 November 2007 01:00:09 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 7 November 2012 14:18:11 GMT