W3C

Representing Classes As Property Values on the Semantic Web

W3C Working Draft 10 June 2004

This version:
...
Latest version:
...
Previous versions:
This is the first public version
Editor:
Natasha Noy, Stanford University, Stanford, US
Contributors:
Pat Hayes, University of West Florida, US
Brian McBride, HP Labs, Bristol, UK
Alan Rector, University of Manchester, US
Bernard Vatant, Mondeca

Copyright © 2004 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C liability, trademark, document use and software licensing rules apply.


Abstract

This document addresses the issue of using classes as property values in OWL. While OWL Full and RDF Schema do not put any restriction on using clashes as property values, OWL DL and OWL Lite do not generally allow this use. The only property that can have a class as its value is rdf:type (and its subproperties). The document examines different approaches to representing this ontological pattern in OWL DL and discusses considerations that the users should keep in mind when choosing one of the approaches.

Status of this Document

This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current W3C publications and the latest revision of this technical report can be found in the W3C technical reports index at http://www.w3.org/TR/.

This document will be a part of a larger document that will provide an introduction and overview of all ontology design patterns produced by the Semantic Web Best Practices and Deployment Working Group.

This document is a W3C Working Draft and is expected to change. The SWBPD WG does not expect this document to become a Recommendation. Rather, after further development, review and refinement, it will be published and maintained as a WG Note.

This document is the First Public Working Draft. We encourage public comments. Please send comments to public-swbp-wg@w3.org

Open issues, todo items:

Publication as a draft does not imply endorsement by the W3C Membership. This is a draft document and may be updated, replaced or made obsolete by other documents at any time. It is inappropriate to cite this document as other than work in progress.


General issue

It is often useful to use classes as values for properties. While OWL Full and RDF Schema do not put any restriction on using clashes as property values, OWL DL and OWL Lite do not generally allow such use. The only property that can have a class as its value in OWL DL and OWL Lite is rdf:type (and its subproperties). Within a closed system that is under the control of a single design authority, this is not a problem, since the designer can use the natural pattern if the system is not restricted to using Description Logic reasoners, or use a different pattern if using Description Logic reasoners is required.

Use case example

Suppose we have a set of books about animals and want to annotate each book with its subject, which a particular species or class of animal (or animals) that it talks about. Further, we want to be able to infer that a book about african lions is also a book about lions (For example, when retrieving all books about lions from a repository, we want books that are annotated as books about african lions to be included in the results).

More specifically, consider two book examples: (1) "Lions: Life in the Pride", which is a book that "presents an introduction to lions describing their physical characteristics, habitat, young, food, predators, and relationship to people"; and (2) "The African Lion," which "describes the physical characteristics, habitat, and behavior of the" african lions. We would like to specify that the first book described the animal species of Lions, and the second describes a species of African Lion. However, we also want to retrieve the second book when a query is about Lions, not just African Lions.

We consider classes of animals to be subjects of the books and would like to use the Dublin Core property dc:subject for this annotation.

We discuss a number of approaches for representing this pattern in OWL DL and their implications.

One goal of the web publisher, however, is to enable maximum reuse of published information. Furthermore, it will be common on the Semantic Web to import and reuse other published ontologies. In doing so, it is important for web developers to preserve original semantics of imported resources. Therefore, an important consideration in choosing a representation pattern in this case is the following: If the pattern requires a different interpretation of classes to be used as values, does the designer "own" the definitions of these classes (in this case, the hierarchy of animals) to change them according to the new interpretation? Are others already using this hierarchy of animals in their applications and will this change affect those applications?

Other use case scenarios

This issue arises in general when we have a hierarchy of concepts and would like to use it as a terminology to annotate other classes or individuals. Consider using a hierarchy of different genres to annotate music CDs, or linking classes or individuals in an ontology to the corresponding concepts in a standard reference terminology (e.g., UMLS is such standard reference terminology for many medical applications).

Notations

In all the figures below, ovals represent classes and rectangles represent individuals. The orange color signifies classes or individuals that are specific to a particular approach. Green arrows with green labels are annotation properties.

Approaches

Approach 1: using classes directly as values

In the first approach, we can simply use classes from the subject hierarchy as values for properties (in our example, as values for the dc:subject property). We can define a class Book of all books about animals. For simplicity, we omit classes for other animals, such as mammals and felines.

Using classes directly as values

Here is a definition of an individual (a specific book that we are annotating) with the corresponding subject (for simplicity, we assume that each book discusses only one class of animals):

:LionsLifeInThePrideBook
a :Book ;
rdfs:seeAlso <http://isbn.nu/0736809643> ;
:bookTitle "Lions: Life in the Pride" ;
dc:subject :Lion .

The book "The African Lion" will be represented as:

:TheAfricanLionBook
a :Book ;
rdfs:seeAlso <http://isbn.nu/089686328X> ;
:bookTitle "The African Lion" ;
dc:subject :AfricanLion .
And the class AfricanLion is a subclass of the class Lion:
:AfricanLion
a owl:Class;
rdfs:subClassOf :Lion .

Considerations when choosing approach 1:

OWL code for approach 1

[N3] [RDF/XML abbrev] [Abstract syntax]

Summary for approach 1

This approach is a good one to use if you care about simplicity, do not have to be in OWL DL, and either do not need to limit the range of the dc:subject values or do not care that you also need to use classes as subjects to implement this restriction.

Approach 2: Creating a hierarchy of subjects and a parallel set of subject individuals

We can treat the hierarchy of animal species as a hierarchy of subjects, create individuals corresponding to all the subjects and use these individuals as values for the dc:subject property. Thus, we will have, for example, an individual LionSubject that will be an instance of the Lion class.

Creating a hierarchy of subjects and a parallel set of subject individuals

We can then use the LionSubject as the value of the property dc:subject for the LionsLifeInThePrideBook individual:

  :LionSubject
a :Lion .

In this case, the definition of the LionsLifeInThePrideBook refers to the LionSubject individual

:LionsLifeInThePrideBook
a :Book ;
rdfs:seeAlso <http://isbn.nu/0736809643> ;
:bookTitle "Lions: Life in the Pride" ;
dc:subject :LionSubject . 

Considerations when choosing approach 2:

OWL code for approach 2

[N3] [RDF/XML abbrev] [Abstract syntax]

Summary of approach 2

This approach results in an OWL DL ontology and may be a good one to use if staying in OWL DL is important. The approach has a potential disadvantage of having actual subject values be unrelated to one another and hence not allowing a general-purpose reasoner to relate books with a subject "lion" to books with a subject "african lions", for example. Furthermore, if the hierarchy of animals is imported and the source uses the hierarchy to describe actual animals, using this approach is inconsistent with this interpretation. You need to maintain consistency between the set of classes representing subjects and the set of corresponding individuals.

Approach 3: using a property other than rdfs:subclassOf to organize the subject hierarchy

We can create a single class Subject and make all the subjects to be individuals that are instances of this class Subject:

 :LionSubject
a :Subject ;
rdfs:seeAlso :Lion .

We can use the annotation property rdfs:seeAlso to link the LionSubject individual to the Lion class. Note that rdfs:seeAlso is an annotation property and hence giving it a value that is a class does not take us out of OWL DL. In this approach, we are essentially using individuals as surrogates for classes.

We can then create explicit relations between different subjects, which will re-create the hierarchy for animals that we have in mind. While we create our own property parentSubject, we can also use the corresponding properties from the SKOS-Core 1.0 schema, which is an RDF schema for representing thesauri and similar types of knowledge organization systems. So, for example parentSubject is similar to skos:broader. The SKOS schema provides a rich vocabulary for handling subject hierarchy, with additional properties such as skos:narrower, skos:related, and so on.

 :parentSubject
a owl:TransitiveProperty , owl:ObjectProperty ;
rdfs:domain :Subject ;
rdfs:range :Subject ;
rdfs:seeAlso <http://www.w3.org/2004/02/skos/core/broader> .
:AfricanLionSubject
a :Subject ;
rdfs:seeAlso :AfricanLion ;
:parentSubject :LionSubject .
using a property other than rdfs:subclassOf to organize the subject hierarchy

Considerations when choosing Approach 3

OWL code for approach 3

[N3] [RDF/XML abbrev][Abstract syntax]

Summary of Approach 3

This approach may be a good one to use if staying within OWL DL is important. It also allows you to use a DL reasoner to infer transitive relationships between subjects. It does carry the penalty of having two parallel "hierarchies."

Approach 4: using members of a class as values for the property

We can approximate the interpretation that we used in the previous approaches by using unspecified members of a class rather than the class itself as property values. We can define the class BookAboutAnimals as a class of books where the subject is some animal. Correspondingly, a BookAboutLions class will be a class of books where a subject is some (unidentified) lion or lions:

using members of a class as values for the property

For example, we can define the class BookAboutLions as follows:

:BookAboutLions
a owl:Class ;
owl:equivalentClass
[ a owl:Class ;
owl:intersectionOf ([ a owl:Restriction ;
owl:onProperty dc:subject ;
owl:someValuesFrom :Lion
] :Book)
] .

A specific instance of this class LionsLifeInThePrideBook would then be defined as follows:

:LionsLifeInThePrideBook
a :BookAboutLions ;
rdfs:seeAlso <http://isbn.nu/0736809643> ;
:bookTitle "Lions: Life in the Pride" .

Alternatively, LionsLifeInThePrideBook can be defined as

:LionsLifeInThePrideBook
a :Book; [ a owl:Restriction ;
owl:onProperty dc:subject ;
owl:someValuesFrom :Lion
]; rdfs:seeAlso <http://isbn.nu/0736809643> ;
:bookTitle "Lions: Life in the Pride" .
A DL classifier will be able to classify LionsLifeInThePrideBook as an instance of the class BookAboutLions

Considerations when choosing Approach 4

OWL code for approach 4

[N3] [RDF/XML abbrev][Abstract syntax]

Summary of Approach 4

This approach can make the most use of DL classifiers. It represents a different interpretation of the subject as being a prototypical instance of a class rather than a whole class of things or a specific subject corresponding to that class. With the understanding that you are using a different interpretation, this approach may be a good one to use if using DL reasoners to classify individuals based on their subjects (or another property used in its place) is important.

Approach 5: using classes as values for annotation properties

Another way to stay in OWL DL is to use classes as values for annotation properties:

  dc:subject
a owl:AnnotationProperty .

using classes as values for annotation properties

:LionsLifeInThePrideBook
a :Book ;
rdfs:seeAlso <http://isbn.nu/0736809643> ;
:bookTitle "Lions: Life In The Pride" ;
dc:subject :Lion .

Considerations when choosing Approach 5

OWL code for approach 5

[N3] [RDF/XML abbrev] [Abstract syntax]

Summary of Approach 5

This approach allows you to use classes directly as property values while staying in OWL DL. However, the properties that will have classes as values will have to be defined as annotations and therefore cannot have any additional restrictions defined on them (and should not be declared as object or datatype properties elsewhere). DL reasoners will not use values of annotation properties.

References

[1]http://lists.w3.org/Archives/Public/public-swbp-wg/2004May/0152.html

[2]http://lists.w3.org/Archives/Public/public-swbp-wg/2004May/0098.html

[3]http://lists.w3.org/Archives/Public/public-swbp-wg/2004May/0111.html

[4]http://lists.w3.org/Archives/Public/public-swbp-wg/2004May/0113.html