Copyright © 2000-2005 Dan Brickley and Libby Miller
This work is licensed under a Creative
Commons License. This copyright applies to the FOAF Vocabulary Specification and
accompanying documentation and does not apply to FOAF data formats,
vocabulary terms, or technology. Regarding underlying technology, FOAF relies heavily on W3C's RDF technology, an open Web standard
that can be freely used by anyone.
NOTE:This specification is an evolving document. The bulk of this document is now generated by combining the RDFS/OWL machine-readable FOAF ontology with a set of per-term documents. The remaining sections require serious attention; we are well aware that better examples and tighter intro text are needed. Rather than try to perfect things offline, we are switching over to the new spec as it brings a lot of new explanatory text into view.
Our editorial TODO list includes: fix table of contents, reorg intro text, add examples, fix CSS, find a strategy to allow XHTML validation while embedding RDF (currently document won't validate). The spec-management scripts should also be extended to generate an index of FOAF terms organised by status (ie. 'unstable','testing' or 'stable') as well as to expose OWL information about FOAF classes and properties, such as 'mutually disjoint' classes, 'inverse' properties, etc.
This section describes the status of this document at the time of its publication. Other documents may supersede this document.
This document is produced as part of the RDFWeb FOAF project, to provide authoritative documentation of the contents, status and purpose of the RDF/XML vocabulary and document formats known informally as 'FOAF'.
The authors welcome comments on this document. Please send comments on this document to the FOAF developers list rdfweb-dev@vapours.rdfweb.org; public archives are available. This document may be updated or added to based on implementation experience, but no commitment is made by the authors regarding future updates (todo: link to stability info re FOAF properties, also need to explain extensibility model).
This document contains embedded XML/RDF statements defining and describing the FOAF vocabulary.
An a-z index of FOAF terms, by class (categories or types) and by property.
Classes: | Agent | Document | Group | Image | OnlineAccount | OnlineChatAccount | OnlineEcommerceAccount | OnlineGamingAccount | Organization | Person | PersonalProfileDocument | Project |
Properties: | accountName | accountServiceHomepage | aimChatID | based_near | birthday | currentProject | depiction | depicts | dnaChecksum | family_name | firstName | fundedBy | geekcode | gender | givenname | holdsAccount | homepage | icqChatID | img | interest | isPrimaryTopicOf | jabberID | knows | logo | made | maker | mbox | mbox_sha1sum | member | membershipClass | msnChatID | myersBriggs | name | nick | page | pastProject | phone | plan | primaryTopic | publications | schoolHomepage | sha1 | surname | theme | thumbnail | tipjar | title | topic | topic_interest | weblog | workInfoHomepage | workplaceHomepage | yahooChatID |
FOAF terms, grouped in broad categories.
The FOAF project is based around the use of machine readable Web homepages for people, groups, companies and other kinds of thing. To achieve this we use the "FOAF vocabulary" to provide a collection of basic terms that can be used in these Web pages. At the heart of the FOAF project is a set of definitions designed to serve as a dictionary of terms that can be used to express claims about the world. The initial focus of FOAF has been on the description of people, since people are the things that link together most of the other kinds of things we describe in the Web: they make documents, attend meetings, are depicted in photos, and so on.
The FOAF Vocabulary definitions presented here are written using a computer language (RDF/OWL) that makes it easy for software to process some basic facts about the terms in the FOAF vocabulary, and consequently about the things described in FOAF documents. A FOAF document, unlike a traditional Web page, can be combined with other FOAF documents to create a unified database of information.
Here is a very basic document describing a person:
<foaf:Person> <foaf:name>Dan Brickley</foaf:name> <foaf:mbox_sha1sum>241021fb0e6289f92815fc210f9e9137262c252e</foaf:mbox_sha1sum> <foaf:homepage rdf:resource="rdfweb.org/people/danbri/" /> <foaf:img rdf:resource="rdfweb.org/people/danbri/mugshot/danbri-small.jpeg" /> </foaf:Person>
This brief example introduces the basics of FOAF. It basically says, "there is a foaf:Person with a foaf:name property of 'Dan Brickley' and a foaf:mbox_sha1sum property of 241021fb0e6289f92815fc210f9e9137262c252e; this person stands in a foaf:homepage relationship to a thing called rdfweb.org/people/danbri/ and a foaf:img relationship to a thing called rdfweb.org/people/danbri/mugshot/danbri-small.jpeg.
The basic idea is pretty simple. If people publish information in the FOAF document format, machines will be able to make use of that information. If those files contain "see also" references to other such documents in the Web, we will have a machine-friendly version of today's hypertext Web. Computer programs will be able to scutter around a Web of documents designed for machines rather than humans, storing the information they find, keeping a list of "see also" pointers to other documents, checking digital signatures (for the security minded) and building Web pages and question-answering services based on the harvested documents.
So, what is the 'FOAF document format'? FOAF files are just text documents (well, Unicode
documents). They are written in XML syntax, and adopt the conventions of the Resource
Description Framework (RDF). In addition, the FOAF vocabulary defines some useful
constructs that can appear in FOAF files, alongside other RDF vocabularies defined
elsewhere. For example, FOAF defines categories ('classes') such as
foaf:Person
, foaf:Document
, foaf:Image
,
alongside some handy properties of those things, such as foaf:name
,
foaf:mbox
(ie. an internet mailbox), foaf:homepage
etc., as well
as some useful kinds of relationship that hold between members of these categories. For
example, one interesting relationship type is
foaf:depiction
. This relates something (eg. a foaf:Person
) to a
foaf:Image
. The FOAF demos that feature photos and listings of 'who is in
which picture' are based on software tools that parse RDF documents and make use of these
properties.
The specific contents of the FOAF vocabulary are detailed in this FOAF namespace document. In addition to the FOAF vocabulary, one of the most interesting features of a FOAF file is that it can contain "see Also" pointers to other FOAF files. This provides a basis for automatic harvesting tools to traverse a Web of interlinked files, and learn about new people, documents, services, data...
The remainder of this specification describes how to publish and interpret descriptions such as these on the Web, using RDF/XML for syntax (file format) and terms from FOAF. It introduces a number of categories (RDF classes such as 'Person') and properties (relationship and attribute types such as 'mbox' or 'workplaceHomepage'). Each term definition is provided in both human and machine-readable form, hyperlinked for quick reference.
For a good general introduction to FOAF, see Edd Dumbill's article, XML Watch: Finding friends with XML and RDF (June 2002, IBM developerWorks). Information about the use of FOAF with image metadata is also available.
The co-depiction experiment shows a fun use of the vocabulary. Jim Ley's SVG image annotation tool show the use of FOAF with detailed image metadata, and provide tools for labelling image regions within a Web browser. To create a FOAF document, you can use Leigh Dodd's FOAF-a-matic javascript tool. To query a FOAF dataset via IRC, you can use Edd Dumbill's FOAFbot tool, an IRC 'community support agent'. For more information on FOAF and related projects, see the FOAF project home page at rdfweb.org.
FOAF is managed as a collaborative effort amongst Semantic Web developers on the FOAF (rdfweb-dev@vapours.rdfweb.org) mailing list. The name 'FOAF' is derived from traditional internet usage, an acronym for 'Friend of a Friend'.
The name was chosen to reflect our concern with social networks and the Web, urban myths, trust and connections. Other uses of the name continue, notably in the documentation and investigation of Urban Legends (eg. see the alt.folklore.urban archive or snopes.com), and other FOAF stories. Our use of the name 'FOAF' for a Web vocabulary and document format is intended to complement, rather than replace, these prior uses. FOAF documents describe the characteristics and relationships amongst friends of friends, and their friends, and the stories they tell.
It is important to understand that the FOAF vocabulary as specified in this document is not a standard in the sense of ISO Standardisation, or that associated with W3C Process.
FOAF depends heavily on W3C's standards work, specifically on XML, XML Namespaces, RDF, and OWL. All FOAF documents must be well-formed RDF/XML documents. The FOAF vocabulary, by contrast, is managed more in the style of an Open Source or Free Software project than as an industry standardarisation effort (eg. see Jabber JEPs or Python ... re extensions).
This specification contributes a vocabulary, "FOAF", to the Semantic Web, specifying it using W3C's Resource Description Framework (RDF). As such, FOAF adopts by reference both a syntax (using XML) a data model (RDF graphs) and a mathematically grounded definition for the rules that underpin the FOAF design.
This specification serves as the FOAF "namespace document". As such it describes the FOAF vocabulary and the terms (RDF classes and properties) that constitute it, so that Semantic Web applications can use those terms in a variety of RDF-compatible document formats and applications.
This document presents FOAF as a Semantic Web vocabulary or Ontology. The FOAF vocabulary is pretty simple, pragmatic and designed to allow simultaneous deployment and extension. FOAF is intended for widescale use, but its authors make no commitments regarding its suitability for any particular purpose.
The FOAF vocabulary is identified by the namespace URI 'xmlns.com/foaf/0.1/
'.
Revisions and extensions of FOAF are conducted through edits to this document, which by convention is
published in the Web at the namespace URI. The evolution of FOAF is best considered in terms of
the stability of individual vocabulary terms, rather than the specification as a whole. As terms
stabilise in usage and documentation, they progress through the categories
'unstable', 'testing' and 'stable'.
The properties and types defined here provide some basic useful concepts for use in FOAF descriptions. Other vocabulary (eg. the Dublin Core metadata elements for simple bibliographic description), RSS 1.0 etc can also be mixed in with FOAF terms, as can local extensions. FOAF is designed to be extended. The FoafVocab page in the FOAF wiki lists a number of extension vocabularies that are particularly applicable to use with FOAF.
If you publish a FOAF self-description (eg. using
foaf-a-matic)
you can make it easier for tools to find your FOAF by putting markup in
the head
of your HTML homepage. It doesn't really matter
what filename you choose for your FOAF document, although
foaf.rdf
is a common choice. The linking markup is as
follows:
<link rel="meta" type="application/rdf+xml" title="FOAF"
class="example.com/people/~you/foaf.rdf" />
...although of course change the URL to point to your own FOAF document. See also: more on FOAF autodiscovery and services that make use of it.
Why does FOAF use RDF?
FOAF is an application of the Resource Description Framework (RDF) because the subject area we're describing -- people -- has so many competing requirements that a standalone format could not do them all justice. By using RDF, FOAF gains a powerful extensibility mechanism, allowing FOAF-based descriptions can be mixed with claims made in any other RDF vocabulary
People are the things that link together most of the other kinds of things we describe in the Web: they make documents, attend meetings, are depicted in photos, and so on. Consequently, there are many many things that we might want to say about people, not to mention these related objects (ie. documents, photos, meetings etc).
FOAF as a vocabulary cannot incorporate everything we might want to talk about that is related to people, or it would be as large as a full dictionary. Instead of covering all topics within FOAF itself, we buy into a larger framework - RDF - that allows us to take advantage of work elsewhere on more specific description vocabularies (eg. for geographical / mapping data).
RDF provides FOAF with a way to mix together different descriptive vocabularies in a consistent way. Vocabularies can be created by different communites and groups as appropriate and mixed together as required, without needing any centralised agreement on how terms from different vocabularies can be written down in XML.
This mixing happens in two ways: firstly, RDF provides an underlying
model of (typed) objects and their attributes or relationships.
foaf:Person
is an example of a type of object (a "class"),
while foaf:knows
and foaf:name
are examples of a relationship and an attribute
of an foaf:Person
; in RDF we call these
"properties". Any vocabulary described in RDF shares this basic
model, which is discernable in the syntax for RDF, and
which removes one level of confusion in understanding a given
vocabulary, making it simpler to comprehend and therefore reuse a
vocabulary that you have not written yourself. This is the minimal
self-documentation that RDF gives you.
Secondly, there are mechanisms for saying which RDF properties are
connected to which classes, and how different classes are related to each
other, using RDF Syntax and OWL. These can be quite general (all
RDF properties by default come from an
rdf:Resource
for example) or very specific and precise (for
example by using OWL
constructs, as in the foaf:Group
example below. This is
another form of self-documentation, which allows you to connect different
vocabularies together as you please. An example of this is given below
where the foaf:based_near
property has a domain and range
(types of class at each end of the property) from a different namespace
altogether.
In summary then, RDF is self-documenting in ways which enable the creation and combination of vocabularies in a devolved manner. This is particularly important for a vocabulary which describes people, since people connect to many other domains of interest, which it would be impossible (as well as suboptimal) for a single group to describe adequately in non-geological time.
RDF is usually written using XML syntax, but behaves in rather different ways to 'vanilla' XML: the same RDF can be written in many different ways in XML. This means that SAX and DOM XML parsers are not adequate to deal with RDF/XML. If you want to process the data, you will need to use one of the many RDF toolkits available, such as Jena (Java) or Redland (C). RDF Interest Group members can help with issues which may arise; there is also the rdfweb-dev@yapours.rdfweb.org mailing list which is the main list for FOAF, and two active and friendly IRC channels: #rdfig and #foaf on freenode.
FOAF introduces the following classes and properties. View this document's source markup to see the RDF/XML version.
See also: rdf schema signature and html doc signature (@@TODO).
Status: | unstable |
---|---|
in-range-of: | foaf:maker foaf:member |
in-domain-of: | foaf:mbox foaf:mbox_sha1sum foaf:gender foaf:jabberID foaf:aimChatID foaf:icqChatID foaf:yahooChatID foaf:msnChatID foaf:weblog foaf:tipjar foaf:made foaf:holdsAccount foaf:birthday |
The foaf:Agent
class is the class of agents; things that do stuff. A well
known sub-class is foaf:Person
, representing people. Other kinds of agents
include foaf:Organization
and foaf:Group
.
The foaf:Agent
class is useful in a few places in FOAF where
foaf:Person
would have been overly specific. For example, the IM chat ID
properties such as jabberID
are typically associated with people, but
sometimes belong to software bots.
[back to top]
Status: | testing |
---|---|
in-range-of: | foaf:homepage foaf:weblog foaf:tipjar foaf:workplaceHomepage foaf:workInfoHomepage foaf:schoolHomepage foaf:interest foaf:publications foaf:isPrimaryTopicOf foaf:page foaf:accountServiceHomepage |
in-domain-of: | foaf:sha1 foaf:topic foaf:primaryTopic |
The foaf:Document
class represents those things which are, broadly conceived,
'documents'.
The foaf:Image
class is a sub-class of foaf:Document
, since all images
are documents.
We do not (currently) distinguish precisely between physical and electronic documents, or
between copies of a work and the abstraction those copies embody. The relationship between
documents and their byte-stream representation needs clarification (see foaf:sha1
for related issues).
[back to top]
Status: | unstable |
---|---|
in-domain-of: | foaf:member |
The foaf:Group
class represents a collection of individual agents (and may
itself play the role of a foaf:Agent
, ie. something that can perform actions).
This concept is intentionally quite broad, covering informal and
ad-hoc groups, long-lived communities, organizational groups within a workplace, etc. Some
such groups may have associated characteristics which could be captured in RDF (perhaps a
foaf:homepage
, foaf:name
, mailing list etc.).
While a foaf:Group
has the characteristics of a foaf:Agent
, it
is also associated with a number of other foaf:Agent
s (typically people) who
constitute the foaf:Group
. FOAF provides a mechanism, the
foaf:membershipClass
property, which relates a foaf:Group
to a
sub-class of the class foaf:Agent
who are members of the group. This is a
little complicated, but allows us to make group membership rules explicit.
The markup (shown below) for defining a group is both complex and powerful. It
allows group membership rules to match against any RDF-describable characteristics of the potential
group members. As FOAF and similar vocabularies become more expressive in their ability to
describe individuals, the foaf:Group
mechanism for categorising them into
groups also becomes more powerful.
While the formal description of membership criteria for a foaf:Group
may
be complex, the basic mechanism for saying that someone is in a foaf:Group
is
very simple. We simply use a foaf:member
property of the
foaf:Group
to indicate the agents that are members of the group. For example:
<foaf:Group> <foaf:name>ILRT staff</foaf:name> <foaf:member> <foaf:Person> <foaf:name>Libby Miller</foaf:name> <foaf:homepage rdf:resource="ilrt.org/people/libby/"/> <foaf:workplaceHomepage rdf:resource="www.ilrt.bris.ac.uk/"/> </foaf:Person> </foaf:member> </foaf:Group>
Behind the scenes, further RDF statements can be used to express the rules for being a member of this group. End-users of FOAF need not pay attention to these details.
Here is an example. We define a foaf:Group
representing those people who
are ILRT staff members. The foaf:membershipClass
property connects the group (conceived of as a social
entity and agent in its own right) with the class definition for those people who
constitute it. In this case, the rule is that all group members are in the
ILRTStaffPerson class, which is in turn populated by all those things that are a
foaf:Person
and which have a foaf:workplaceHomepage
of
www.ilrt.bris.ac.uk/. This is typical: FOAF groups are created by
specifying a sub-class of foaf:Agent
(in fact usually this
will be a sub-class of foaf:Person
), and giving criteria
for which things fall in or out of the sub-class. For this, we use the
owl:onProperty
and owl:hasValue
properties,
indicating the property/value pairs which must be true of matching
agents.
<!-- here we see a FOAF group described. each foaf group may be associated with an OWL definition specifying the class of agents that constitute the group's membership --> <foaf:Group> <foaf:name>ILRT staff</foaf:name> <foaf:membershipClass> <owl:Class rdf:about="ilrt.example.com/groups#ILRTStaffPerson"> <rdfs:subClassOf rdf:resource="xmlns.com/foaf/0.1/Person"/> <rdfs:subClassOf> <owl:Restriction> <owl:onProperty rdf:resource="xmlns.com/foaf/0.1/workplaceHomepage"/> <owl:hasValue rdf:resource="www.ilrt.bris.ac.uk/"/> </owl:Restriction> </rdfs:subClassOf> </owl:Class> </foaf:membershipClass> </foaf:Group>
Note that while these example OWL rules for being in the eg:ILRTStaffPerson class are
based on a foaf:Person
having a particular
foaf:workplaceHomepage
, this places no obligations on the authors of actual
FOAF documents to include this information. If the information is included, then
generic OWL tools may infer that some person is an eg:ILRTStaffPerson. To go the extra
step and infer that some eg:ILRTStaffPerson is a foaf:member
of the group
whose foaf:name
is "ILRT staff", tools will need some knowledge of the way
FOAF deals with groups. In other words, generic OWL technology gets us most of the way,
but the full foaf:Group
machinery requires extra work for implimentors.
The current design names the relationship as pointing from the group, to the member. This is convenient when writing XML/RDF that encloses the members within markup that describes the group. Alternate representations of the same content are allowed in RDF, so you can write claims about the Person and the Group without having to nest either description inside the other. For (brief) example:
<foaf:Group> <foaf:member rdf:nodeID="libby"/> <!-- more about the group here --> </foaf:Group> <foaf:Person rdf:nodeID="libby"> <!-- more about libby here --> </foaf:Person>
There is a FOAF issue tracker (8) associated with this FOAF term. A design goal is to make the most of W3C's OWL language for representing group-membership criteria, while also making it easy to leverage existing groups and datasets available online (eg. buddylists, mailing list membership lists etc). Feedback on the current design is solicited!
[back to top]
Status: | testing |
---|---|
in-range-of: | foaf:img foaf:depiction foaf:thumbnail |
in-domain-of: | foaf:depicts foaf:thumbnail |
The class foaf:Image
is a sub-class of foaf:Document
corresponding to those documents which are images.
Digital images (such as JPEG, PNG, GIF bitmaps, SVG diagrams etc.) are examples of
foaf:Image
.
[back to top]
Status: | unstable |
---|---|
in-range-of: | foaf:holdsAccount |
in-domain-of: | foaf:accountServiceHomepage foaf:accountName |
A foaf:OnlineAccount
represents the provision of some form of online
service, by some party (indicated indirectly via a
foaf:accountServiceHomepage
) to some foaf:Agent
. The
foaf:holdsAccount
property of the agent is used to indicate accounts that are
associated with the agent.
See foaf:OnlineChatAccount
for an example. Other sub-classes include
foaf:OnlineEcommerceAccount
and foaf:OnlineGamingAccount
.
[back to top]
Status: | unstable |
---|
A foaf:OnlineChatAccount
is a foaf:OnlineAccount
devoted to
chat / instant messaging.
This is a generalization of the FOAF Chat ID properties,
foaf:jabberID
, foaf:aimChatID
,
foaf:msnChatID
, foaf:icqChatID
and
foaf:yahooChatID
.
Unlike those simple properties, foaf:OnlineAccount
and associated FOAF terms
allows us to describe a great variety of online accounts, without having to anticipate
them in the FOAF vocabulary.
For example, here is a description of an IRC chat account, specific to the Freenode IRC network:
<foaf:Person> <foaf:name>Dan Brickley</foaf:name> <foaf:holdsAccount> <foaf:OnlineAccount> &