FoafTemplate

From FOAF

Jump to: navigation, search

Here is a sample FOAF file, just made in foaf-a-matic... Let's try to tweak it a bit.

<rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
      xmlns:foaf="http://xmlns.com/foaf/0.1/">
<foaf:Person>
<foaf:name>Dan Brickley</foaf:name>
<foaf:title>Mr</foaf:title>
<foaf:firstName>Dan</foaf:firstName>
<foaf:surname>Brickley</foaf:surname>
<foaf:nick>danbri</foaf:nick>
<foaf:mbox_sha1sum>362ce75324396f0aa2d3e5f1246f40bf3bb44401</foaf:mbox_sha1sum>
<foaf:homepage rdf:resource="http://rdfweb.org/people/danbri/"/>
<foaf:depiction rdf:resource="http://rdfweb.org/people/danbri/mugshot/danbri-small.jpeg"/>
<foaf:workplaceHomepage rdf:resource="http://www.w3.org/"/>
<foaf:workInfoHomepage rdf:resource="http://www.w3.org/People/DanBri/"/>
<foaf:schoolHomepage rdf:resource="http://www.vandh.free-online.co.uk/wgate/westgate.htm"/>
<foaf:knows>
<foaf:Person>
<foaf:name>Libby Miller</foaf:name>
<foaf:mbox_sha1sum>289d4d44325d0b0218edc856c8c3904fa3fd2875</foaf:mbox_sha1sum>
<rdfs:seeAlso rdf:resource="http://swordfish.rdfweb.org/people/libby/rdfweb/webwho.xrdf"/></foaf:Person></foaf:knows></foaf:Person>
</rdf:RDF>


Some tweaks. First losing the firstName / surname bit. Then adding a document type, so we know it is a personal foaf profile, rather than some random RDF file that happens to use FOAF.

<rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
      xmlns:foaf="http://xmlns.com/foaf/0.1/">

<foaf:Person rdf:nodeID="me">
  <foaf:name>Dan Brickley</foaf:name>
  <foaf:title>Mr</foaf:title>
  <foaf:nick>danbri</foaf:nick>
  <foaf:mbox_sha1sum>362ce75324396f0aa2d3e5f1246f40bf3bb44401</foaf:mbox_sha1sum>


  <!-- some example properties which reference a page -->
  <foaf:homepage rdf:resource="http://rdfweb.org/people/danbri/"/>
  <foaf:depiction rdf:resource="http://rdfweb.org/people/danbri/mugshot/danbri-small.jpeg"/>
  <foaf:workplaceHomepage rdf:resource="http://www.w3.org/"/>
  <foaf:workInfoHomepage rdf:resource="http://www.w3.org/People/DanBri/"/>
  <foaf:schoolHomepage rdf:resource="http://www.vandh.free-online.co.uk/wgate/westgate.htm"/>

  <!-- this is how we list people we know... -->
  <foaf:knows>
    <foaf:Person>
      <foaf:name>Libby Miller</foaf:name>
      <foaf:mbox_sha1sum>289d4d44325d0b0218edc856c8c3904fa3fd2875</foaf:mbox_sha1sum>
      <rdfs:seeAlso rdf:resource="http://swordfish.rdfweb.org/people/libby/rdfweb/webwho.xrdf"/>
    </foaf:Person>
  </foaf:knows>
</foaf:Person>

<foaf:PersonalProfileDocument rdf:about="">
  <foaf:maker rdf:nodeID="me"/> <!-- saying: I made this -->
  <foaf:primaryTopic rdf:nodeID="me"/> <!-- we could omit this -->
</foaf:PersonalProfileDocument>

</rdf:RDF>

Notes:

* Let's figure out the answer to the foaf name stuff asap
* foaf:primaryTopic rather than foaf:topic would make sense
* the maker of a PersonalProfileDocument is always its primary topic
* the primary topic of a PersonalProfileDocument is always its maker (even if via tools, services)