[rdfweb-dev]
Describing FOAF using OWL: enumerating allowed property values
Dan Brickley
danbri at w3.org
Sun Jun 22 10:42:18 UTC 2003
http://www.w3.org/TR/owl-guide/#Privacy is interesting reading in a FOAF context.
Basically I am trying to showcase OWL using FOAF. The vocabulary
as defined at http://xmlns.com/foaf/0.1/ already uses OWL for a few handy and
straightforward things, inverse-functionality of 'homepage', 'mbox',
'mbox_sha1sum' etc., as well as mutual disjointness of Document versus Person.
All very easy, clear win for using OWL on top of RDFS, and a very practical
step towards the data-merging and privacy issues outlined in
http://www.w3.org/TR/owl-guide/#Privacy -- there are FOAF crawling bots out
there drawing just the kind of inferences discussed, merging scattered
data about people on basis of inverse-functional and suchlike.
So, this is just some notes on my current investigation:
we have some properties, and will likely acquire more, whose
appropriate values are drawn from a controlled list of strings.
I've been looking through http://www.w3.org/TR/2003/WD-owl-guide-20030331/
for guidance on how to do this, but I couldn't see a clear answer.
http://www.w3.org/TR/2003/WD-owl-guide-20030331/#DefiningProperties
suggests I should define my property as a datatype property. What do I do next?
There is a pointer off to
http://www.w3.org/TR/owl-ref/#EnumeratedDatatype which seems to provide the
answer:
<owl:DatatypeProperty rdf:ID="tennisGameScore">
<rdfs:range>
<owl:DataRange>
<owl:oneOf>
<rdf:List>
<rdf:first rdf:datatype="xsd:integer">0</rdf:first>
<rdf:rest>
<rdf:List>
<rdf:first rdf:datatype="xsd:integer">15</rdf:first>
<rdf:rest>
<rdf:List>
<rdf:first rdf:datatype="xsd:integer">30</rdf:first>
<rdf:rest>
<rdf:List>
<rdf:first rdf:datatype="xsd:integer">40</rdf:first>
<rdf:rest rdf:resource="&rdf;nil" />
</rdf:List>
</rdf:rest>
</rdf:List>
</rdf:rest>
</rdf:List>
</rdf:rest>
</rdf:List>
</owl:oneOf>
</owl:DataRange>
</rdfs:range>
</owl:DatatypeProperty>
Which is ugly as **** but I think does what I want. I think it is ugly because
RDF's new syntax for parseType='Collection' doesn't work with literals, so the
full list needs to be spelled out.
So I think I can use something like this:
(dropping the datatyping)
<owl:DatatypeProperty rdf:about="http://xmlns.com/foaf/0.1/myersBriggs">
<rdfs:range>
<owl:DataRange>
<owl:oneOf>
<rdf:List>
<rdf:first>INTP</rdf:first>
<rdf:rest>
<rdf:List>
...etc
This should hopefully provide a way for us to specify controlled values
that get written as simple literal properties in user data. So the above
explosion of markup is not something users have to see.
End result for users should be improved checking and validation of their data.
For developers, I expect the main win will be a clearer sense of what the
FOAF vocab allows and dissallows. We could try to integrate this stuff into
tools too, of course...
Dan
More information about the foaf-dev
mailing list