OWL Tutorial from a data interoperability perspective - PowerPoint PPT Presentation

1 / 30
About This Presentation
Title:

OWL Tutorial from a data interoperability perspective

Description:

xmlns='http://www.xfront.com/owl/ontologies/camera ... 'Ah, an f-stop is the. same as aperture.' Suppose that the application was pre-wired to ... – PowerPoint PPT presentation

Number of Views:27
Avg rating:3.0/5.0
Slides: 31
Provided by: Cos148
Category:

less

Transcript and Presenter's Notes

Title: OWL Tutorial from a data interoperability perspective


1
OWL Tutorial(from a data interoperability
perspective)
  • Roger L. Costello
  • The MITRE Corp.

2
Note
  • Eventually this tutorial will replace the OWL
    Tutorial in owl.ppt.
  • At the moment this tutorial is far from complete.
    However, there is lots of good material in here,
    that will give you practical tips on how to use
    OWL to achieve data interoperability.
  • Let me know how you like this tutorial!

3
OWL Another Data Source
OWL
Application
Input Data
Output Data
You should think of an OWL document as simply
another source of data that your applications can
tap into (along with other data sources such as
databases, flat files, etc).
4
OWL XML
  • An OWL document is an XML document.
  • The OWL specification specifies the set of
    elements and attributes that you may use in an
    OWL document, and it clearly defines the meaning
    of those elements and attributes.
  • By convention, the suffix of an OWL document is
    .owl

5
All XML Tools Available
  • Since an OWL document is simply an XML document
    you can take advantage of all the XML tools when
    using an OWL document - XSLT, XML APIs (SAX,
    DOM), XQuery, etc.

6
Programmatically accessing OWL
OWL
API
Application
As mentioned on the previous slide, you can use
any of the XML APIs when accessing OWL
documents. However, it would be easier to use an
API that is specifically designed for accessing
the data in OWL documents, i.e., an OWL API.
(See the OWL API in this package)
7
OWL RDFS more
  • All of the elements and attributes that RDF
    Schema provides is available to you when creating
    OWL documents.

8
Class Relationships
  • Scenario your application receives input data
    (that is structured as RDF/XML). As it parses
    the data it encounters a Class that it was not
    pre-wired to understand. It can consult an OWL
    document to see if the unfamiliar Class relates
    to a Class that it is familiar with.

9
Defining Classes in OWL
Here's an OWL document which defines a Camera
Class
lt?xml version"1.0" encoding"UTF-8"?gt ltrdfRDF
xmlnsrdf"http//www.w3.org/1999/02/22-rdf-syntax
-ns" xmlnsrdfs"http//www.w3.o
rg/2000/01/rdf-schema" xmlnsowl"http//www.w3
.org/2002/07/owl" xmlns"http//www.xfront.com/
owl/ontologies/camera/" xmlbase"http//www.xf
ront.com/owl/ontologies/camera/"gt
ltowlClass rdfID"Camera"gt
ltrdfssubClassOf rdfresource"http//www.w3.org/2
002/07/owlThing"/gt lt/owlClassgt lt/rdfRDFgt
camera.owl (see example01)
10
All OWL definitions are nested within an RDF
element
lt?xml version"1.0" encoding"UTF-8"?gt ltrdfRDF
...gt ... lt/rdfRDFgt
11
The OWL Namespace
lt?xml version"1.0" encoding"UTF-8"?gt ltrdfRDF
... xmlnsowl"http//www.w3.org/2002/07/owl"
...gt ... lt/rdfRDFgt
12
Defining a Class
lt?xml version"1.0" encoding"UTF-8"?gt ltrdfRDF
xmlnsrdf"http//www.w3.org/1999/02/22-rdf-syntax
-ns" xmlnsrdfs"http//www.w3.o
rg/2000/01/rdf-schema" xmlnsowl"http//www.w3
.org/2002/07/owl" ...gt
ltowlClass rdfID"Camera"gt ...
lt/owlClassgt lt/rdfRDFgt
Recall that rdfID is used to create an "initial
definition". If the Class already exists, and you
simply want to "add to it" then you use rdfabout.
13
xmlbase provides the base URI for all IDs
lt?xml version"1.0" encoding"UTF-8"?gt ltrdfRDF
xmlnsrdf"http//www.w3.org/1999/02/22-rdf-syntax
-ns" xmlnsrdfs"http//www.w3.o
rg/2000/01/rdf-schema" xmlnsowl"http//www.w3
.org/2002/07/owl" xmlns"http//www.xfront.com/
owl/ontologies/camera/" xmlbase"http//www.xf
ront.com/owl/ontologies/camera/"gt
ltowlClass rdfID"Camera"gt ...
lt/owlClassgt lt/rdfRDFgt
The full URI for Camera is
http//www.xfront.com/owl/ontologies/camera/Camer
a
14
All Classes are subclasses of owlThing
lt?xml version"1.0" encoding"UTF-8"?gt ltrdfRDF
xmlnsrdf"http//www.w3.org/1999/02/22-rdf-syntax
-ns" xmlnsrdfs"http//www.w3.o
rg/2000/01/rdf-schema" xmlnsowl"http//www.w3
.org/2002/07/owl" xmlns"http//www.xfront.com/
owl/ontologies/camera/" xmlbase"http//www.xf
ront.com/owl/ontologies/camera/"gt
ltowlClass rdfID"Camera"gt
ltrdfssubClassOf rdfresource"http//www.w3.org/2
002/07/owlThing"/gt lt/owlClassgt lt/rdfRDFgt
15
Defining a SLR Class
  • The next slide shows how to define a SLR Class
    that is a subclass of Camera.

Camera
SLR
16
lt?xml version"1.0" encoding"UTF-8"?gt ltrdfRDF
xmlnsrdf"http//www.w3.org/1999/02/22-rdf-syntax
-ns" xmlnsrdfs"http//www.w3.o
rg/2000/01/rdf-schema" xmlnsowl"http//www.w3
.org/2002/07/owl" xmlns"http//www.xfront.com/
owl/ontologies/camera/" xmlbase"http//www.xf
ront.com/owl/ontologies/camera/"gt
ltowlClass rdfID"Camera"gt
ltrdfssubClassOf rdfresource"http//www.w3.org/2
002/07/owlThing"/gt lt/owlClassgt
ltowlClass rdfID"SLR"gt
ltrdfssubClassOf rdfresource"Camera"/gt
lt/owlClassgt lt/rdfRDFgt
camera.owl (see example02)
17
OWL API
Here is one of the methods in the OWL API
public String getSuperClasses(String classURI)
Example if this method is invoked with the SLR
URI http//www.xfront.com/owl/ontologies/c
amera/SLR the superclasses of SLR is returned
http//www.xfront.com/owl/ontologies/camera/
Camera http//www.w3.org/2002/07/owlThing
18
Processing input data that contains an unfamiliar
Class
lt?xml version"1.0" encoding"UTF-8"?gt ltSLR
xmlns"http//www.xfront.com/owl/ontologies/camera
/"gt ... lt/SLRgt
Application
??? What's "SLR"?
Suppose that the application was not pre-wired to
understand SLR.
19
Consult the Camera OWL document to see if SLR
relates to anything familiar
getSuperClasses("http//www.xfront.com/owl/ontolog
ies/camera/SLR")
OWL API
Application
"http//www.xfront.com/owl/ontologies/camera/Came
ra http//www.w3.org/2002/07/owlThing"
"Ah, a SLR is a type of Camera."
Camera.owl
Suppose that the application was pre-wired
to understand Camera. The OWL Camera
contains the relationship of SLR to Camera.
20
Interoperability despite terminology differences!
  • The application was able to process the input
    data despite the fact that the data used
    unfamiliar elements.
  • The OWL Camera document provided the information
    needed to bridge the terminology gap!

21
Synonymous Properties
  • Scenario your application receives input data
    (that is structured as RDF/XML). As it parses
    the data it encounters a property that it was not
    pre-wired to understand. It can consult an OWL
    document to see if the unfamiliar property
    relates to a property that it is familiar with.

22
Defining Properties in OWL
lt?xml version"1.0" encoding"UTF-8"?gt ltrdfRDF
xmlnsrdf"http//www.w3.org/1999/02/22-rdf-syntax
-ns" xmlnsrdfs"http//www.w3.o
rg/2000/01/rdf-schema" xmlnsowl"http//www.w3
.org/2002/07/owl" xmlns"http//www.xfront.com/
owl/ontologies/camera/" xmlbase"http//www.xf
ront.com/owl/ontologies/camera/"gt
ltowlClass rdfID"Camera"gt
ltrdfssubClassOf rdfresource"http//www.w3.org/2
002/07/owlThing"/gt lt/owlClassgt
ltowlClass rdfID"SLR"gt
ltrdfssubClassOf rdfresource"Camera"/gt
lt/owlClassgt ltowlClass rdfID"Range"gt
ltrdfssubClassOf rdfresource"http//www.w3
.org/2002/07/owlThing"/gt lt/owlClassgt
ltowlDatatypeProperty rdfID"aperture"gt
ltrdfsdomain rdfresource"Camera"/gt
ltrdfsrange rdfresource"http//www.w3.org/2001/X
MLSchemastring"/gt lt/owlDatatypePropertygt
ltowlObjectProperty rdfID"shutter-speed"gt
ltrdfsdomain rdfresource"Camera"/gt
ltrdfsrange rdfresource"Range"/gt
lt/owlObjectPropertygt lt/rdfRDFgt
camera.owl (see example03)
23
Properties come in 2 flavors
ltowlDatatypeProperty rdfID"aperture"gt
ltrdfsdomain rdfresource"Camera"/gt
ltrdfsrange rdfresource"http//www.w3.org/2001/X
MLSchemastring"/gt lt/owlDatatypePropertygt
ltowlObjectProperty rdfID"shutter-speed"gt
ltrdfsdomain rdfresource"Camera"/gt
ltrdfsrange rdfresource"Range"/gt lt/owlObject
Propertygt
Use owlObjectProperty when the value (range)
is a Class type. Example the range
of shutter-speed is a Range Class.
Use owlDatatypeProperty when the value (range)
is a simple type. Example the range of aperture
is an XML Schema string.
Note that OWL leverages RDFS for defining the
domain and range of properties (using rdfsdomain
and rdfsrange).
24
Review Class Hierarchy plus Properties
Camera
Properties aperture xsdstring
shutter-speed Range
Range
SLR
The OWL document currently defines three
Classes, and two properties of Camera.
Legend
Class
Properties propert1 range property2
range ...
25
Subclasses inherit properties
Camera
Properties aperture xsdstring
shutter-speed Range
SLR
Subclasses inherit the properties of all parent
classes. Thus, the SLR Class also has the
properties aperture and shutter-speed.
26
Defining synonymous properties
ltowlDatatypeProperty rdfID"aperture"gt
ltrdfsdomain rdfresource"Camera"/gt
ltrdfsrange rdfresource"http//www.w3.org/2001/X
MLSchemastring"/gt lt/owlDatatypePropertygt ltowlD
atatypeProperty rdfID"f-stop"gt
ltowlequivalentProperty rdfresource"aperture"/gt
ltrdfsdomain rdfresource"Camera"/gt
ltrdfsrange rdfresource"http//www.w3.org/200
1/XMLSchemastring"/gt lt/owlDatatypePropertygt
camera.owl (see example04)
The OWL document is defining another property,
f-stop, and asserting that it is equivalent
(synonymous) with aperture.
27
OWL API
Here is one of the methods in the OWL API
public String getEquivalentProperties(String
propertyURI)
Example if this method is invoked with the
f-stop URI http//www.xfront.com/owl/ontol
ogies/camera/f-stop the equivalent properties of
f-stop are returned http//www.xfront.com/
owl/ontologies/camera/aperture
28
Processing input data that contains an unfamiliar
property
lt?xml version"1.0" encoding"UTF-8"?gt ltSLR
xmlns"http//www.xfront.com/owl/ontologies/camera
/"gt ltf-stopgt4.5-5.6lt/f-stopgt ... lt/SLRgt
Application
??? What's "f-stop"?
Suppose that the application was not pre-wired to
understand f-stop.
29
Consult the Camera OWL document to see if f-stop
relates to anything familiar
getEquivalentProperties("http//www.xfront.com/owl
/ontologies/camera/f-stop")
OWL API
Application
"http//www.xfront.com/owl/ontologies/camera/aper
ture"
"Ah, an f-stop is the same as aperture."
Camera.owl
Suppose that the application was pre-wired
to understand aperture. The OWL Camera
contains the relationship of f-stop to aperture.
30
Interoperability despite terminology differences!
  • The application was able to process the input
    data despite the fact that the data used
    unfamiliar elements.
  • The OWL Camera document provided the information
    needed to bridge the terminology gap!
Write a Comment
User Comments (0)
About PowerShow.com