Skip to main content

By clicking Submit, you agree to the developerWorks terms of use.

The first time you sign into developerWorks, a profile is created for you. Select information in your developerWorks profile is displayed to the public, but you may edit the information at any time. Your first name, last name (unless you choose to hide them), and display name will accompany the content that you post.

All information submitted is secure.

  • Close [x]

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerworks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

By clicking Submit, you agree to the developerWorks terms of use.

All information submitted is secure.

  • Close [x]

The ultimate mashup -- Web services and the semantic Web, Part 4: Create an ontology

Automatically choose between services and parts of service with the XML-based Web Ontology Language (OWL)

Michel Mitri (mitrimx@jmu.edu), Associate Professor, James Madison University
Michel Mitri is an associate professor of computer information systems at James Madison University. He teaches software development, database design, and Web application development, and specializes in applying AI and decision support technologies for solving educational and business-related problems.
Nicholas Chase (ibmquestions@nicholaschase.com), Freelance writer, Backstop Media
Nicholas Chase has been involved in Web site development for companies such as Lucent Technologies, Sun Microsystems, Oracle, and the Tampa Bay Buccaneers. Nick has been a high school physics teacher, a low-level radioactive waste facility manager, an online science fiction magazine editor, a multimedia engineer, an Oracle instructor, and the Chief Technology Officer of an interactive communications company. He is the author of several books, including XML Primer Plus (Sams).

Summary:  This series details the creation of a mashup application that gives control over the data displayed back to the user; to do that, you need to build in intelligence. Now that you know how to represent information in RDF, you can start to create an ontology using the XML-based Web Ontology Language (OWL), which will enable you to automatically choose between services and parts of services.

View more content in this series

Date:  08 Mar 2007 (Published 03 Oct 2006)
Level:  Intermediate PDF:  A4 and Letter (490 KB | 37 pages)Get Adobe® Reader®

Activity:  12849 views
Comments:  

Before you start

This tutorial is for readers who want to better understand the development of ontologies, or classifications of concepts, and how they relate to the semantic Web. It is also for readers who want to understand some of the reasoning options made available by the Web Ontology Language (OWL). This tutorial assumes that you are familiar with the concepts behind the Resource Description Framework (RDF), which you can gain by reading Part 3 of this series (see Resources). You should also have general familiarity with XML, but we will not be going deeply into these concepts.

No programming skills are required to complete this tutorial.

About this series

It seems you can't turn around on the Web these days without running into a Web site that either offers access to its data through a Web-services-based API or uses data from another site obtained through a Web-services-based API. Considering the advantage of using existing information in your own applications, that's probably not terribly surprising. It was also just a matter of time before someone started combining the data from these disparate systems to create something entirely new. These applications, called mashups, are the latest rage on the Web, from community-based sites to specialized search sites to the ever-present mapping mashups.

Mashups are (almost) all useful, but one thing that they have in common is that they are all developed for a specific set of services, and if one of those services changes, or if the preference for a specific service of a particular type changes, you'll have lots of work to do.

The purpose of this tutorial series (see Resources) is to create a mashup application so smart that users can literally add and remove services at will, and the system will know what to do with them. The series progresses as follows:

Part 1 introduced the concept of mashups, showing how they work and building a simple version of one. Serious performance problems involved in making potentially dozens of Web calls were also discovered.

Part 2 solved some of that problem by using the new pureXML™ capabilities of IBM® DB2® to build an XML cache, which saves the the results of previous requests and also enables you to retrieve specific information.

Ultimately, you will need to use ontologies, or vocabularies that define concepts and their relationships, so in Part 3 that process was started by learning about RDF and RDFS, two key ingredients in the Web Ontology Language (OWL), which is discussed in here Part 4. In Part 5, you will take the ontologies created in Part 4 and use them to enable users to change out information sources.

In Part 6, things get really fun. At this point you have a working application and the framework in place so that the system can use semantic reasoning to understand the services at its disposal. In this part, you give the user control, and enable him or her to map new services into the ontology and to pick and choose the data used for a custom mashup.


About this tutorial

Previous parts of this series explained what a mashup is, and how you can use it to combine data from multiple sources. A goal of this series is to provide a system that has built-in intelligence, such as the ability to switch out one service for another without having to know precisely how information is represented beforehand. To do that, you will need a way to define concepts such as bookstore, DVD, price, and so on. Building on the discussion of the Resource Description Framework from Part 3 (see Resources), here in Part 4 you will create an ontology, or classification of concepts, using the Web Ontology Language (OWL).

During the course of this tutorial, you will learn:

  • What ontologies are
  • What the Web Ontology Language is
  • The different species of OWL
  • How to create an ontology
  • How to create subclasses
  • Different types of OWL properties
  • How to add information to the ontology to enable reasoning
  • OWL-S and what it means for the classification of Web services

During the course of this tutorial, you will build a sample ontology for a bookstore, which will enable you to look at how to switch out one bookstore for another in Part 5.


Prerequisites

To follow along with the code in this tutorial, you will need to install and test the following software:

  • IBM® DB2® 9 (formerly known as "Viper"): This relational database also includes significant XML capabilities, which you'll need for this tutorial. You can download a trial version of DB2 9: DB2 Enterprise 9 or DB2 Express-C 9, a no-charge version of DB2 Express 9 data server.
  • Apache Tomcat or other servlet engine: This tutorial assumes that you will build Web applications using servlets, so you'll need a servlet engine such as Apache Tomcat. If you choose to build the application using another environment, just make sure you have the appropriate software on hand. Download apache-tomcat-5.5.17.zip and install into a directory with no spaces in the directory name.
  • Java: Apache Tomcat 5.5, with which this tutorial is built, requires Java 1.5 or higher. Download the J2SE SDK.
  • To make things easier, you can use an IDE such as Eclipse or IBM Rational™ Web Developer for your development. You can download Eclipse at Eclipse.org, download a trial version of Rational Web Developer, or use your favorite development environment. We won't do any fancy compilation and deployment.

1 of 11 | Next

Comments



Help: Update or add to My dW interests

What's this?

This little timesaver lets you update your My developerWorks profile with just one click! The general subject of this content (AIX and UNIX, Information Management, Lotus, Rational, Tivoli, WebSphere, Java, Linux, Open source, SOA and Web services, Web development, or XML) will be added to the interests section of your profile, if it's not there already. You only need to be logged in to My developerWorks.

And what's the point of adding your interests to your profile? That's how you find other users with the same interests as yours, and see what they're reading and contributing to the community. Your interests also help us recommend relevant developerWorks content to you.

View your My developerWorks profile

Return from help

Help: Remove from My dW interests

What's this?

Removing this interest does not alter your profile, but rather removes this piece of content from a list of all content for which you've indicated interest. In a future enhancement to My developerWorks, you'll be able to see a record of that content.

View your My developerWorks profile

Return from help

static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=XML, SOA and Web services, Java technology, Information Management, Open source, Web development
ArticleID=164737
TutorialTitle=The ultimate mashup -- Web services and the semantic Web, Part 4: Create an ontology
publish-date=03082007
author1-email=mitrimx@jmu.edu
author1-email-cc=dwxed@us.ibm.com
author2-email=ibmquestions@nicholaschase.com
author2-email-cc=dwxed@us.ibm.com

Tags

Help
Use the search field to find all types of content in My developerWorks with that tag.

Use the slider bar to see more or fewer tags.

Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere).

My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Use the search field to find all types of content in My developerWorks with that tag. Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere). My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Try IBM PureSystems. No charge.