OWL Basics                                                  (Main Index)


An OWL ontology fundamentally consists of classes and individuals, property definitions and property instances. Classes are abstraction groupings of things while individuals are references to the actual things themselves. Property definitions define the types of properties which can be expressed while the properties themselves give additional information about the individuals. Properties can be of two types. Datatype properties describe a relationship between an individual and a data value, such as "Joe's age is 32," while ObjectType properties state a relationship of one individual to another, such as "Susan is the wife of Joe."

There are often a variety of ways to express the same OWL statement in XML and, in fact, OWL does not have to be expressed in XML. In general this document will use the RDF/XML abbreviated form for OWL expression, which is not to imply that there are not other, equivalent expressions. It is not our purpose here to identify alternative expressions.

Classes

An OWL class is expressed in RDF/XML (abbreviated form) by an owl:Class element. The owl:Class start-tag includes the declaration of an rdf:ID attribute which specifies the local name of the class in this document (ontology). 

Example: the following element defines an OWL class named "Object".

<owl:Class rdf:ID="Object">
</owl:Class>

Several additional sub-elements are particularly important to the definition of OWL classes.

Example: the owl:Class "Season" can only be one of the individuals "Spring", "Summer", "Fall", and "Winter".

<owl:Class rdf:ID="Season">
  <rdfs:subClassOf>
    <owl:Class>
      <owl:oneOf rdf:parseType="Collection">
        <Season rdf:ID="Spring"/>
        <Season rdf:ID="Summer"/>
        <Season rdf:ID="Fall"/>
        <Season rdf:ID="Winter"/>
      </owl:oneOf>
    </owl:Class>
  </rdfs:subClassOf>
</owl:Class>

Example: "PoliticalDivision" is exactly the same class as "AdministrativeBoundary".

<owl:Class rdf:ID="PoliticalDivision">
    <owl:equivalentClass rdf:resource="#AdministrativeBoundary"/>
</owl:Class>        

Description logic terminology refers to classes with only necessary conditions (subClassOf) as primitive classes and defined classes as those with both necessary and necessary and sufficient conditions. Classes 

Several of these possible elements are shown in this example:

Example??

Individuals (Instances)

An individual or instance is usually defined by identifying the class of which it is an instance. For example, the OWL statement below defines an individual with ID "Joe" of type (class) Person.

<Person rdf:ID="Joe"/>

OWL Properties

OWL Datatype Properties

An owl:DatatypeProperty element expresses a relationship between an individual and a data value. The example below defines the DatatypeProperty "hasAge" and then shows it's use in the declaration of an individual of type Person.

<owl:DatatypeProperty rdf:ID="hasAge">
  <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#FunctionalProperty"/>
  <rdfs:domain rdf:resource="#Person"/>
  <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#nonNegativeInteger"/>
</owl:DatatypeProperty>
<Person rdf:ID="Joe">
  <hasAge>32</hasAge>
</Person>

OWL Object Properties

An owl:ObjectProperty element expresses a relationship between two individuals. The example below shows the definition of the ObjectProperty "hasWife" and an instance of that property used in the declaration of an individual of type Male.

<owl:ObjectProperty rdf:ID="hasWife">
  <rdfs:domain rdf:resource="#Man"/>
  <rdfs:range rdf:resource="#Woman"/>
</owl:ObjectProperty>
<Man rdf:ID="Joe">
  <hasWife rdf:resource="#Susan"/>
</Man>

Like the classes, properties have some additional elements important to ontological construction. Some of the most basic include the following.

Note that range restrictions can be placed on a property at the class level. One might choose to do this when a property has different ranges depending upon the class of the domain. For example, one could use class restrictions to specify that the hasSpouse property cannot be someone of the same gender. By giving it the rdf:type InverseFunctionalProperty, monogamous relationships are specified.

<owl:FunctionalProperty rdf:ID="hasSpouse">
  <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#ObjectProperty"/>
  <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#InverseFunctionalProperty"/>
</owl:FunctionalProperty>
<owl:Class rdf:ID="Woman">
  <rdfs:subClassOf>
    <owl:Restriction>
      <owl:onProperty>
        <owl:FunctionalProperty rdf:about="#hasSpouse"/>
      </owl:onProperty>
      <owl:allValuesFrom>
        <owl:Class rdf:about="#Man"/>
      </owl:allValuesFrom>
    </owl:Restriction>
  </rdfs:subClassOf>
</owl:Class>
<owl:Class rdf:ID="Man">
  <rdfs:subClassOf>
    <owl:Restriction>
      <owl:onProperty>
        <owl:FunctionalProperty rdf:about="#hasSpouse"/>
      </owl:onProperty>
      <owl:allValuesFrom rdf:resource="#Woman"/>
    </owl:Restriction>
  </rdfs:subClassOf>
</owl:Class>

Properties can be arranged in a type hierarchy with the use of the rdf:subPropertyOf element. In the example below, "hasWife" is a subproperty of "hasSpouse."

There are some special OWL-declared types of properties which are important because of their ontological implications (entailments). These include:

In the example "hasAge" above, the "hasAge" DatatypeProperty is given a domain, a range, and declared to be a functional property.

Example: "hasWife" can be declared to be a sub property of "hasSpouse." The XML segment below also illustrates "SymmetricProperty" and the "owl:inverseOf" element. Note that this example attempts to capture the traditional monogamous relationship between one man and one woman.

<owl:FunctionalProperty rdf:ID="hasSpouse">
  <rdfs:range rdf:resource="#Person"/>
  <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#SymmetricProperty"/>
  <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#ObjectProperty"/>
  <rdfs:domain rdf:resource="#Person"/>
</owl:FunctionalProperty>
<owl:ObjectProperty rdf:ID="hasWife">
  <rdfs:range rdf:resource="#Woman"/>
  <rdfs:subPropertyOf>
    <owl:FunctionalProperty rdf:about="#hasSpouse"/>
  </rdfs:subPropertyOf>
  <owl:inverseOf>
    <owl:FunctionalProperty rdf:about="#hasHusband"/>
  </owl:inverseOf>
  <rdfs:domain rdf:resource="#Man"/>
  <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#FunctionalProperty"/>
</owl:ObjectProperty>

Note that presence of owl:FunctionalProperty in this example indicates that marriage is limited to one spouse.

<owl:Class rdf:ID="Location"/>
<owl:ObjectProperty rdf:ID="hasLocation">
  <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#TransitiveProperty"/>
  <rdfs:range rdf:resource="#Location"/>
</owl:ObjectProperty>

This example states that the property hasLocation is transitive with range Location. Transitivity says that if MyHouse hasLocation New York and New York hasLocation USA, then MyHouse hasLocation USA.

Sowa's Roles

The owl:Class tag, as discussed above, is often used to create abstract groupings of things according to their intrinsic properties. This is Sowa's "firstness" (Sowa 2000). However, things are often classified by the role that they play.  A role (different usage than the Description Logics use of role) is a categorization of individuals according to how they relate to other individuals in the domain. This is Sowa's "secondness". For example, "woman" is a classification based on inherent characteristics of an individual whereas "wife" or "mother" is a role--a classification based on the relation of the woman to other people. 

In OWL, role classes can be defined using the "owl:Restriction" and "owl:someValuesFrom" tags. Consider this definition of "mother".

<owl:Class rdf:ID="Mother">
  <owl:equivalentClass>
    <owl:Class>
      <owl:intersectionOf rdf:parseType="Collection">
        <owl:Class rdf:about="#Person"/>
        <owl:Restriction>
          <owl:onProperty>
            <owl:FunctionalProperty rdf:about="#hasGender"/>
          </owl:onProperty>
          <owl:hasValue>
            <Gender rdf:ID="Female"/>
          </owl:hasValue>
        </owl:Restriction>
        <owl:Restriction>
          <owl:onProperty>
            <owl:ObjectProperty rdf:about="#hasChild"/>
          </owl:onProperty>
          <owl:someValuesFrom>
            <owl:Class rdf:about="#Person"/>
          </owl:someValuesFrom>
        </owl:Restriction>
      </owl:intersectionOf>
    </owl:Class>
  </owl:equivalentClass>
</owl:Class>

Mother is defined as the union of three classes:

This is a necessary and sufficient condition statement. If we assert (ABox) that Mary is a Mother, we can conclude that Mary is a Person, that Mary has gender Female, and that Mary has at least one child who is a Person (but we cannot conclude who the child is). On the other hand, if we assert that Mary is person, has gender Female, and has child "Bob", the we can conclude that Mary is a Mother.

Note that the rdfs:subClassOf tag (necessary condition) was not used in defining the class Mother.

It is also possible to define a subclass with one or more value restrictions. For example, the RDF segement below defines the class "AcuityAgentMissingUser" as a "NeedRelationProblem" with a "relationName" DatatypeProperty value which is the xsd#string "http://research.ge.com/Acuity/pvf.owl,hasUser" and a "rangeRestriction" DatatypeProperty value which is the xsd#string "http://research.ge.com/Acuity/pvf.owl,Person".

<owl:Class rdf:ID="AcuityAgentMissingUser">
    <owl:equivalentClass>
        <owl:Class>
            <owl:intersectionOf rdf:parseType="Collection">
                <owl:Class rdf:about="#NeedRelationProblem"/>
                <owl:Restriction>
                    <owl:onProperty>
                        <owl:DatatypeProperty rdf:about="#relationName"/>
                           </owl:onProperty>
                    <owl:hasValue rdf:datatype="http://www.w3.org/2001/XMLSchema#string">http://research.ge.com/Acuity/pvf.owl,hasUser</owl:hasValue>
                </owl:Restriction>
                <owl:Restriction>
                    <owl:onProperty>
   
                     <owl:DatatypeProperty rdf:about="#rangeRestriction"/>
                    </
owl:onProperty>
   
                 <owl:hasValue rdf:datatype="http://www.w3.org/2001/XMLSchema#string">http://research.ge.com/Acuity/pvf.owl,Person</owl:hasValue>
   
             </owl:Restriction>
   
         </owl:intersectionOf>
   
     </owl:Class>
   
</owl:equivalentClass>
</
owl:Class>

 


Copyright 2004 General Electric
A. W. Crapo, GE Global Research
Last revised 05/18/2004