<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://www.jenitennison.com/blog" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>genealogy</title>
 <link>http://www.jenitennison.com/blog/taxonomy/term/34</link>
 <description>The taxonomy view with a depth of 0.</description>
 <language>en</language>
<item>
 <title>rdfQuery: Progressive Enhancement with RDFa</title>
 <link>http://www.jenitennison.com/blog/node/94</link>
 <description>&lt;p&gt;Earlier this week I presented at &lt;a href=&quot;http://swig.networkedplanet.com/november2008.html&quot; title=&quot;Semantic Web Interest Group Community Event&quot;&gt;SWIG-UK&lt;/a&gt; about &lt;a href=&quot;http://code.google.com/p/rdfquery&quot; title=&quot;rdfQuery: RDF plugins for jQuery&quot;&gt;rdfQuery&lt;/a&gt;. rdfQuery is a set of plugins that I&amp;#8217;ve developed for &lt;a href=&quot;http://www.jquery.com&quot; title=&quot;jQuery: The Write Less, Do More, Javascript Library&quot;&gt;jQuery&lt;/a&gt; in order to support RDFa parsing, querying and generation. There are a bunch of other Javascript libraries for RDFa around, such as Mark Birbeck&amp;#8217;s &lt;a href=&quot;http://code.google.com/p/ubiquity-rdfa/&quot; title=&quot;Ubiquity RDFa&quot;&gt;Ubiquity RDFa&lt;/a&gt; and Ben Adida&amp;#8217;s &lt;a href=&quot;http://www.w3.org/2006/07/SWD/RDFa/impl/js/&quot; title=&quot;RDFa Javascript Library&quot;&gt;RDFa library&lt;/a&gt;. What I&amp;#8217;ve really tried to do with rdfQuery is tie it in with the &amp;#8220;Write Less, Do More&amp;#8221; philosophy of jQuery and provide a neat, elegant API. At least that&amp;#8217;s the aim!&lt;/p&gt;

&lt;!--break--&gt;

&lt;p&gt;So what does it do? Well, I&amp;#8217;ve just added the demo that I used on Tuesday into &lt;a href=&quot;http://code.google.com/p/rdfquery/source/checkout&quot; title=&quot;rdfQuery: SVN repository&quot;&gt;the repository&lt;/a&gt;, so if you grab hold of that you can take a look. Here&amp;#8217;s a screenshot of the demo.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/blog/files/markup-demo.jpg&quot; alt=&quot;Screenshot of rdfQuery demo&quot; width=&quot;100%&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The demo shows the overall concept of rdfQuery, namely that semantic markup can be useful not only to the crawlers that extract data from your pages to pump into massive triplestores, but also for you as a developer. In this case, which is a simple genealogy-type application, I want to have the people and places that are relevant to this particular extract highlighted within the text. I also want them listed on the left, with their details summarised.&lt;/p&gt;

&lt;p&gt;So the demo illustrates three things that rdfQuery does to help:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;gleaning triples from a section of the page (not just the whole page); in this case the triples are marked up with RDFa&lt;/li&gt;
&lt;li&gt;querying the data to construct objects that represent the results of those queries, then doing things with those results&lt;/li&gt;
&lt;li&gt;automatically adding RDFa to elements within the page, to update the data that it holds&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It also demonstrates rough versions of a couple of things that rdfQuery could and should do that I aim to work on soon:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;reasoning based on the data that&amp;#8217;s found in the page&lt;/li&gt;
&lt;li&gt;using ontologies to decide how to handle the data you find&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;By the by, it shows a simple, natural-language interface for making statements based on some text, but don&amp;#8217;t let that distract you. It&amp;#8217;s just regular expression processing.&lt;/p&gt;

&lt;p&gt;There are four parts of this page. The main part contains some text about Charles Darwin. If you look at the source, you&amp;#8217;ll see that it&amp;#8217;s been marked up with some RDFa like this:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;span about=&quot;#CharlesRobertDarwin&quot; typeof=&quot;foaf:Person&quot; 
      property=&quot;rdfs:label&quot; datatype=&quot;&quot;&amp;gt;
  &amp;lt;span property=&quot;foaf:firstName&quot;&amp;gt;Charles&amp;lt;/span&amp;gt; Robert 
  &amp;lt;span property=&quot;foaf:surname&quot;&amp;gt;Darwin&amp;lt;/span&amp;gt;
&amp;lt;/span&amp;gt; was &amp;lt;span about=&quot;#CharlesRobertDarwin&quot; rel=&quot;biografr:hasBirthPlace&quot;&amp;gt;born in 
&amp;lt;span about=&quot;#Shrewsbury&quot; typeof=&quot;vcard:Address&quot; 
      property=&quot;rdfs:label&quot; datatype=&quot;&quot;&amp;gt;
  &amp;lt;span property=&quot;vcard:locality&quot;&amp;gt;Shrewsbury&amp;lt;/span&amp;gt;, 
  &amp;lt;span property=&quot;vcard:region&quot;&amp;gt;Shropshire&amp;lt;/span&amp;gt;, 
  &amp;lt;span property=&quot;vcard:country&quot;&amp;gt;England&amp;lt;/span&amp;gt;
&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; on &amp;lt;span about=&quot;#CharlesRobertDarwin&quot; property=&quot;biografr:bornOn&quot; 
  content=&quot;1809-02-12&quot; datatype=&quot;xsd:date&quot;&amp;gt;12 February 1809&amp;lt;/span&amp;gt; at his 
  family home, the Mount. ...
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This source is also shown in the textarea at the bottom of the page. Obviously this wouldn&amp;#8217;t be visible in a real application, but it enables you to see what&amp;#8217;s going on in the demo. Changing it won&amp;#8217;t do anything; you can imagine that string being POSTed back to the server. I&amp;#8217;ve also added some CSS that gives a border to any elements with a &lt;code&gt;typeof&lt;/code&gt; attribute. Elements that have a &lt;code&gt;property&lt;/code&gt; change their colour when you mouse over them.&lt;/p&gt;

&lt;p&gt;So the page contains some RDFa. But what it doesn&amp;#8217;t contain (in the source) is any information in the menu on the left. This gets populated based on the RDFa. If you click on Charles Robert Darwin, you&amp;#8217;ll see the data that&amp;#8217;s been gleaned about him, including (at the bottom), the derived fact that Robert Darwin was Charles Darwin&amp;#8217;s father. Anything in black is information pulled from the RDFa; anything in orange is derived.&lt;/p&gt;

&lt;p&gt;Next, try typing &amp;#8220;Susannah Darwin was a person&amp;#8221; into the text input and hit return. You should get Susannah Darwin added to the list of people. More importantly, if you look at the new source of the page, you&amp;#8217;ll see that the phrase &amp;#8220;Susannah Darwin&amp;#8221; has been marked up with some RDFa to indicate that she was, indeed, a person and that &amp;#8220;Susannah Darwin&amp;#8221; can be used as a label for her.&lt;/p&gt;

&lt;p&gt;You can try typing a few more facts into the box if you like. I suggest:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&amp;#8220;Charles Robert Darwin was also known as Darwin&amp;#8221;&lt;/li&gt;
&lt;li&gt;&amp;#8220;Susannah Darwin was Darwin&amp;#8217;s mother&amp;#8221;&lt;/li&gt;
&lt;li&gt;&amp;#8220;Susannah Darwin&amp;#8217;s surname was Darwin&amp;#8221;&lt;/li&gt;
&lt;li&gt;&amp;#8220;Josiah Wedgwood was a person&amp;#8221;&lt;/li&gt;
&lt;li&gt;&amp;#8220;Susannah Darwin&amp;#8217;s father was Josiah Wedgwood&amp;#8221;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;So this is all very cool and all, but the point was to show the code. So here we go.&lt;/p&gt;

&lt;h2&gt;Gleaning and Querying&lt;/h2&gt;

&lt;p&gt;Let&amp;#8217;s look at how the lists are populated:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;457: populateLists = function () {
458:   var rdf = $(&#039;#content&#039;).rdf();
459:   people.empty();
460:   places.empty();
461:   rdf
462:     .prefix(&#039;rdfs&#039;, ns.rdfs)
463:     .prefix(&#039;foaf&#039;, ns.foaf)
464:     .where(&#039;?person a foaf:Person&#039;)
465:     .where(&#039;?person rdfs:label ?label&#039;)
466:     .each(function () {
467:       addIndividual(people, this.person, this.label.value);
468:     })
469:     .reset()
470:     .where(&#039;?place a vcard:Address&#039;)
471:     .where(&#039;?place rdfs:label ?label&#039;)
472:     .each(function () {
473:       addIndividual(places, this.place, this.label.value);
474:     });
475: },
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Line 458 parses the RDFa within the element with the id &lt;code&gt;content&lt;/code&gt; (this is a &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; that wraps around the paragraphs about Charles Darwin). The &lt;code&gt;rdf&lt;/code&gt; variable holds an rdfQuery object, which is very similar to a jQuery object except that it queries over RDF triples rather than DOM nodes. The rdfQuery object holds a pointer to a databank, which holds the triples that have been collected.&lt;/p&gt;

&lt;p&gt;Lines 459 and 460 empty out the existing lists of people and places if there are any. The &lt;code&gt;people&lt;/code&gt; and &lt;code&gt;places&lt;/code&gt; variables are set earlier in the script and are jQuery objects.&lt;/p&gt;

&lt;p&gt;Now the fun begins. I first set some prefixes on the rdfQuery object so that I can use those prefixes in &lt;a href=&quot;http://www.w3.org/TR/curie/&quot; title=&quot;CURIE Syntax 1.0&quot;&gt;CURIEs&lt;/a&gt; within the queries. In fact, these prefixes will have been set up by default anyway, because they&amp;#8217;re declared in the HTML page, but it doesn&amp;#8217;t hurt.&lt;/p&gt;

&lt;p&gt;Lines 464 and 465 locate triples in the databank based on simple &lt;a href=&quot;http://www.w3.org/TR/rdf-sparql-query/&quot; title=&quot;SPARQL Query Language for RDF&quot;&gt;SPARQL&lt;/a&gt;-based queries. The first &lt;code&gt;where()&lt;/code&gt; call creates a new rdfQuery object that, like a jQuery object, looks a bit like an array. The array contains objects, one for each triple that matches the pattern &lt;code&gt;?person a foaf:Person&lt;/code&gt;. Each of the objects has a &lt;code&gt;person&lt;/code&gt; property containing the resource that represents the person. So the rdfQuery that results from this &lt;code&gt;where()&lt;/code&gt; call looks like:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;{ length: 2,
  0: { person: $.rdf.resource(&#039;&amp;lt;#CharlesRobertDarwin&amp;gt;&#039;) },
  1: { person: $.rdf.resource(&#039;&amp;lt;#RobertDarwin&amp;gt;&#039;) },
  ... bunch of other properties and methods that aren&#039;t important here ... }
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The second &lt;code&gt;where()&lt;/code&gt; call creates another new rdfQuery object based on combining the previous query results with the any triples that match the pattern &lt;code&gt;?person rdfs:label ?label&lt;/code&gt;. This holds objects with &lt;code&gt;person&lt;/code&gt; and &lt;code&gt;label&lt;/code&gt; properties, one for each person and their label. So the result of this looks like:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;{ length: 2,
  0: { person: $.rdf.resource(&#039;&amp;lt;#CharlesRobertDarwin&amp;gt;&#039;),
       label:  $.rdf.literal(&#039;&quot;Charles Robert Darwin&quot;&#039;) },
  1: { person: $.rdf.resource(&#039;&amp;lt;#RobertDarwin&amp;gt;&#039;),
       label:  $.rdf.literal(&#039;&quot;Robert Darwin&quot;&#039;) },
  ... bunch of other properties and methods that aren&#039;t important here ... }
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The &lt;code&gt;each()&lt;/code&gt; on lines 466-468 then iterates over the objects that it&amp;#8217;s constructed and calls the &lt;code&gt;addIndividuals()&lt;/code&gt; function (which is particular for this demo), passing in the list in the HTML, the person resource and the value of the label literal.&lt;/p&gt;

&lt;p&gt;Line 469 uses the &lt;code&gt;reset()&lt;/code&gt; method to go back to the original rdfQuery object. If I didn&amp;#8217;t do this, any further queries would simply add to the objects that I already have, or remove them if nothing matched.&lt;/p&gt;

&lt;p&gt;Lines 470-474 do the same thing for the places that are marked up within the text.&lt;/p&gt;

&lt;p&gt;There are various other places within &lt;code&gt;markup.js&lt;/code&gt; that glean and query RDF. For example, the &lt;code&gt;addDescription()&lt;/code&gt; function, which populates the list items on the left with data about particualr people and places. That function demonstrates the use of the &lt;code&gt;about()&lt;/code&gt; method, which gives you all the triples about a particular subject, and shows how to use arguments with the &lt;code&gt;each()&lt;/code&gt; method when you want to use the index of the query result or the triples that were used to create the query result.&lt;/p&gt;

&lt;h2&gt;Updating RDFa&lt;/h2&gt;

&lt;p&gt;So how easy is it to update the RDFa on the web page? Well, if you know what you want to add, then it&amp;#8217;s dead easy. Here&amp;#8217;s the code that does it on lines 452 and 532:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;span.rdfa(triple);
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The variable &lt;code&gt;span&lt;/code&gt; here is a jQuery object. The triple itself is a &lt;code&gt;$.rdf.triple&lt;/code&gt;. I&amp;#8217;d tell you more about them but I think I&amp;#8217;ve gone on long enough.&lt;/p&gt;

&lt;h2&gt;Final Words&lt;/h2&gt;

&lt;p&gt;&lt;a href=&quot;http://code.google.com/p/rdfquery&quot; title=&quot;rdfQuery: RDF plugins for jQuery&quot;&gt;rdfQuery&lt;/a&gt; is a Google Code project, released under an MIT license. If you&amp;#8217;re interested in contributing, send me an email and I&amp;#8217;ll add you as a member, or an owner if you&amp;#8217;re really keen. If you&amp;#8217;re interested, I&amp;#8217;ve set up a &lt;a href=&quot;http://groups.google.com/group/rdfquery&quot; title=&quot;rdfQuery Discussion Group&quot;&gt;discussion group&lt;/a&gt;. You can post any questions there, although of course if you find bugs, do &lt;a href=&quot;http://code.google.com/p/rdfquery/issues/entry&quot; title=&quot;rdfQuery: Add Issue&quot;&gt;add an issue&lt;/a&gt;.&lt;/p&gt;
</description>
 <comments>http://www.jenitennison.com/blog/node/94#comments</comments>
 <category domain="http://www.jenitennison.com/blog/taxonomy/term/34">genealogy</category>
 <category domain="http://www.jenitennison.com/blog/taxonomy/term/41">jQuery</category>
 <category domain="http://www.jenitennison.com/blog/taxonomy/term/31">rdf</category>
 <category domain="http://www.jenitennison.com/blog/taxonomy/term/42">rdfa</category>
 <category domain="http://www.jenitennison.com/blog/taxonomy/term/40">rdfQuery</category>
 <enclosure url="http://www.jenitennison.com/blog/files/markup-demo.jpg" length="286620" type="image/jpeg" />
 <pubDate>Sat, 15 Nov 2008 16:46:02 +0000</pubDate>
 <dc:creator>Jeni</dc:creator>
 <guid isPermaLink="false">94 at http://www.jenitennison.com/blog</guid>
</item>
<item>
 <title>Metadata about RDF triples: reification and Linked Data</title>
 <link>http://www.jenitennison.com/blog/node/85</link>
 <description>&lt;p&gt;Those of you who have been following this blog will know that I&amp;#8217;ve been thinking recently about &lt;a href=&quot;http://www.jenitennison.com/blog/node/67#comment-4512&quot; title=&quot;Jeni&#039;s Musings: Web 2.0 project: RDF and uncertainty&quot;&gt;how to handle uncertainty related to RDF triples&lt;/a&gt; (specifically in the context of a genealogical web app). Certainty isn&amp;#8217;t the only kind of metadata-about-triples that you&amp;#8217;d want to keep in an app like this. We need to know things like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;who made the statement&lt;/li&gt;
&lt;li&gt;when the statement was made&lt;/li&gt;
&lt;li&gt;what evidence that led to the statement being made&lt;/li&gt;
&lt;li&gt;licensing information about the reuse of the statement&lt;/li&gt;
&lt;li&gt;(if we go with the rating idea) what ratings the statement has been given&lt;/li&gt;
&lt;li&gt;(if we allow editing of statements) what changes have been made to the statement over time&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;and so on. In short, all the metadata that you&amp;#8217;d want to associate with &lt;em&gt;resources&lt;/em&gt; you&amp;#8217;d also want to associate with &lt;em&gt;statements&lt;/em&gt;.&lt;/p&gt;

&lt;!--break--&gt;

&lt;p&gt;I&amp;#8217;d anticipated using &lt;a href=&quot;http://www.w3.org/TR/rdf-primer/#reification&quot; title=&quot;W3C: RDF Primer: Reification&quot;&gt;reification&lt;/a&gt; to associate metadata with statements. Something like this&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;rdf:Statement rdf:about=&quot;#statement1&quot;&amp;gt;
  &amp;lt;rdf:subject rdf:resource=&quot;/people/CharlesDarwin&quot; /&amp;gt;
  &amp;lt;rdf:predicate rdf:resource=&quot;/ontology/event-roles/passenger&quot; /&amp;gt;
  &amp;lt;rdf:object rdf:resource=&quot;/events/BeagleVoyage&quot; /&amp;gt;
  &amp;lt;dc:creator rdf:resource=&quot;/users/JeniT&quot; /&amp;gt;
  &amp;lt;dc:date rdf:datatype=&quot;xsd:date&quot;&amp;gt;2008-04-11&amp;lt;/dc:date&amp;gt;
  &amp;lt;g:certainty rdf:datatype=&quot;xsd:decimal&quot;&amp;gt;1.0&amp;lt;/g:certainty&amp;gt;
  ...
&amp;lt;/rdf:Statement&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;or &lt;a href=&quot;http://www.w3.org/TR/2004/REC-rdf-syntax-grammar-20040210/#section-Syntax-reifying&quot; title=&quot;W3C: RDF/XML Syntax Specification: Reifying Statements: rdf:ID&quot;&gt;using &lt;code&gt;rdf:ID&lt;/code&gt;&lt;/a&gt;, although this does limit the URI of our statements to hash-URIs:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;rdf:Description about=&quot;/people/CharlesDarwin&quot;&amp;gt;
  &amp;lt;r:passenger rdf:ID=&quot;#statement1&quot; rdf:resource=&quot;/events/BeagleVoyage&quot; /&amp;gt; 
&amp;lt;/rdf:Description&amp;gt;
&amp;lt;rdf:Description about=&quot;#statement1&quot;&amp;gt;
  &amp;lt;dc:creator rdf:resource=&quot;/users/JeniT&quot; /&amp;gt;
  &amp;lt;dc:date rdf:datatype=&quot;xsd:date&quot;&amp;gt;2008-04-11&amp;lt;/dc:date&amp;gt;
  &amp;lt;g:certainty rdf:datatype=&quot;xsd:decimal&quot;&amp;gt;1.0&amp;lt;/g:certainty&amp;gt;
&amp;lt;/rdf:Description&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;(Please feel free to correct my RDF, RDF-folks!)&lt;/p&gt;

&lt;p&gt;We can embed this information into our web pages using RDFa:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;div about=&quot;#statement1&quot; instanceof=&quot;rdf:Statement&quot;&amp;gt;
  &amp;lt;p class=&quot;statement&quot;&amp;gt;
    &amp;lt;a rel=&quot;rdf:subject&quot; href=&quot;/people/CharlesDarwin&quot;&amp;gt;
      Charles Darwin
    &amp;lt;/a&amp;gt;
    was a
    &amp;lt;a rel=&quot;rdf:predicate&quot; href=&quot;/ontologies/event-roles/passenger&quot;&amp;gt;
      passenger
    &amp;lt;/a&amp;gt;
    on the
    &amp;lt;a rel=&quot;rdf:object&quot; href=&quot;/events/BeagleVoyage&quot;&amp;gt;
      &amp;lt;span about=&quot;/people/CharlesDarwin&quot; 
            rel=&quot;r:passenger&quot; 
            resource=&quot;/events/BeagleVoyage&quot;&amp;gt;
        Beagle Voyage
      &amp;lt;/span&amp;gt;
    &amp;lt;/a&amp;gt;
  &amp;lt;/p&amp;gt;
  &amp;lt;dl class=&quot;metadata&quot;&amp;gt;
    &amp;lt;dt&amp;gt;Author:&amp;lt;/dt&amp;gt;
    &amp;lt;dd&amp;gt;
      &amp;lt;a rel=&quot;dc:creator&quot; href=&quot;/users/JeniT&quot;&amp;gt;
        Jeni Tennison
      &amp;lt;/a&amp;gt;
    &amp;lt;/dd&amp;gt;
    &amp;lt;dt&amp;gt;Date:&amp;lt;/dt&amp;gt;
    &amp;lt;dd property=&quot;dc:date&quot; datatype=&quot;xsd:date&quot; 
        content=&quot;2008-04-11&quot;&amp;gt;
      11 Apr, 2008
    &amp;lt;/dd&amp;gt;
    &amp;lt;dt&amp;gt;Certainty:&amp;lt;/dt&amp;gt;
    &amp;lt;dd property=&quot;b:certainty&quot; datatype=&quot;xsd:decimal&quot;
        content=&quot;1.0&quot;&amp;gt;
      &amp;lt;img src=&quot;stars5.gif&quot; alt=&quot;five stars&quot; /&amp;gt;
    &amp;lt;/dd&amp;gt;
  &amp;lt;/dl&amp;gt;
&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Note that I&amp;#8217;ve incorporated both the reified statement and the statement itself into the RDFa. If I&amp;#8217;m correct in my mental parsing of RDFa, I think this leads to the set of triples from the RDF/XML in the above examples plus the triple:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;/people/CharlesDarwin&amp;gt; r:passenger &amp;lt;/events/BeagleVoyage&amp;gt; .
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;But then the other day, I was reading the tutorial &lt;a href=&quot;http://www4.wiwiss.fu-berlin.de/bizer/pub/LinkedDataTutorial/&quot; title=&quot;How to publish Linked Data on the Web&quot;&gt;How to publish Linked Data on the Web&lt;/a&gt;, which says&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;We discourage the use of RDF reification as the semantics of reification are unclear and as reified statements are rather cumbersome to query with the SPARQL query language. Metadata can be attached to the information resource instead, as explained in Section 5.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Jumping to Section 5, I find&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;&lt;strong&gt;Metadata:&lt;/strong&gt; The representation should contain any metadata you want to attach to your published data, such as a URI identifying the author and licensing information. These should be recorded as RDF descriptions of the information resource that describes a non-information resource; that is, the subject of the RDF triples should be the URI of the information resource. Attaching meta-information to that information resource, rather than attaching it to the described resource itself or to specific RDF statements about the resource (as with RDF reification) plays nicely together with using Named Graphs and the SPARQL query language in Linked Data client applications&amp;#8230;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;There are some examples of what this looks like within the tutorial. The first is an &amp;#8220;&lt;strong&gt;authoritative description&lt;/strong&gt;&amp;#8221; found at &lt;code&gt;http://dbpedia.org/data/Alec_Empire&lt;/code&gt; after a 303 redirection from &lt;code&gt;http://dbpedia.org/resource/Alec_Empire&lt;/code&gt;.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;# Metadata and Licensing Information
&amp;lt;http://dbpedia.org/data/Alec_Empire&amp;gt;
    rdfs:label &quot;RDF description of Alec Empire&quot; ;
    rdf:type foaf:Document ;
    dc:publisher &amp;lt;http://dbpedia.org/resource/DBpedia&amp;gt; ;
    dc:date &quot;2007-07-13&quot;^^xsd:date ;
    dc:rights &amp;lt;http://en.wikipedia.org/wiki/WP:GFDL&amp;gt; .

# The description
&amp;lt;http://dbpedia.org/resource/Alec_Empire&amp;gt; 
    foaf:name &quot;Empire, Alec&quot; ;
    rdf:type foaf:Person ;
    rdf:type &amp;lt;http://dbpedia.org/class/yago/musician&amp;gt; ;
    rdfs:comment
        &quot;Alec Empire (born May 2, 1972) is a German musician who is ...&quot;@en ;
    rdfs:comment
        &quot;Alec Empire (eigentlich Alexander Wilke) ist ein deutscher Musiker. ...&quot;@de ;
    dbpedia:genre &amp;lt;http://dbpedia.org/resource/Techno&amp;gt; ;
    dbpedia:associatedActs 
      &amp;lt;http://dbpedia.org/resource/Atari_Teenage_Riot&amp;gt; ;
    foaf:page &amp;lt;http://en.wikipedia.org/wiki/Alec_Empire&amp;gt; ;
    foaf:page &amp;lt;http://dbpedia.org/page/Alec_Empire&amp;gt; ; 
    rdfs:isDefinedBy &amp;lt;http://dbpedia.org/data/Alec_Empire&amp;gt; ;
    owl:sameAs &amp;lt;http://zitgist.com/music/artist/d71ba53b-23b0-4870-a429-cce6f345763b&amp;gt; .
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The second is a &lt;strong&gt;non-authoritative description&lt;/strong&gt; found at &lt;code&gt;http://sites.wiwiss.fu-berlin.de/suhl/bizer/pub/LinkedDataTutorial/ChrisAboutRichard&lt;/code&gt;:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;# Metadata and Licensing Information
&amp;lt;&amp;gt;
    rdf:type foaf:Document ;
    dc:author &amp;lt;http://www.bizer.de#chris&amp;gt; ;
    dc:date &quot;2007-07-13&quot;^^xsd:date ;
    cc:license &amp;lt;http://web.resource.org/cc/PublicDomain&amp;gt; .

# The description
&amp;lt;http://richard.cyganiak.de/foaf.rdf#cygri&amp;gt; 
    foaf:name &quot;Richard Cyganiak&quot; ;
    foaf:topic_interest &amp;lt;http://dbpedia.org/resource/Category:Databases&amp;gt; ;
    foaf:topic_interest &amp;lt;http://dbpedia.org/resource/MacBook_Pro&amp;gt; ;
    rdfs:isDefinedBy &amp;lt;http://richard.cyganiak.de/foaf.rdf&amp;gt; ;
    rdf:seeAlso &amp;lt;&amp;gt; .
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Note that &lt;code&gt;rdfs:isDefinedBy&lt;/code&gt; does not necessarily point to the data you get when you retrieve the resource, but to an (presumably there can be more than one) authoritative description of the resource. It&amp;#8217;s also associated with a particular &lt;em&gt;resource&lt;/em&gt; rather than a particular &lt;em&gt;statement&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;To know which metadata applies to a particular statement, an application must know where it got the statement from. In effect, a statement here has &lt;em&gt;four&lt;/em&gt; parts: subject, property, object and location (with the possibility that multiple statements with the same subject, property and object might have different locations and therefore different metadata). This is similar to assigning an ID to a statement, as with &lt;code&gt;rdf:ID&lt;/code&gt;, but restricts the statement&amp;#8217;s identifier to being the location where it was found.&lt;/p&gt;

&lt;p&gt;So what does that mean for the genealogical web app? Well, in the app we&amp;#8217;re going to find any given statement by a particular user quoted on lots of pages. I was intending to RDFa them all but that would mean lots of duplicate statements from different locations, potentially bloating applications that were harvesting the data.&lt;/p&gt;

&lt;p&gt;I can&amp;#8217;t work out whether I like or loathe the Linked Data concept of associating metadata with the document in which you find triples. In some ways it seems very natural &amp;#8212; look for information about a resource at the URI for the resouce &amp;#8212; but the metadata mechanisms restrict where you can place statements on the web (or at least assign semantics to their location which aren&amp;#8217;t necessarily intended), and that seems like a Bad Thing. On the other hand, perhaps I&amp;#8217;m just being overly influenced by the desire to use RDFa, which does lead one to want to mark up data wherever it appears.&lt;/p&gt;

&lt;p&gt;I&amp;#8217;d welcome any advice.&lt;/p&gt;
</description>
 <comments>http://www.jenitennison.com/blog/node/85#comments</comments>
 <category domain="http://www.jenitennison.com/blog/taxonomy/term/34">genealogy</category>
 <category domain="http://www.jenitennison.com/blog/taxonomy/term/31">rdf</category>
 <pubDate>Fri, 11 Apr 2008 20:59:07 +0000</pubDate>
 <dc:creator>Jeni</dc:creator>
 <guid isPermaLink="false">85 at http://www.jenitennison.com/blog</guid>
</item>
<item>
 <title>Web 2.0 project: privacy in genealogy</title>
 <link>http://www.jenitennison.com/blog/node/69</link>
 <description>&lt;p&gt;There were a couple of comments on my previous post about &lt;a href=&quot;http://www.jenitennison.com/blog/node/67&quot; title=&quot;Jeni&#039;s Musings: Web 2.0 project: RDF and uncertainty&quot;&gt;RDF and uncertainty in our Web 2.0 genealogy project&lt;/a&gt; concerning the problems of privacy in a genealogy app. My ideas about this aren&amp;#8217;t fully thought-through, let alone implemented, but I thought I&amp;#8217;d share them anyway.&lt;/p&gt;

&lt;p&gt;First, the things we could restrict access to are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;sources of information (eg birth records)&lt;/li&gt;
&lt;li&gt;personas (eg Charles Darwin) and assertions about them&lt;/li&gt;
&lt;li&gt;events (eg the Beagle Voyage) and assertions about them&lt;/li&gt;
&lt;li&gt;groups (eg the Royal Society) and assertions about them&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There are different kinds of things you might do to the resources:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;who can know it &lt;em&gt;exists&lt;/em&gt;?&lt;/li&gt;
&lt;li&gt;who can &lt;em&gt;read&lt;/em&gt; it?&lt;/li&gt;
&lt;li&gt;who can &lt;em&gt;change&lt;/em&gt; it?&lt;/li&gt;
&lt;li&gt;who can &lt;em&gt;delete&lt;/em&gt; it?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;and different levels of access for each of those things:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;global (public)&lt;/li&gt;
&lt;li&gt;group (restricted)&lt;/li&gt;
&lt;li&gt;user (private)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I imagine that at any point, a user will have a default set of permissions in play. For example, they might be generating information that anyone can know exists and can read, but only a restricted set of people can change, and only the user themselves can delete.&lt;/p&gt;

&lt;h2&gt;Searchability&lt;/h2&gt;

&lt;p&gt;I&amp;#8217;m going to side-track for a second here to explain why I&amp;#8217;ve separated out &amp;#8220;knowing something exists&amp;#8221; from &amp;#8220;readable&amp;#8221;.&lt;/p&gt;

&lt;p&gt;Our genealogy application is evidence-based, which means that to say that someone exists you must have a source for that information, be it a birth certificate or a picture or the transcription of an interview. The &lt;em&gt;persona&lt;/em&gt; that you believe to exist on the basis of one source may or may not be the same persona that you believe to exist on the basis of a different source. A separate step is required to link the two personas together.&lt;/p&gt;

&lt;p&gt;The intention is that our application will help you link personas (and events, groups and anything else that might be quoted in more than one piece of evidence) together through searching through other personas (etc) to find those that are similar. They might have similar names, but most of the evidence for similarity will come from similar assertions having been made about them.&lt;/p&gt;

&lt;p&gt;Now say that I have some evidence about Charles Darwin and enter it into the system, and you similarly have some evidence about Charles Darwin that you enter into the system. We both create &amp;#8220;Charles Darwin&amp;#8221; personas based on our evidence. I&amp;#8217;d like it to be the case that, even if we don&amp;#8217;t want the information we&amp;#8217;ve captured about Charles Darwin to be readable by others, we can still make it searchable so that others can find out we&amp;#8217;re working on that person too so that (after some interpersonal negotiation) the two sets of information can be brought together.&lt;/p&gt;

&lt;p&gt;So the &amp;#8220;who can know it exists?&amp;#8221; access is about making your information searchable, even if the details aren&amp;#8217;t readable.&lt;/p&gt;

&lt;h2&gt;Default access&lt;/h2&gt;

&lt;p&gt;As I understand it, in genealogy circles it would be bad form to make any information about living people publicly available. Some would argue that any information that is currently publicly available (on the web, or even off it, in electoral rolls, phone books, wherever) is fair game: if it&amp;#8217;s already &amp;#8220;out there&amp;#8221; then you can use it. But I don&amp;#8217;t agree with that. There&amp;#8217;s a big difference between there being multiple disparate, human-readable sources of information about an individual &amp;#8220;out there somewhere&amp;#8221; and providing a single aggregated public source for all this data in a computer-readable format. In short, I agree with Jeff &amp;#8220;Coding Horror&amp;#8221; Atwood&amp;#8217;s recent post on privacy in which he characterises &lt;a href=&quot;http://www.codinghorror.com/blog/archives/001027.html&quot; title=&quot;Coding Horror: An Inalienable Right to Privacy&quot;&gt;privacy as an inalienable right&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Also, some people make money from doing genealogical research, and it would be short-sighted to prevent people from using the application if they simply wanted to keep what they were doing private for their own reasons.&lt;/p&gt;

&lt;p&gt;So there must be a setting such that information can be kept entirely private, to the extent that only the person who constructed it knows that it exists.&lt;/p&gt;

&lt;p&gt;On the other hand, many of the benefits of Web 2.0 applications come from integrating your own material with other people&amp;#8217;s. Genealogy is a good example of this, because there&amp;#8217;s a distinct thrill in hooking into other people&amp;#8217;s research and discovering other branches of the family.&lt;/p&gt;

&lt;p&gt;So there must be a setting such that information can be made globally available to all and sundry, even to the extent of others changing and deleting it.&lt;/p&gt;

&lt;p&gt;I think the default has to be that the information you enter is completely private. I&amp;#8217;d like to encourage people to share their information, but I think that the way to do that is through social mechanisms (eg the more useful information you share, the more kudos you get) rather than technological ones.&lt;/p&gt;

&lt;h2&gt;User Groups&lt;/h2&gt;

&lt;p&gt;Public and private access aside, there&amp;#8217;s a huge middle ground of access that&amp;#8217;s somehow restricted to a subset of users. I don&amp;#8217;t think I&amp;#8217;m being particularly radical if I say that the current state of the art of social software access control isn&amp;#8217;t great, that the &amp;#8220;restricted&amp;#8221; subset is usually to &amp;#8220;my friends&amp;#8221;, but people don&amp;#8217;t have one social circle: they operate in different spheres, and have a different set of friends/colleagues in each.&lt;/p&gt;

&lt;p&gt;The same is true in our genealogy app. A given user might be working (collaboratively) on several projects, with different teams. For example, I might work on a family tree with my mother for her side of the family and my father for his, with no need for either of them to be aware of the other (unless they overlap, in which case &amp;#8220;searchability&amp;#8221; comes into play).&lt;/p&gt;

&lt;p&gt;So I think it makes sense to use the familiar notion from *nix of &amp;#8220;user groups&amp;#8221;, and assign each item (sources/people/events/groups) to one or more user groups. User groups will probably mostly arise from those working on particular projects, but could be more arbitrary. I&amp;#8217;m thinking:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;moderated (by-invitation) and open (by-subscription) user groups&lt;/li&gt;
&lt;li&gt;private, public and restricted permissions on the user groups&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The other thing I was considering here was having a notion of &amp;#8220;degrees of separation&amp;#8221;. If I entered details about our daughters into a family tree, I might be happy for immediate family, and their immediate family, to see them: a separation of two. I don&amp;#8217;t know whether this kind of network-based user group would be useful or a pain to manage, or even implementable; it&amp;#8217;s just an idea I had.&lt;/p&gt;
</description>
 <comments>http://www.jenitennison.com/blog/node/69#comments</comments>
 <category domain="http://www.jenitennison.com/blog/taxonomy/term/34">genealogy</category>
 <category domain="http://www.jenitennison.com/blog/taxonomy/term/12">web</category>
 <pubDate>Thu, 17 Jan 2008 21:48:58 +0000</pubDate>
 <dc:creator>Jeni</dc:creator>
 <guid isPermaLink="false">69 at http://www.jenitennison.com/blog</guid>
</item>
<item>
 <title>Web 2.0 project: RDF and uncertainty</title>
 <link>http://www.jenitennison.com/blog/node/67</link>
 <description>&lt;p&gt;I&amp;#8217;ve been thinking a bit recently about how to deal with certainty in our Genealogical Web 2.0 application. We&amp;#8217;ve come round to using an RDF model to represent what the Gentech data model calls &amp;#8220;assertions&amp;#8221;; assertions such as &amp;#8220;Charles Darwin was a passenger on the Beagle Voyage&amp;#8221; are represented as an RDF Statement in which (a resource representing) &amp;#8220;Charles Darwin&amp;#8221; is the subject, (a resource representing) &amp;#8220;Beagle Voyage&amp;#8221; is the object, and &amp;#8220;was a passenger on&amp;#8221; is the predicate/property.&lt;/p&gt;

&lt;p&gt;All the statements in the genealogical application should be based on some source of information, either an external piece of evidence (such as a marriage certificate) or by combining existing statements. Either way, there&amp;#8217;s certain metadata that we want to store about it, such as&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;who created the statement&lt;/li&gt;
&lt;li&gt;when it was made&lt;/li&gt;
&lt;li&gt;the date(s) when the statement was true&lt;/li&gt;
&lt;li&gt;the certainty in the statement&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The certainty factor is interesting. For statements based directly on evidence, there are three factors that come into play:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the reliability of the evidence itself; for example, a marriage certificate is more reliable than a diary entry for a wedding&lt;/li&gt;
&lt;li&gt;the certainty the user has in drawing their conclusion based on the evidence; for example,  you would be more certain in the statement that the groom named on a marriage certificate is a man than in the statement that the witness named on a marriage certificate is a friend of the groom&lt;/li&gt;
&lt;li&gt;the reliability of the user who has made the statement: an expert in family history is likely to draw more accurate conclusions than someone who has only just started&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So now the question is how to assess these factors. The usual Web 2.0 method is to use ratings. We could get users to rate each other to provide the third score. We could then get users to rate the reliability of particular pieces of evidence, modify that score based on the users&amp;#8217; reliability, and aggregate those scores.&lt;/p&gt;

&lt;p&gt;The final certainty of the statement would be a combination of this score for evidence reliability and ratings from multiple users, again weighted according to the users&amp;#8217; reliability.&lt;/p&gt;
</description>
 <comments>http://www.jenitennison.com/blog/node/67#comments</comments>
 <category domain="http://www.jenitennison.com/blog/taxonomy/term/34">genealogy</category>
 <category domain="http://www.jenitennison.com/blog/taxonomy/term/31">rdf</category>
 <pubDate>Fri, 21 Dec 2007 22:03:51 +0000</pubDate>
 <dc:creator>Jeni</dc:creator>
 <guid isPermaLink="false">67 at http://www.jenitennison.com/blog</guid>
</item>
</channel>
</rss>

