Commentary by Mark Wahl
Organizing principles for identity systems:
Background: Web Ontology Language OWL
(2005/6/16)
On Tuesday I (re)introduced the concepts of metaschema from SP-DNA. In today's post I introduce OWL, as in later posts I'll be referencing some of its concepts as well.
As part of the Semantic Web program the W3C defined a standard Web Ontology Language (OWL). OWL was published in 2004 and builds on earlier ontology specifications DAML+OIL.
OWL is an extension to the W3C Resource Description Framework (RDF), and many RDF and RDF schema XML elements are used directly in OWL documents.
Two other specifications that are not directly part of OWL or RDF but are used in this discussion include the Dublin Core (dc:) schema for document metadata, and the Friend-of-a-Friend (FOAF) white pages schema. Some of the examples will use FOAF vocabulary from http://xmlns.com/foaf/0.1/index.rdf, which is Copyright © 2000-2005 Dan Brickley and Libby Miller , and licensed under a Creative Commons License.
A few OWL concepts
In OWL, classes can be named (by a URI reference) or can be anonymous. A class reference, defined by owl:Class (a subclass of rdfs:Class) can inherit from other classes (the top class is owl:Thing):
<owl:Class rdf:ID="Opera"> <rdfs:subClassOf rdf:resource="#MusicalWork" /> </owl:Class>
In the OWL Full dialect, all RDF schema classes are OWL classes, as in
<rdfs:Class rdf:about="http://xmlns.com/foaf/0.1/Person" rdfs:label="Person" rdfs:comment="A person." vs:term_status="stable"> <rdfs:subClassOf rdf:resource="http://xmlns.com/wordnet/1.6/Person"/> <rdfs:subClassOf rdf:resource="http://xmlns.com/foaf/0.1/Agent"/> <rdfs:subClassOf rdf:resource="http://www.w3.org/2000/10/swap/pim/contact#Person"/> <rdfs:subClassOf rdf:resource="http://www.w3.org/2003/01/geo/wgs84_pos#SpatialThing"/> <rdfs:isDefinedBy rdf:resource="http://xmlns.com/foaf/0.1/"/> </rdfs:Class>
Object properties (owl:ObjectProperty) links between individual instances, and datatype properties (owl:DatatypeProperty) link instances to data values. Both are subclasses of rdf:Property.
<owl:ObjectProperty rdf:ID="hasMother"> <rdfs:subPropertyOf rdf:resource="#hasParent"/> </owl:ObjectProperty>
rdfs:domain binds a property to classes which have it:
<owl:ObjectProperty rdf:ID="hasBankAccount">
<rdfs:domain>
<owl:Class>
<owl:unionOf rdf:parseType="Collection">
<owl:Class rdf:about="#Person"/>
<owl:Class rdf:about="#Corporation"/>
</owl:unionOf>
</owl:Class>
</rdfs:domain>
</owl:ObjectProperty>
<owl:DatatypeProperty rdf:about="#timeStamp">
<rdfs:domain rdf:resource="#Measurement"/>
<rdf:range rdf:resource="&xsd;dateTime"/>
</owl:DatatypeProperty>
An individual instance:
<Opera rdf:ID="Tosca"> <hasComposer rdf:resource="#Giacomo_Puccini"/> <hasLibrettist rdf:resource="#Victorien_Sardou"/> <hasLibrettist rdf:resource="#Giuseppe_Giacosa"/> <hasLibrettist rdf:resource="#Luigi_Illica"/> <premiereDate rdf:datatype="&xsd;date">1900-01-14</premiereDate> <premierePlace rdf:resource="#Roma"/> <numberOfActs rdf:datatype="&xsd;positiveInteger">3</numberOfActs> </Opera>
Note that rdf:datatype needs to be present in the properties in instances even if declared as the range of the property.
Or without a RDF ID:
<foaf:Person> <foaf:name>Dan Brickley</foaf:name> <foaf:mbox_sha1sum>241021fb0e6289f92815fc210f9e9137262c252e</foaf:mbox_sha1sum> <foaf:homepage rdf:resource="http://rdfweb.org/people/danbri/" /> <foaf:img rdf:resource="http://rdfweb.org/people/danbri/mugshot/danbri-small.jpeg" /> </foaf:Person>
OWL has many operators for relationships between classes and between instances: oneOf, Restriction, intersectionOf, unionOf, complementOf, disjointWith etc.
owl:sameAs declares two instances to be the same:
<rdf:Description rdf:about="#William_Jefferson_Clinton"> <owl:sameAs rdf:resource="#BillClinton"/> </rdf:Description>
In the OWL Full dialect it's possible to use owl:sameAs between classes as well:
<owl:Class rdf:ID="FootballTeam"> <owl:sameAs rdf:resource="http://sports.org/US#SoccerTeam"/> </owl:Class>
Less rich dialects can declare that two classes have the same set of instances:
<owl:Class rdf:about="#US_President"> <equivalentClass rdf:resource="#PrincipalResidentOfWhiteHouse"/> </owl:Class>
Annotation properties provide metadata for classes and instances:
<owl:AnnotationProperty rdf:about="&dc;creator"/> <owl:Class rdf:about="#MusicalWork"> <rdfs:label>Musical work</rdfs:label> <dc:creator>N.N.</dc:creator> </owl:Class> <Opera rdf:about="#Tosca"> <dc:creator rdf:datatype="&xsd;string">Giacomo Puccini</dc:creator> </Opera>
A header block annotates the ontology as a whole:
<owl:Ontology rdf:about="http://xmlns.com/foaf/0.1/" dc:title="Friend of a Friend (FOAF) vocabulary" dc:description="The Friend of a Friend (FOAF) RDF vocabulary, described using W3C RDF Schema and the Web Ontology Language." dc:date="$Date: 2005/06/03 07:01:49 $"> <rdfs:seeAlso rdf:resource="http://www.w3.org/2001/08/rdfweb/foaf"/> </owl:Ontology>
Warning about linking with personal-identifiable information
The OWL reference guide section 1.6 contains this warning:
OWL's ability to express ontological information about individuals appearing in multiple documents supports linking of data from diverse sources in a principled way. The underlying semantics provides support for inferences over this data that may yield unexpected results. In particular, the ability to express equivalences using owl:sameAs can be used to state that seemingly different individuals are actually the same. Similarly, owl:InverseFunctionalProperty can be used to link individuals together. For example, if a property such as SocialSecurityNumber is an owl:InverseFunctionalProperty, then two separate individuals could be inferred to be identical based on having the same value of that property. When individuals are determined to be the same by such means, information about them from different sources can be merged. This aggregation can be used to determine facts that are not directly represented in any one source.
The ability of the Semantic Web to link information from multiple sources is a desirable and powerful feature that can be used in many applications. However, the capability to merge data from multiple sources, combined with the inferential power of OWL, does have potential for abuse. It may even be illegal to create or to process such linked information in countries with data protection laws, especially in the EU, without having a valid legal reason for such processing. Therefore, great care should be taken when using OWL with any kind of personal data that might be linked with other data sources or ontologies. Detailed security solutions were considered out of scope for the Working Group. Work currently underway elsewhere is expected to address these issues with a variety of security and preference solutions -- see for example SAML and P3P.
For more information:
- W3C OWL Overview
- W3C OWL Reference (Informal specification)
- W3C OWL Guide (Worked example)
- www.schemaweb.info - RDF schemas, including several compatible with FOAF