[foaf-dev] beyond foaf:mbox_sha1sum

Mischa Tuffield mischa.tuffield at garlik.com
Tue Dec 22 22:43:07 CET 2009

Hi Henry, 

On 22 Dec 2009, at 19:52, Story Henry wrote:

> On 22 Dec 2009, at 19:30, Mischa Tuffield wrote:
>> Re: Your foaf file, if you would be so kind you could add an IFP to the bnode with foaf:name "Mischa...". You could add a _:bnodeX foaf:homepage <http://mmt.me.uk/> :) Thanks Henry :)
> why? I have your webid:
>   <Person rdf:about="http://mmt.me.uk/foaf.rdf#mischa">
>        <name>Mischa Tuffield</name>
>    </Person>

Mmm, a bug in my code it seems :( Nice one Henry, will fix it soon. It looks like the following query is not being returned correctly. 

                $query="PREFIX foaf: <http://xmlns.com/foaf/0.1/>
                        SELECT DISTINCT ?name ?mbox ?sha1 ?homepage ?openid ?aim ?icq ?msn ?yahoo ?web ?jab WHERE {
                           <".$this->getPrimaryTopic()."> foaf:knows ?obj .
                           ?obj rdf:type foaf:Person .
                           ?obj foaf:name ?name.
                           ?obj ?pred ?x .
                                OPTIONAL { ?obj  foaf:mbox_sha1sum ?sha1} .
                                OPTIONAL { ?obj  foaf:mbox ?mbox } .
                                OPTIONAL { ?obj  foaf:homepage ?homepage } .
                                OPTIONAL { ?obj  foaf:openid ?openid} .
                                OPTIONAL { ?obj  foaf:aimChatID ?aim } .
                                OPTIONAL { ?obj  foaf:jabberID ?jab } .
                                OPTIONAL { ?obj  foaf:icqChatID ?icq } .                
                                 OPTIONAL { ?obj  foaf:msnChatID ?msn } .
                                OPTIONAL { ?obj  foaf:yahooChatID ?yahoo } .
                                OPTIONAL { ?obj  foaf:weblog ?web } .    
                    FILTER(isBlank(?obj)) }";

Am guessing the FILTER is not working properly, will report back, and yay to finding a bug.

>>> Some things I noticed doing this:
>>> - the foaf spec has two properties for
>>> http://xmlns.com/foaf/spec/#term_OnlineAccount
>>>  "May have properties: holds account holds account"
>>> - Test 3: Checking if PrimaryTopic is a foaf:Person:
>>>   Success. Your PrimaryTopic is a foaf:Person
>>> should that be foaf:primaryTopic?
>>> I suppose that is because the document is a PersonalProfileDocument. Normal foaf:Documents don't have that restriction.
>>> If this is a foaf:PersonalProfileDocument, then I think it follows that the primary topic is a foaf:Person. So perhaps the thing to check would be if it follows from what is said in the doc, that it is not. (now that would be a bit of owl reasoning, but it should be ok, as you are limiting it to small documents)
>> The primaryTopic test is to check which subject URI or bnode for that matter is the "main" foaf:Person in the foaf file. This is due to the fact that I generally wouldn't trust statements made in a foaf:PersonProfileDocument that aren't directly associated with the primaryTopic. Basically, if there is a foaf:Document, with loads of foaf:Persons which one is the "main" person in this document.
> by the way on that topic I forgot to mention that I find it odd that the foaf:primaryTopic of a foaf:PersonalProfile document has to be the foaf:maker of the doc, as the spec currently suggests. If the government make a file for me, and I am the foaf:primaryTopic, then I would think of that as a personal profile, but one published by the government.... 
>>> - Test 10: Checking if foaf:mbox_sha1sum have language tags
>>> ??? sha1_sums with language tags ???
>> Yeah crazy right? I found that this is way a rather common mistake, insofar as people adding languages tags to the root of their RDF/XML document, which in turn meant that the foaf:mbox_sha1sum's where rendered useless.
> Oh, I see.... would not have thought of that.

I would never have thought that people would have used foaf:homepage to point to their browser's homepage. 

Mischa *just back from dinner, will investigate the validator bug on the moro ...

>> [snip]
>> Re: OWL, with my foaf.qdos.com hat on we do all of our "OWL based reasoning" at query time, we hope to have a larger KB full of foaf at some point in the future, and thought that we would end up generating far too many triples if we did created them at import time.
> Well there I completely agree. One should separate the graphs of what one receives and the graphs of inferences. And yes, doing the inferences on small sub parts of the total is probably the only way to go. After all, the people writing the information did not have access to the total knowledge either, so the most likely piece that one can ask them to be consistent on is the piece they published, using the meaning of the vocabularies they used. 
> Henry

Mischa Tuffield
Email: mischa.tuffield at garlik.com
Homepage - http://mmt.me.uk/
Garlik Limited, 2 Sheen Road, Richmond, TW9 1AE, UK
+44(0)20 8973 2465  http://www.garlik.com/
Registered in England and Wales 535 7233 VAT # 849 0517 11
Registered office: Thames House, Portsmouth Road, Esher, Surrey, KT10 9AD

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.foaf-project.org/pipermail/foaf-dev/attachments/20091222/bd956287/attachment-0001.htm 

More information about the foaf-dev mailing list