TLFeBOOK A Semantic Web primer Grigoris Antoniou and Frank van Harmelen TLFeBOOK
A Semantic Web Primer Grigoris Antoniou and Frank van Harmelen A Semantic Web Primer Antoniou and van Harmelen ,!7IA2G2-abcbac!:t;K;k;K;k 0-262-01210-3 #737806 03/23/04 A Semantic Web Primer Grigoris Antoniou and Frank van Harmelen The development of the Semantic Web, with machine-readable content, has the potential to revolutionize the World Wide Web and its use. In A Semantic Web Primer Grigoris Antoniou and Frank van Harmelen provide an introduction and guide to this emerging field, describing its key ideas, languages, and technologies. Suitable for use as a textbook or for self-study by professionals, the book concentrates on undergraduate-level fundamental concepts and techniques that will enable readers to proceed with building applications on their own and includes exercises, project descriptions, and annotated references to relevant online materials. A Semantic Web Primer is the only available book on the Semantic Web to include a systematic treatment of the different languages (XML, RDF, OWL, and rules) and technologies (explicit metadata, ontologies, and logic and inference) that are central to Semantic Web development. The book also examines such crucial related topics as ontology engineering and application scenarios. After an introductory chapter, topics covered in succeeding chapters include XML and related technologies that support semantic interoperability; RDF and RDF Schema, the standard data model for machine-processible semantics; and OWL, the W3C-approved standard for a Web ontology language that is more extensive than RDF Schema; rules, both monotonic and nonmonotonic, in the framework of the Semantic Web; selected application domains and how the Semantic Web would benefit them; the development of ontology-based systems; and current debates on key issues and predictions for the future. Grigoris Antoniou is Professor at the Institute for Computer Science, FORTH (Foundation for Research and Technology-Hellas), Heraklion, Greece. Frank van Harmelen is Professor in the Department of Artificial Intelligence at the Vrije Universiteit, Amsterdam, the Netherlands. Cooperative Information Systems series “A book we have been waiting for: a concise yet detailed introduction to the basic concepts and methods for the Semantic Web.” —Rudi Studer, Institute AIFB, University of Karlsruhe, Germany “This book is a great introduction to the Semantic Web and in particular to the new languages (RDF Schema and OWL) that have recently become standard for it. I am using the book with my undergraduate Semantic Web class, and the students find it well written and clear. For those who want to roll up their sleeves and learn about this emerging technology, this book will be a powerful tool.” —James Hendler, Professor, Computer Science Department, University of Maryland “This is an excellent and much-needed book. It gives the reader a broad introduction to the motivation behind the Semantic Web, as well as its applications and supporting technologies.” —Ian Horrocks, Department of Computer Science, University of Manchester, United Kingdom The MIT Press Massachusetts Institute of Technology Cambridge, Massachusetts 02142 http://mitpress.mit.edu MC737806front.qxd 5/20/04 9:16 AM Page 1 TLFeBOOK TLFeBOOK
TLFeBOOK Cooperative Information Systems Michael Papazoglou, Joachim W. Schmidt, and John Mylopoulos, editors Advances in Object-Oriented Data Modeling Michael P. Papazoglou, Stefano Spaccapietra, and Zahir Tari, editors, 2000 Workflow Management: Models, Methods, and Systems Wil van der Aalst and Kees max van Hee, 2002 A Semantic Web primer Grigoris Antoniou and Frank van Harmelen 2004 TLFebooK
Cooperative Information Systems Michael Papazoglou, Joachim W. Schmidt, and John Mylopoulos, editors Advances in Object-Oriented Data Modeling Michael P. Papazoglou, Stefano Spaccapietra, and Zahir Tari, editors, 2000 Workflow Management: Models, Methods, and Systems Wil van der Aalst and Kees Max van Hee, 2002 A Semantic Web Primer Grigoris Antoniou and Frank van Harmelen, 2004 TLFeBOOK TLFeBOOK
TLFeBOOK A Semantic e Primer Grigoris Antoniou and Frank van harmelen The Mit Press Cambridge, Massachusetts London, England TLFebooK
A Semantic Web Primer Grigoris Antoniou and Frank van Harmelen The MIT Press Cambridge, Massachusetts London, England TLFeBOOK TLFeBOOK
TLFeBOOK @2004 Massachusetts Institute of Technology All rights reserved. No part of this book may be reproduced in any form by any electronic or mechanical means(including photocopying, recording, or information storage and retrieval) without permission in writing from the publisher This book was set in 10/13 Palatino by the authors using LTEX 2E Printed and bound in the United States of America Library of Congress Cataloging-in-Publication Data Antoniou, G(Grigoris) A semantic Web primer/ Grigoris Antoniou and Frank van Harmelen. p. cm-(Cooperative information systems) Includes bibliographical references and index ISBN 0-262-01210-3(hc. alk. paper) Semantic Web. I. Van Harmelen, Frank. IL. Title. Ill. Serie TK5105.88815.A582004 02504dc22 2003065165 10987654321 TLFebooK
© 2004 Massachusetts Institute of Technology All rights reserved. No part of this book may be reproduced in any form by any electronic or mechanical means (including photocopying, recording, or information storage and retrieval) without permission in writing from the publisher. This book was set in 10/13 Palatino by the authors using LATEX 2ε. Printed and bound in the United States of America. Library of Congress Cataloging-in-Publication Data Antoniou, G. (Grigoris) A semantic Web primer/ Grigoris Antoniou and Frank van Harmelen. p. cm.–(Cooperative information systems) Includes bibliographical references and index. ISBN 0-262-01210-3 (hc.: alk. paper) 1. Semantic Web. I. Van Harmelen, Frank. II. Title. III. Series. TK5105.88815. A58 2004 025.04–dc22 2003065165 10987654321 TLFeBOOK TLFeBOOK
TLFeBooK dicated to konstantina GA TLFebooK
Dedicated to Konstantina G.A. TLFeBOOK TLFeBOOK
TLFeBooK Brief Contents 1 The Senmantic Web vision 1 2 Structured Web Documents in XML 23 Describing Web Resources in RDF 61 4 Web Ontology Language: OWL 109 5 Logic and Inference: Rules 151 6 Applications 7 Ontology Engineering 205 8 Conclusion and Outlook 223 a Abstract OWL Syntax 227 TLFebooK
Brief Contents 1 The Semantic Web Vision 1 2 Structured Web Documents in XML 23 3 Describing Web Resources in RDF 61 4 Web Ontology Language: OWL 109 5 Logic and Inference: Rules 151 6 Applications 179 7 Ontology Engineering 205 8 Conclusion and Outlook 223 A Abstract OWL Syntax 227 TLFeBOOK TLFeBOOK
TLFeBOOK Contents List of figures Series foreword Preface xix 1 The Semantic Web Vision 1 1.1 Todays Web 1 1.2 From Todays Web to the Semantic Web: Exa amples 1.3 Semantic Web Technologies 7 PPI 1.5 Book Overview 19 1.6 Summary 19 Suggested reading 2 Structured Web documents in XML 23 2.1 Introduction 2 2.2 The XML Language 2.3 Structuring 2.4 Namespaces 2.5 Addressing and Querying XML Documents 45 2.6P Suggested Reading Exercises and Projects TLFeBOoK
Contents List of Figures xiii Series Foreword xv Preface xix 1 The Semantic Web Vision 1 1.1 Today’s Web 1 1.2 From Today’s Web to the Semantic Web: Examples 3 1.3 Semantic Web Technologies 7 1.4 A Layered Approach 16 1.5 Book Overview 19 1.6 Summary 19 Suggested Reading 20 2 Structured Web Documents in XML 23 2.1 Introduction 23 2.2 The XML Language 27 2.3 Structuring 31 2.4 Namespaces 43 2.5 Addressing and Querying XML Documents 45 2.6 Processing 49 2.7 Summary 55 Suggested Reading 57 Exercises and Projects 58 TLFeBOOK TLFeBOOK
TLFeBooK 3 Describing Web resources in RDF 61 3.1 Introduction 61 3.2 RDF: Basic ideas 63 3.3 RDF: XML-Based Syntax 69 3.4 RDF Schema: Basic Ideas 80 3.5 RDF Schema: The Languag 3.6 RDF and RDF Schema in RDF Schema 91 3.7 An Axiomatic Semantics for rDF and RDF Schema 94 3. 8 A Direct Inference System for RDF and RDFS 99 3.9 Querying in RQL 10 3.10 Suggested Reading 105 Exercises and Projects 106 4 Web Ontology Language: OWL 4.1 Introduction 109 4.2 The OWL Language 115 ample 129 4. 4 OWL in OWL 138 4.5 Future Extensions 144 4.6 Summary 146 Suggested Reading 146 Exercises and Projects 148 5 Logic and Inference: Rules 151 5.1 Introduction 151 5.2 Example of Monotonic Rules: Family Relationships 154 5.3 Monotonic Rules: Syntax 155 5.4 Monotonic Rules: Semantics 158 5.5 Nonmonotonic Rules: Motivation and Syntax 161 5.6 Example of Nonmonotonic Rules: Brokered Trade 163 Markup in XML: Monotonic Rules 167 5.8 Rule Markup in XML: Nonmonotonic Rules 173 5.9 Summary 176 Suggested Reading 176 Exercises and Projects 177 TLFeBOoK
x Contents 3 Describing Web Resources in RDF 61 3.1 Introduction 61 3.2 RDF: Basic Ideas 63 3.3 RDF: XML-Based Syntax 69 3.4 RDF Schema: Basic Ideas 80 3.5 RDF Schema: The Language 84 3.6 RDF and RDF Schema in RDF Schema 91 3.7 An Axiomatic Semantics for RDF and RDF Schema 94 3.8 A Direct Inference System for RDF and RDFS 99 3.9 Querying in RQL 100 3.10 Summary 104 Suggested Reading 105 Exercises and Projects 106 4 Web Ontology Language: OWL 109 4.1 Introduction 109 4.2 The OWL Language 115 4.3 Examples 129 4.4 OWL in OWL 138 4.5 Future Extensions 144 4.6 Summary 146 Suggested Reading 146 Exercises and Projects 148 5 Logic and Inference: Rules 151 5.1 Introduction 151 5.2 Example of Monotonic Rules: Family Relationships 154 5.3 Monotonic Rules: Syntax 155 5.4 Monotonic Rules: Semantics 158 5.5 Nonmonotonic Rules: Motivation and Syntax 161 5.6 Example of Nonmonotonic Rules: Brokered Trade 163 5.7 Rule Markup in XML: Monotonic Rules 167 5.8 Rule Markup in XML: Nonmonotonic Rules 173 5.9 Summary 176 Suggested Reading 176 Exercises and Projects 177 TLFeBOOK TLFeBOOK
TLFeBOOK 6 Applications 6.1 179 6.2 Horizontal information products at elsevier 179 6.3 Data In on at Audi 182 6.4 Skill Finding at Swiss Life 185 6.5 Think Tank Portal at EnerSearch 187 6.6 e-Learning 191 94 6. 8 Other Scenarios 199 7.1 Introduction 205 7.2 Constructing Ontologies Manuall 205 7.3 Reusing Existing Ontologies 209 7.4 Using Semiautomatic Methods 211 7.5 On-To-Knowledge Semantic Web Architecture 215 Suggested Reading 218 218 8 Conclusion and Outlook 223 8.1 How It All Fits Together 223 8.2 Some Technical Questions 24 8.3 Predicting the Future 224 A Abstract OWL Syntax TLFebooK
Contents xi 6 Applications 179 6.1 Introduction 179 6.2 Horizontal Information Products at Elsevier 179 6.3 Data Integration at Audi 182 6.4 Skill Finding at Swiss Life 185 6.5 Think Tank Portal at EnerSearch 187 6.6 e-Learning 191 6.7 Web Services 194 6.8 Other Scenarios 199 Suggested Reading 201 7 Ontology Engineering 205 7.1 Introduction 205 7.2 Constructing Ontologies Manually 205 7.3 Reusing Existing Ontologies 209 7.4 Using Semiautomatic Methods 211 7.5 On-To-Knowledge Semantic Web Architecture 215 Suggested Reading 218 Project 218 8 Conclusion and Outlook 223 8.1 How It All Fits Together 223 8.2 Some Technical Questions 224 8.3 Predicting the Future 224 A Abstract OWL Syntax 227 Index 235 TLFeBOOK TLFeBOOK
TLFeBooK List of figures 1 A hierarchy lligent personal agents A layered approach to the Semantic Web 2.1 Tree representation of an XML document 2.2 Tree representation of a library document 2. 4 Tree representation of query 5 2.5 A template (sLT as tree transformation 3.1 Graph representation of tripl 65 3.3 Representation of a tertiary predicate 3.4 Representation of a tertiary predicate 3.5 a hierarchy of classes 3.6 RDF and RDFS layers 3.7 Subclass hierarchy of some modeling primitives of RDFS 8 Instance relationships of some modeling primitives of RDFS 3.9 Class hierarchy for the motor vehicles example 4.1 Subclass relationships between OWL and RDF/RDFS 115 4.2 Inverse properties 19 4.3 Classes and subclasses of the African wildlife ontology 4. 4 Branches are parts of trees 129 4.5 Classes and subclasses of the printer ontology TLFeBOoK
List of Figures 1.1 A hierarchy 11 1.2 Intelligent personal agents 15 1.3 A layered approach to the Semantic Web 18 2.1 Tree representation of an XML document 31 2.2 Tree representation of a library document 46 2.3 Tree representation of query 4 48 2.4 Tree representation of query 5 48 2.5 A template 52 2.6 XSLT as tree transformation 56 3.1 Graph representation of triple 65 3.2 A semantic net 65 3.3 Representation of a tertiary predicate 68 3.4 Representation of a tertiary predicate 78 3.5 A hierarchy of classes 82 3.6 RDF and RDFS layers 84 3.7 Subclass hierarchy of some modeling primitives of RDFS 87 3.8 Instance relationships of some modeling primitives of RDFS 87 3.9 Class hierarchy for the motor vehicles example 90 4.1 Subclass relationships between OWL and RDF/RDFS 115 4.2 Inverse properties 119 4.3 Classes and subclasses of the African wildlife ontology 129 4.4 Branches are parts of trees 129 4.5 Classes and subclasses of the printer ontology 133 TLFeBOOK TLFeBOOK