Document Sample
OWL Powered By Docstoc
Representing Information Using
the Web Ontology Language
Section 4
Section 4
• Chapter 17: OWL DL
 ▫ OWL DL dialect, restrictions, remaining OWL
• Chapter 18: OWL Full
 ▫ Elimination of all restrictions
• Chapter 19: OWL Dialect Selection
 ▫ How to select the appropriate dialect
• Chapter 20: Applications
 ▫ Provides use case for Semantic Web enabled
Chapter 17
  ▫ DL: Description Logics                    Applications
       Information representation
        technique with well-defined   Ontology Languages (OWL Full,
        semantics supporting             OWL DL, and OWL Lite)
  ▫ Contains all OWL vocabulary
  ▫ Has fewer restrictions than
                                       RDF Schema      Individuals
    OWL Lite
       Restrictions ensure                 RDF and RDF/XML
• Chapter covers
  ▫   OWL DL                            XML and XMLS Datatypes
  ▫   Complex classes
  ▫   Required property values
  ▫   Enumerated data values              URIs and Namespaces
17.1 OWL DL Restrictions
          Construct                      Restrictions                          Construct             Restrictions
owl:cardinality                 Cannot be used on a                owl:imports             Cannot import an OWL Full
                                owl:TransitiveProperty                                     ontology
owl:TransitiveProperty          Cannot have an owl:cardinality     owl:sameAs              Must reference a named
                                constraint nor be functional                               individual
owl:inverseOf                   Cannot be specified for datatype
                                properties                         owl:Class               Cannot be individuals of other
owl:InverseFunctionalProperty                                                              classes
owl:SymmetricProperty                                              Class URIref            Must be stated to be a class (type
                                                                   Property URIref         Must be stated to be a property
owl:ObjectProperty              Must be disjoint from datatype                             (type separation)
                                                                   Individual URIref       Must belong to a class (type
owl:DatatypeProperty            Must be disjoint from object                               separation)
                                                                   rdf:Property            Must be one of
                                Cannot be inverse functional                               “owl:ObjectProperty”,
owl:AnnotationProperty          All annotations must subclass                              “owl:DatatypeProperty”,
                                this class and cannot be used in                           “owl:AnnotationProperty”, or
                                property axioms                                            “owl:Ontology Property”

• Most important restriction:
    Type separation (classes, properties, and individuals are disjoint)
17.1.1 OWL DL Vocabulary
     Category               Construct           Feature             Category            Construct               Feature
                        owl:oneOf          Enumerated classes                       owl:equivalentClass   Can be applied to
                                                                                                          class expressions
                        owl:disjointWith   Relating classes     Class expressions   rdfs:subClassOf
Class expression
                        owl:unionOf        Boolean                                  owl:intersectionOf    Boolean combination
                        owl:complementOf   combination                              owl:minCardinality
Enumerated values       owl:dataRange      Enumerated values    Cardinality         owl:maxCardinality    Arbitrary values
Property restrictions   owl:hasValue       Filler information                       owl:cardinality

   Additional Constructs in OWL DL                              Constructs less restricted in OWL DL
17.2 Complex Classes & Expressions
• Complex classes
 ▫ Composed of class expressions
      Analogous to math expression
      Constructed of atomic symbols and anonymous
       classes in allowed patterns
      Describe membership criteria
• Classes described by
 ▫   Class names (URIrefs)
 ▫   Enumerations
 ▫   Property restrictions
 ▫   Boolean combinations of class expressions
17.2.1 Enumerated Classes
• An enumeration is a predefined set of individuals
• owl:oneOf property
  ▫   Exhaustively specifies member individuals known a priori in advance
  ▫   Closed list; items cannot be added, so list should be very stable
  ▫   Reasoners infer maxCardinality from count of members
  ▫   Domain: instance of owl:Class; Range: instance of owl:List
• Syntax
  ▫ <owl:Class rdf:ID="className">
      <owl:oneOf rdf:parseType="Collection">
        <classURIref rdf:about="individualURIref"/>
• Example
  ▫   <owl:Class rdf:ID="TrafficLightColors">
        <owl:oneOf rdf:parseType="Collection">
          <traffic:LightColor rdf:about="#Red"/>
          <traffic:LightColor rdf:about="#Yellow"/>
          <traffic:LightColor rdf:about="#Green"/>
17.2.2 Disjoint Classes
• owl:disjointWith property
  ▫ Asserts that 2 classes have no individuals in common
       Instances of a class cannot be members of both classes
  ▫   Symmetric
  ▫   Classes can be disjoint with multiple classes
  ▫   Every class is disjoint with owl:Nothing
  ▫   Domain & Range: instance of owl:Class
• Syntax
  ▫ <owl:Class rdf:ID="Class1">
      <owl:disjointWith rdf:resource="Class2"/>
• Example
  ▫ <owl:Class rdf:ID="AlcoholicDrink">
      <owl:disjointWith rdf:resource="#NonAlcoholicDrink"/>
17.2.3 Boolean Class Combinations

• Class extensions are sets

• OWL DL supplies Boolean properties
 ▫ owl:intersectionOf
 ▫ owl:unionOf
 ▫ owl:complementOf Intersection Property
• owl:intersectionOf property
  ▫ OWL Lite restrictions removed
  ▫ Can be used to define a class
     Includes individuals common to all identified classes
  ▫ Equivalent to AND operation in logic
  ▫ Domain: instance of owl:Class
  ▫ Range: instance of rdf:List
• Example
  ▫ <owl:Class rdf:ID="ApplePieAlaModeDish">
      <owl:intersectionOf rdf:parseType="Collection"/>
        <owl:Class rdf:about="#ApplePieDish"/>
        <owl:Class rdf:about="#IceCreamDish"/>
    </owl:Class> Union Property
• owl:unionOf property
 ▫ Defines a class
    Includes individuals in any specified class (one or more)
 ▫ Equivalent to OR operation in logic
 ▫ Domain: instance of owl:Class
 ▫ Range: instance of rdf:List
• Example
 ▫ <owl:Class rdf:ID="FruitPies">
     <owl:unionOf rdf:parseType="Collection"/>
       <owl:Class rdf:about="#ApplePie"/>
       <owl:Class rdf:about="#CherryPie"/>
       <owl:Class rdf:about="#LemonPie"/>
       <owl:Class rdf:about="#KeyLimePie"/>
   </owl:Class> Complement Property
• owl:complementOf property
 ▫ Defines a disjoint class
    All individuals who are not in the specified class
 ▫ Equivalent to negation operation in logic
 ▫ Usually used with intersectionOf
 ▫ Domain & Range: instance of owl:Class
• Example:
 ▫ <owl:Class rdf:ID="MeatDish">
     <owl:intersectionOf rdf:parseType="Collection"/>
       <owl:Class rdf:about="#MenuDish"/>
       <owl:complementOf rdf:resource="#VegetarianDish"/>
   </owl:Class> Set Operator Summary
Operator    Logical                Resulting Class Contains

           AND        Individuals in each specified class

           OR         Individuals in at least 1 of the specified classes

           NOT        Individuals not in the specified class
17.3 Requiring a Property Value
• owl:hasValue property
 ▫ Local restriction that specifies that
    Objects must have identified property
    Property must have specified value
       Can also have other values for the same property
 ▫ Can use to define classes based on property values
 ▫ Domain: instance of owl:Restriction
• Example
 ▫ <owl:Class rdf:ID="ChocolatePie">
         <owl:onProperty rdf:resource="#hasPieFilling"/>
         <owl:hasValue rdf:resource="#Chocolate"/>
17.4 Enumerated Data Values
• owl:DataRange class
 ▫ Specified with owl:oneOf and rdf:Lists
 ▫ Like enumerated classes, but lists of values instead
• Example
 ▫   <owl:DatatypeProperty rdf:ID="YesNo">
          <rdf:first rdf:datatype="&xsd;string">No</rdf:first>
            <rdf:first rdf:datatype="&xsd;string">Yes</rdf:first>
            <rdf:rest rdf:resource="&rdf;nil" />
17.5 OWL DL Summary
 ▫ Restricted form of OWL Full
   Contains all constructs of OWL Full
 ▫ Extends OWL Lite by adding
   Class expressions
   Property value requirements
   Enumerated data values
Chapter 18
18 OWL Full
• OWL Full                          Ontology Languages (OWL Full,
  ▫ Complete specification of the      OWL DL, and OWL Lite)
    OWL lanugage
  ▫ Extension of RDF                 RDF Schema      Individuals
  ▫ Logical Layer
  ▫ Allows developer to say               RDF and RDF/XML
    anything about anything
  ▫ Unrestricted use of RDFS
  ▫ Superset of RDF and RDFS          XML and XMLS Datatypes

                                        URIs and Namespaces
18.1 OWL Full’s Differing Perspective

• OWL Full
  ▫ Supports all OWL constructs
  ▫ Relaxes all restrictions on OWL DL (17.1)
18.1.1 Type Separation

• No strict separation of classes, properties,
  individuals and data values
  ▫ Classes can be treated as objects
  ▫ Objects can be treated as classes
  ▫ Etc.
18.1.2 Individuals

• In OWL Full, rdfs:Resource is equivalent to
 ▫ Therefore all data values are individuals
18.1.3 Classes as Individuals

• A resource can be considered both
 ▫ A class of individuals and
 ▫ An individual of some other class
• Class can be a member of its own extension!
• In OWL Full, owl:Class is equivalent to
 ▫ In OWL DL & OWL Lite, owl:Class is a subclass of
18.1.4 Properties
• In OWL Full, owl:ObjectProperty and
  rdf:Property are equivalent
• Object and datatype properties do not have to be
• owl:DatatypeProperty can be
• rdfs:domain & rdfs:range can have descriptions
  as values
• Annotation properties can be used anywhere; no
  need for owl:AnnotationProperty class
18.1.5 Property Restrictions

• OWL Full has owl:hasValue (same as OWL DL),
  but relaxes restrictions on XMLS datatypes
18.2 OWL Full Summary
• OWL Full
 ▫   Complete, unrestricted species of OWL
 ▫   Most expressive
 ▫   No restrictions
 ▫   Cost: decidability
      Inference engines probably will never support all of
       OWL Full
Chapter 19
19.1 Choosing Your Weapon
• Select dialect that
  ▫ Sufficient to meet requirements
  ▫ Most restrictive
  ▫ Most widely supported
• OWL Lite is usually best, if possible
  ▫ OWL Lite is valid OWL DL and valid OWL Full
• Use OWL DL if you need its advantages
  ▫ Fewer restrictions, better support cardinality, etc.
• OWL Full is the last resort
  ▫ Use only if you need its expressive power
19.2 Migrating XML & RDF to OWL
• Existing RDF is only guaranteed to be valid in
  the OWL Full dialect
  ▫ E.g., for OWL Lite & DL, URIrefs of classes,
    properties, & individuals must be explicitly typed
• Full list of restrictions in App. E of OWL Ref
• XML files should be migrated to RDF/XML first
19.3 Language Selection Summary
• Need decidability and computability?
 ▫ OWL DL or OWL Lite
• Need all OWL constructs?
 ▫ OWL DL or OWL Full
• Don’t need the kitchen sink?
 ▫ OWL DL         Requirement            Recommendation
                  Simple taxonomical     OWL Lite
                  Decidability           OWL DL or OWL Lite
                  All OWL constructs     OWL DL or OWL Full
                  Maximum expressivity   OWL Full
19.4 Satisfaction of Information
Representation (IR) Requirements
 Building Block                        OWL Support Description

                  The OWL class construct represents a group or set of individual objects
                  with similar characteristics. Subclass relationships support the
                  definition of a subsumption hierarchy.

     Class        Accomplished through rdfs:Class and owl:Class
                  The RDF property construct associated attribute/value pairs with
                  individuals. OWL datatype properties and object properties refine RDF’s
                  property concept. Properties can be characterized as symmetric,
                  transitive, functional, or inverse functional. They can be related through
                  inverse and subproperty relationships.

                  Accomplished through rdf:Property and subclasses owl:ObjectProperty,
    Property      owl:DatatypeProperty, owl:AnnotationProperty, owl:OntologyProperty
                  Instances of user-defined classes are defined as RDF resources
                  associated with classes.

   Individual     Accomplished through resources with rdf:type of user-defined classes
19.4 Satisfaction of IR Req’ts cont’d
Relationship       OWL Support Concepts           Relationship         OWL Support
Relates classes Restrictions (e.g. rdfs:domain,
to properties   rdfs:range, owl:Restriction                       owl:equivalentClass
Relates classes Membership (instantiating                         owl:equivalentProperty
to individuals individuals from classes using
                rdf:type and owl:Class)                           owl:sameAs
Relates         Property values (implemented as                   disjoint classes
properties to   XML elements and values)
individuals                                                       owl:differentFrom

                                                       Meronymy   (user-defined properties)
19.4 Satisfaction of IR Req’ts cont’d
Information Representation Requirement                                Satisfied By
Producer descriptions of particular domains        ontologies
Distributed representations that can be extended   URIs, web-distributed ontologies imported with
                                                   owl:imports, XML namespaces
Extending resources                                rdf:about
Work with current development tools                XML syntax, RDF structure
Versioning and configuration management            owl:versionInfo property, deprecated classes and
                                                   properties, compatibility properties
Semantic join support and synonymy                 owl:sameAs, owl:equivalentProperty,
Modeling primitives                                classes, properties, individuals
Leverage open, non-proprietary standards           XML, RDF(S), URIs
19.5 OWL Dialect Selection Summary
 Dialect          Advantages              Disadvantages
OWL Lite   Easy software support   Limited expressiveness
OWL DL     Decidable               Restricted
OWL Full   Very expressive         Not decidable
Chapter 20
20 OWL Applications
• Applications
  ▫ Implementation layer
  ▫ Composed of                   Ontology Languages (OWL Full,
     Software
                                     OWL DL, and OWL Lite)
     Ontologies
     Instance files               RDF Schema      Individuals
• OWL designed for the web, but
  works fine in a stand-alone
                                        RDF and RDF/XML
• Multiple uses for OWL with
  distributed ontologies and        XML and XMLS Datatypes
  instance files
                                      URIs and Namespaces
20.1 Application Example
• Mark wants to find an open
  restaurant that serves Key lime pie
• Possible solution
  ▫ Mark enters search request on
    concierge web service provided by
    restaurant association
  ▫ Web service extracts menu & hours
    of operation data published on
    restaurant websites in format
    compliant with restaurant ontology
  ▫ Web service inferences & searches
  ▫ Results returned to Mark’s browser
20.1.1 OWL Lite Solution

• Need to develop
 ▫ “Restaurant association” ontology
 ▫ Instance data for restaurants (i.e. Knight Owl)
• Solution to be developed in OWL Lite Ontologies
• Key classes
  ▫ HoursOfOperation class
      Related by hasDailyHours
       property to
  ▫ DailyHours class
      Related by openOn and
       closedOn properties to
• Hours of operation data to be
  stored in an RDF/XML
  instance file compliant with
  Hours Of Operation (HOO)
• Restaurant class shown but
  not used in this demo Ontologies cont’d
<?xml version="1.0" encoding="UTF-8?>
<!ENTITY xsd "">

   xmlns    =""

<owl:Ontology rdf:about="">
   <rdfs:label>Hours of Operation Ontology</rdfs:label>
   <rdfs:comment>This ontology is used an example for various OWL constructs</rdfs:comment>
   <owl:versionInfo>$Id: hoursOfOperation-ont.owl,v 1.2 2004/11/02 12:34:56 </owl:versionInfo>
</owl:Ontology> Ontologies cont’d
<!-- Classes -->
<owl:Class rdf:ID="Restaurant"/>
<owl:Class rdf:ID="HoursOfOperation"/>
<owl:Class rdf:ID="DailyHours">
   <rdfs:label>Daily Hours</rdfs:label>
   <rdfs:comment>represents a set of opening hours for specified days of the week</rdfs:comment>
<!-- Properties -->
<owl:DatatypeProperty rdf:ID="openingTime">
   <rdfs:range rdf:resource="&xsd;time"/>
<owl:DatatypeProperty rdf:ID="closingTime">
   <rdfs:range rdf:resource="&xsd;time"/>
<owl:ObjectProperty rdf:ID="openOn">
   <rdfs:range rdf:resource="#DayOfWeek"/>
</owl:ObjectProperty> Ontologies cont’d
<!-- Properties continued -->
<owl:ObjectProperty><owl:DatatypeProperty rdf:ID="closedOn">
   <rdfs:range rdf:resource="#DayOfWeek"/>
<owl:DatatypeProperty><owl:DatatypeProperty rdf:ID="effectiveDate">
   <rdfs:range rdf:resource="&xsd;date"/>
<owl:ObjectProperty><owl:DatatypeProperty rdf:ID="hasDailyHours">
   <rdfs:range rdf:resource="#DailyHours"/>
<owl:ObjectProperty><owl:DatatypeProperty rdf:ID="hasHoursOfOperation">
   <rdfs:range rdf:resource="#HoursOfOperation"/>
<!-- Instances for days of the week -->
<DayOfWeek rdf:ID="Sunday">
</DayOfWeek> Ontologies cont’d
<!-- Instances for days of the week continued -->
<DayOfWeek rdf:ID="Monday">
<DayOfWeek rdf:ID="Tuesday">
<DayOfWeek rdf:ID="Wednesday">
<DayOfWeek rdf:ID="Thursday">
<DayOfWeek rdf:ID="Friday">
<DayOfWeek rdf:ID="Saturday">
</rdf:RDF> Hours of Operation Individuals
• Knight Owl Restaurant hosts its Hours of
  Operation information on its webserver
  ▫ Instance file imports & complies with
    restaurant association’s Hours of
    Operation Ontology
• Example Hours of Operation
  ▫ “Effective 4/1/2004, Knight Owl’s hours
      Sunday Closed
      Monday through Friday, 9am to 8pm
      Saturday 9:30am to 9pm
• Assumptions
  ▫ Restaurant association provides web
    service to search menus & hours
  ▫ Association maintains registry of
    participating restaurant’s instance files Hours of Operation cont’d
<?xml version="1.0" encoding="UTF-8?>
<!ENTITY hoo ""
<!ENTITY xsd "">

   xmlns    =""

<owl:Ontology rdf:about="">
   <rdfs:label>Hours of Operation Information for Knight Owl Restaurant</rdfs:label>
   <rdfs:comment>This contains the hours of operation for the Knight Owl</rdfs:comment>
   <owl:versionInfo>$Id: hours.rdf,v 1.2 2004/11/02 12:34:56 </owl:versionInfo>
   <owl:imports rdf:resource=""/>
</owl:Ontology> Hours of Operation cont’d
<!-- Daily Hours -->
<hoo:DailyHours rdf:ID="KOWeekdayHours040104">
    <hoo:openOn rdf:resource="&hoo;Monday"/>
    <hoo:openOn rdf:resource="&hoo;Tuesday"/>
    <hoo:openOn rdf:resource="&hoo;Wednesday"/>
    <hoo:openOn rdf:resource="&hoo;Thursday"/>
    <hoo:openOn rdf:resource="&hoo;Friday"/>
    <hoo:openingTime rdf:datatype="&xsd;time"/>09:00:00+8</hoo:openingTime>
    <hoo:closingTime rdf:datatype="&xsd;time"/>20:00:00+8</hoo:closingTime>
<hoo:DailyHours rdf:ID="KOSaturdayHours040104">
    <hoo:openOn rdf:resource="&hoo;Saturday"/>
    <hoo:openingTime rdf:datatype="&xsd;time"/>09:30:00+8</hoo:openingTime>
    <hoo:closingTime rdf:datatype="&xsd;time"/>21:00:00+8</hoo:closingTime>
<hoo:DailyHours rdf:ID="KOSundayHours040104">
    <hoo:closedOn rdf:resource="&hoo;Sunday"/>
</hoo:DailyHours> Hours of Operation cont’d
<hoo:Restaurant rdf:ID="KORestaurant">
   <hoo:hasHoursOfOperation rdf:resource="#KORestHOO040104"/>

<hoo:HoursOfOperation rdf:ID="KORestHOO040104">
   <hoo:hasDailyHours rdf:resource="#KOWeekdayHours040104"/>
   <hoo:hasDailyHours rdf:resource="#KOSaturdayHours040104"/>
   <hoo:hasDailyHours rdf:resource="#KOSundayHours040104"/>
   <hoo:effectiveDate rdf:datatype="&xsd;date">2004-04-01</hoo:effectiveDate>

20.2 Supporting Applications

• The purpose of representing information in
  OWL is to support application functionality.
• By providing a consistent method for
  representing information and explicitly
  providing semantics, new and exciting Semantic
  Web applications will emerge
• OWL must be used correctly & consistently
20.2.1 Inappropriate Applications
 ▫ Suffers from many of the same challenges as XML
 ▫ Relatively new
    Not a large base of software tools
    Not a large workforce conversant with OWL
 ▫ Possible performance issues due to verbosity of
 ▫ Reasoning hard to scale; rules somewhat limited
 ▫ Only works with textual data, not binary
20.2.2 Appropriate Applications
• Appropriate OWL applications leverage OWL’s
• OWL well-suited for applications like
 ▫ Providing information on servers for software and
   human consumption
 ▫ Well-defined object-oriented domains that can be
   easily described with text (taxonomical)
• Evaluate each potential application
20.3 Applications Summary

• Ultimately, OWL’s success will hinge on the
  benefits of OWL-based applications
• There are appropriate and inappropriate uses
  ▫ Each situation must be analyzed separately
• Still waiting for the “killer app” for the Semantic

Shared By: