3 posts tagged “foaf”
I've developed a bit of Perl code (and TT2 templates) to take a GEDCOM file and output some FOAF (RDF/XML). This directory contains the result of that effort. Files named FXXX.xml are for families and IXXXX.xml files are for individuals.
With some consultation from Dan Brickley, I think i have a pretty decent start to the conversion. For families, I've define a foaf:Group and outlined its members. Then i give the hint of an alternate location for foaf data on each individual.
<foaf:Group rdf:about="http://www.alternation.net/ged2foaf/F001.xml#F001">
<foaf:member rdf:resource="http://www.alternation.net/ged2foaf/I0071.xml#I0071"/>
<foaf:member rdf:resource="http://www.alternation.net/ged2foaf/I0052.xml#I0052"/>
</foaf:Group>
<foaf:Person rdf:about="http://www.alternation.net/ged2foaf/I0071.xml#I0071">
<rdfs:seeAlso rdf:resource="http://www.alternation.net/ged2foaf/I0071.xml"/>
</foaf:Person>
In each person's file, I've put as much data as i can on that person, defined their relationships, and indicated which families they belong to. For each relative, i've defined "seeAlso"s as in the family files.
The trick is trying to define as much data as i need in each file without having too much duplication.
The RDF is all valid, so the next step is to try and scutter the directory and see what i can do with it. Anyone ever used Redland before? Though, Class::RDF seems neat.
I've only mentioned it once before, but I'm working on exporting FOAF from Gedcom. I hadn't touched it in a while, but I've recently revisited it.
The current implementation "works" (e.g. HTML View, FOAF View), however it fails to split things up along family unit lines (i.e. what children are associated with which spouse and which family, exactly, was this person a part of as a child).
Example:
Person X
--------
FAM 1 (C)
---------
Parent A
Parent B
FAM 2 (S)
---------
Spouse 1
Child 1
Child 2
Child 3
FAM 3 (S)
---------
Spouse 2
Child 4
FAM 4 (S)
---------
Spouse 3
FAM 5 (S)
---------
Spouse 4
Child 5
Child 6
The above example shows that Person X is part of 5 families. 4 as a spouse and one as a child. You can also see, specifically, that Children 1-3 were with Spouse 1 (hence a family unit).
It's important to note that each person and family unit is given a unique ID.
I was hoping to use foaf:Group to associate each person with their respective families, though I'm not exactly sure how.
You might have noticed that I've omitted any siblings of Person X in the above example. That may cause a problem due to the fact that the foaf:Group in which Person X is a child would be split over multiple files.
If foaf:Group had an inverse (see wiki entry) then i might be able to just say that Person X is a memberOf families 1, 2, 3, 4 and 5 and aggregate those files, focussing on Person X's relationships. Though i don't see a way to show relationships between people in groups.
Ideas anyone?
I've added a new feature to the Gedcom app. Each user's data can be exported as a FOAF (RDF/XML) file.
There isn't much in the way of user data exported (yet), but the neat part is the relationship vocab used. Eric has put together a small, but useful set of terms detailing relationships. This allows me to enhance foaf:Knows to show that person X is the parent of person Y, etc.
My hope is to use the foafnaut source to create neat interactive family-tree diagrams.