Archive for the ‘FOAF’ Category

Personas @ MIT

Tuesday, August 25th, 2009

So, MIT has recently put out a service which via animating some pretty colours presents a user with a pictorial description of their “online persona”. The service is called Personas, and my persona can be found below. I like the thought of being aware of your digital persona, due to my interest in the topic during my PhD studies, my involvement in the Memories for Life network, and my current role work at Garlik, I give lots of thought to what it means to capture a snap shot of a someones digital persona or to even attempt to capture it in its entirety. I guess this could have implications to the way we are force fed online advertising, through to the thought of one day having a digital nomenclature, which feeds information about everyone you encounter, letting you judge for yourself…

Anyways, so I typed in my first and last name into the Personas site, and low and behold, this is result I was shown :

Mischa Tuffield's MIT Personas 24/08/09

Mischa Tuffield's MIT Personas 240809

Apparently, the three most prominent of my online characteristics are : “online, sports, illegal”. Hehe, I guess the online bit makes some sense, and after scratching my head, and re-running the service I think I have sussed it :

  • Online: yeah well …
  • Sports: I must be due to this article I was mentioned in in the Telegraph. It was a feature in a technology section, which a part of motoring technology supplement. So, I guess that makes some sense
  • Illegal: Well this one puzzled me for a while, but I think the people at MIT think I am a identity thief, hehe…

Which would definitely not be a good thing given that I am currently working trying to help people defend themselves from ID Fraud. So why, does Personas come to this conclusion? I think it is down to a blog post which a friend of mine Tom Heath wrote a while back, where you used the following words “was trying to steal my identity (presumably because he had a fragment of RDF about me in his FOAF file)”. This is a perfect example of how natural language processing can fail, and how much more sophisticated metrics must be used if we are to identify accusations, opinions, or any more complex statements from free text. Tom’s blog post was actually going on about how Google’s Social Graph API failed to understand his FOAF file, merging myself and Tom into one person, another technological fail, but I guess they follow on nicely from each other…

I should note that Google’s SocialGraph API is doing a better job than when it started, and as far as I am aware it now understands RDF natively, via libraptor.

Firefox 3.5 and W3C Geo API

Wednesday, July 8th, 2009

I have made a simple webpage which makes use of the W3C Geo API. The page will prompt you for your location, given you are using FF3.5, and will subsequently ask you for a WebID and some text to describe what you are up to.

The service then generates a call to another endpoint I bashed together, that takes the following cgi arguements.

webid - lat - long with an OPTIONAL alt - datetime - doing(what I am doing now field)

e.g.,

http://mmt.me.uk/services/FOAFEvent?lat=51.4583494&long=-0.1186444&webid=http://foo.com/foaf.rdf%23bar&datetime=2009-07-08T13:02:46+01:00&doing=writing+a+blog+article


That in turn generates a FOAF person scrobble, or a FOAF Event. I have made us of the Event, Timeline, FOAF, dc, and the Geo ontologies.

So this service can be found on my site, http://mmt.me.uk/geo. It should be noted that I DO NOT store any of the information which I output on this site. I will make it HTTPS at some point, and then I will replace using Plazes.com with my own service. I would rather a world where I was running all of my own social networking from my own machine.

The code to do this is so simple. In order to do the W3C geo stuff all you need to do is write some html and javascript, like so (sorry about the indentation)

<script src="http://maps.google.com/maps?file=api&v=2&key=YOUR_API_KEY_HERE" type="text/javascript"></script>
<script type="text/javascript">
function load() {
navigator.geolocation.getCurrentPosition(showMap);
}
function showMap(position.coords) {
// (position.coords.latitude, position.coords.longitude).
if (GBrowserIsCompatible()) {
var map = new GMap2(document.getElementById("map"));
map.setCenter(new GLatLng(position.coords.latitude, position.coords.longitude), 13);
var point = new GLatLng(position.coords.latitude, position.coords.longitude);
map.addOverlay(new GMarker(point));
}
}
</script>
<div id="map" style="width: 620px; height: 310px"></div>

and this :

<body onload="load()" onunload="GUnload()">

Here are a bunch of links which I used to find out how to do this :

Enabling Trust in a FOAF Document

Wednesday, July 8th, 2009

This blog post follows on from my previous one signing and verifying files with GnuPG, whereby I showed (he says), in its simplest form, how one can digitally sign and verify a document. This in turn allows anyone reading the document to verify whether or not it has been tampered with since it was signed.

In this post I will describe two methods of linking to a digital signature from a RDF document. The RDF document I will be describing in this post is a FOAF document, but is is needless to say that this approach can be used from any RDF file.

The method described below makes use of the Web of Trust ontology (WOT). WOT allows for RDF documents to be signed using Digital Signatures and Public Key Cryptography.

Whilst putting together the foaf validator, which checks the semantics of a RDF document to ensure that it is a well formed foaf:PersonalProfileDocument, I came across these two different methods of using the Web of Trust ontology.

Linking to an armored digital signature using the WOT ontology from your FOAF file:

Step 0: Declare the wot namespace in the FOAF file



@prefix wot: <http://xmlns.com/wot/0.1/> .

Step 1

Add a triple from the Document pointing to the digital signature like so:



<> wot:assurance <http://foo.com/foaf.rdf.asc> .

Step 2

Add a triples associating the public key used to sign the FOAF document to the FOAF person. This can be done in one of two ways, like so:

Style 1



_:bnode0 a <http://xmlns.com/wot/0.1/PubKey> .
_:bnode0 dc:title "Public Key Bnode" .
_:bnode0 wot:fingerprint "FW89F7WF78SD8F7SD7FG21JL213192" .
_:bnode0 wot:hex_id "12A75E9B" .
_:bnode0 wot:identity <#me> .
_:bnode0 wot:pubkeyAddress <http://foo.com/me.pubkey.asc>

This is how I sign my FOAF file

Style 2



<#me> wot:hasKey _:bnode0 .
_:bnode0 a <http://xmlns.com/wot/0.1/PubKey> .
_:bnode0 wot:pubkeyAddress <http://foo.com/me.pubkey.asc>
_:bnode0 dc:title "Public Key Bnode" .
_:bnode0 wot:fingerprint "FW89F7WF78SD8F7SD7FG21JL213192" .
_:bnode0 wot:hex_id "12A75E9B" .

This is how Kjetil signs his FOAF file

These two methods of associating a publicKey to a FOAF WebID, which is in turn can be used to digitally sign a FOAF file are both supported by Garlik's FOAF validator.

Enabling a Writable WebID with WebDAV

Wednesday, July 8th, 2009

In this post I will describe how you can enable write access to a file, specially a RDF one, via Apache’s HTTP server and the Web Distributed Authoring and Versioning protocol (WebDAV) extension to the HTTP protocol.

So, why would you want to do this?

I use WebDAV on my FOAF file to enable write access via Tim Berners-Lee’s Tabulator and Garlik’s foafbuilder. This technology allows me to write updates straight through the HTTP protocol, so that I don’t have to save the file to my local machine, and scp it over.

These are the configuration settings needed in your httpd.conf file:

Setting up WebDAV on a whole directory:



<VirtualHost *:80>

ServerName www.foo.com

ServerAlias foo.com

Alias / /var/www/foo/public_html/

<Location />

DAV On

AuthType Basic

AuthName "webdav"

Header set MS-Author-Via DAV

AuthUserFile /var/www/foo/passwd.dav

<LimitExcept GET HEAD OPTIONS POST>

Require user bar

</LimitExcept>

</Location>

</VirtualHost>

Enabling WebDAV for all files ending in .rdf:



<VirtualHost *:80>

ServerName www.foo.com

ServerAlias foo.com

Alias / /var/www/foo/public_html/

<Files ~ ".*\.rdf">

DAV On

AuthType Basic

AuthName "webdav"

AuthUserFile /var/www/foo/passwd.dav

Header set MS-Author-Via DAV

ForceType application/rdf+xml

<LimitExcept GET HEAD OPTIONS POST>

Require user bar

</LimitExcept>

</Files>

</VirtualHost>

It should be noted that the methods presented above allow for the files to be read normally via HTTP, as well as catering for writing via WebDAV.

WebDAV related HTTP Headers:

The correct HTTP header used to tell a client that a file is WebDAV enabled is:

MS-Author-via: DAV

Some of this information was taken from the ESW wiki’s article “EditingData”, and I should thank everyone who helped put it together.

Making FOAF useful ?

Wednesday, July 8th, 2009

FOAF files in isolation only give you information about a person, and who they know – i.e. who they claim to know in their FOAF file.

At Garlik we have implemented a reverse search facility for FOAF, whereby given an API request one can get back triples containing a list of people who claim to know the FOAF URI/IFP used to generate the API request. This list of people is taken from our knowledge base of harvested FOAF files, which currently holds around 10 millions individual FOAF files.

By including an API request to our reverse search in your FOAF file, you can have a FOAF file with both links out and links in :) Wow (he says)…

This API call – http://foaf.qdos.com/reverse/?path=http://mmt.me.uk/foaf.rdf%23mischa – returns an RDF fragment listing foaf:People that claim to know me.

All you need to do is add one triple that requests RDF from our reverse search API to your FOAF file. The triple will look something like this:

<#me> rdfs:seeAlso <http://foaf.qdos.com/reverse/?path=http://foo.com/foaf.rdf%23me> .

You can find examples of this API call in Danbri’s, Steve Harris’s, and my FOAF files.

There is some information regarding how to use the API on the reverse search HTML page.