d ti f k. l d domain that can be used as a skeletal foundation for a knowledge base
..... eg a ed da ase , c e seco d da ase as ...... “Edward ScissorHands” rdf:type.
INF5120 ”Modellbasert Systemutvikling” ”Modelbased System development”
Lecture 11: 19.04.2010 MDI I: Semantic Web with Ontologies and Model Driven Interoperability
Telecom and Informatics
INF5120 - Lecture plan - 2010
1: 25/1: Introduction to MBSU, MDA, OO and Service/SOA modeling, Overall EA, 4 parts: MDE/SSS/MS/MDI (AJB)
Part I: MDE – Model Driven Engineering 2: 1/2: MDE I: Metamodeling. DSL and UML profiles, MDA technologies (XMI, Eclipse, EMF/GMF) (AJB/BRE)
Part II: SSS – Service Science and Service/SOA technologies 3: 8/2: SSS I: Service science (top down) - Service and SOA Technologies (bottom up) (AJB)
Part I continued: MDE – Model Driven Engineering 4: 15/2: MDE II: Model transformations with MOFScript, ATL and other technologies (GO/JO) 5 :22/2: MDE III: Code generation with MOFScript, ATL and other technologies (GO/JO)
Part III: MOS – Modeling of Services - with SoaML 6: 1/3: MOS I: Business Process Modeling (CIM) - with BPMN 2.0, and BMM, EA with UPDM (AJB) 7: 8/3: MOS II: Soaml, UML2 and SysML, Modelio SOA and Scope, –Collaboration and Component models (AJB) 8: 15/3: MOS III: SoaML (PIM) and Requirements modeling , CIM->PIM and SoaML (AJB) 9: 22/3: MOS IV: Method Engineering and SPEM / EPF - for Service systems (BRE)
EASTER Part IV – Model Driven Interoperability 10: 12/4: MS V: SOA and Service Design, MDA and ADM - Intro to MDI (AJB ) 11: 19/4: MDI I: Semantic Web with Ontologies and Model Driven Interoperability (TIR) 12: 26/4: MDI II: Semantic Services and Model Driven Interoperability (TIR) 13: 3/5: MDE IV: Evolution and industrial practice of modelbased technologies (AJB++)
14: 10/5: Course summary and preparation for Exam 31/5 (AJB)
Exam: May 31st, 31st 2010 (Monday), (Monday) 0900 0900-1200 1200 (3 hours)
Telecom and Informatics
2
Agenda g Model Driven Interoperability Ontologies Intro to Ontology engineering
Semantic Web Intro RDF, RDFS, and SPARQL Tool support for RDF/RDFS
Conclusions
Telecom and Informatics
Agenda g Model Driven Interoperability Ontologies Intro to Ontology engineering
Semantic Web Intro RDF, RDFS, and SPARQL Tool support for RDF/RDFS
Conclusions
Telecom and Informatics
European Interoperability Framework for European Public Services (EIF) Version 2.0 http://www.bigwobber.nl/wp-content/uploads/2009/11/European-Interoperability-Framework-for-European-Public-Services-draft.pdf
Interoperability, within the context of European Public Services delivery, is the ability of disparate and diverse organisations to interact towards mutually beneficial and agreed common goals, involving the sharing of information and knowledge between the organisations, through the business processes they support, byy means of the exchange of data between their respective ICT systems An interoperability framework is an agreed approach to interoperability for organisations that wish to work together towards the joint delivery of public services. i Withi its Within it scope off applicability, li bilit it specifies ifi a sett off common elements: vocabulary, concepts, principles, policies, guidelines, recommendations, and practices
Telecom and Informatics
5
The Needs and the Benefits of Interoperability (EIF) Interoperability addresses the need for: cooperation between public administrations aiming at the establishment of public
services; exchanging information between public administrations to fulfil legal requirements
or p political commitments; sharing and reusing information among public administrations to increase administrative efficiency and reduce administrative burden on citizens and businesses;
leading to: improving public service delivery to citizens and business by facilitating the one-
stop shop delivery of public services; reducing g costs for p public administrations,, businesses and citizens through g efficient and effective delivery of public services.
Telecom and Informatics
6
Interoperability p y Levels ((EFI))
Telecom and Informatics
7
Compatibility Levels (IEC TC 65/290/DC)
• Incompatibility: inability of two or more devices to work together in the same application • Coexistence: ability to of two or more devices operate independently of one another in the same communication network • Interworkability: ability of two or more devices to support transfer ofdevice parameters
• Interoperability: ability of two or more devices to work together in one or more applications • Interchangeability: ability of two or more devices to replace each other inworking together in one or more application
Telecom and Informatics
8
Reference model for conceptual integration with ontologies Enterprise System A
Enterprise System B
(MDD Abstraction)
(MDD Abstraction)
Computational Independent Model (CIM)
Semantic Annotation
MT
Model-Driven Development (MDD) & Architecture-Driven Modernisation (ADM)
Interoperability Patterns
Platform Independent Model (PIM)
Model-Driven Development (MDD)
MT
Semantic Annotation
e ic rv cts Se pe As
Architecture-Driven Modernisation (ADM)
Horisontal
Platform Specific Model (PSM)
Pr As oce pe ss ct s
Integration
Ontologies
S Semantic ti Annotation
Reference Ontology
Semantic Annotation
In fo As rm p e a ti ct on s
MT
n- nal No tio ts nc pec u F As
Model-Driven Development (MDD) & Architecture-Driven Modernisation (ADM)
Platform Independent Model (PIM)
Model-Driven Development (MDD)
MT
Semantic Annotation
Execution Platform A
Architecture-Driven Modernisation (ADM)
Platform Specific Model (PSM)
Execution Platform B
Computational System A MT Model Transformation
Computational Independent Model (CIM)
Ontologies
MI Integration Vertical
Semantic S ti Annotation
Computational System B MI Model Interoperability
MT Model Transformation
Telecom and Informatics
Agenda g Model Driven Interoperability Ontologies Intro to Ontology engineering
Semantic Web Intro RDF, RDFS, and SPARQL Tool support for RDF/RDFS
Conclusions
Telecom and Informatics
9
Ontologies g Ontologies provide a shared understanding of a domain They provide background knowledge to systems to automatize certain tasks By the process of annotation, knowledge can be linked to ontologies Example: “Angelina Jolie” (Text) linked to concept Actress In our ontology we also know that an actress always is female and a
person
Ontologies allow the creation of annotations Æ machine-readable and machine-understandable content If machines can understand content, they can also perform more meaningful and intelligent queries Distinction of Jaguar the animal and the car Combination of information that is distributed on the Web
Telecom and Informatics
Definitions An ontology defines the basic terms and relations comprising the vocabulary b l off a topic t i area, as wellll as th the rules l ffor combining bi i tterms and relations to define extensions to the vocabulary An ontology is a hierarchically structured set of terms for describing a d domain i th thatt can b be used d as a skeletal k l t l ffoundation d ti ffor a kknowledge l d base An ontology provides the means for describing explicitly the conceptualization t li ti b behind hi d th the kknowledge l d represented t d iin a kknowledge l d base An ontology is a formal, explicit specification of a shared conceptualization t li ti
Telecom and Informatics
11
Examples p
Telecom and Informatics
13
Features of an ontology gy Modelled knowledge about a specific domain Defines A common vocabulary The meaning g of terms How terms are interrelated
Consists of Conceptualization and implementation
Contains Ontological primitives
Telecom and Informatics
14
Classifications of ontologies
Catalog/ID
Thessauri “narrower term” relation Terms/ glossary
Informal is-a
Formal is-a
Frames (properties)
Formal instance
General Logical constraints
Value Restrs.
Disjointness, Inverse, part-Of ...
Lassila O, McGuiness D. The Role of Frame-Based Representation on the Semantic Web. Technical Report. p Knowledge g Systems y Laboratory. y Stanford University. y KSL-01-02. 2001.
Telecom and Informatics
15
Languages g g for building g ontologies g Ontologies can be built using various languages with various d degrees off fformality lit
Natural language UML ER OWL/RDFS WSML FOL ...
The formalism and the language limit the kind of knowledge that can be represented A domain model is not necessarily a formal ontology only because it is written in OWL
Telecom and Informatics
16
Applications pp of ontologies g Knowledge representation Ontology models domain knowledge
Semantic annotation Ontology is used as a vocabulary vocabulary, classification or indexing
schema for a collection of items
Semantic search Ontology is used as a query vocabulary or for query rewriting
purposes
Configuration g Ontology defines correct configuration templates
Telecom and Informatics
17
Principles p for the design g of ontologies g Clarity To T communicate i t the th intended i t d d meaning i off d defined fi d tterms
Coherence To sanction inferences that are consistent with definitions
Extendibility E t dibilit To anticipate the use of the shared vocabulary
Minimal Encoding Bias To be independent of the symbolic level
Minimal Ontological Commitments To make as few claims as possible about the world
Gruber, T.; Towards Principles for the Design of Ontologies. KSL-93-04. Knowledge Systems Laboratory. Stanford University. 1993
Telecom and Informatics
18
Ontology gy engineering g g The set of activities that concern the ontology development process, tthe e ontology o to ogy life e cycle, cyc e, a and d tthe e methodologies, et odo og es, too tools sa and d languages a guages for o building ontologies Ontology life cycle
Project management: controlling, planing, quality assurance etc.
E Evaluati ion
Doocumentaation
Knowlledge acquisition n
Domain analysis motivating scenarios, competency questions, existing solutions
Conceptualization conceptualization of the model, integration and extension of existing solutions
Implementation implementation of the formal model in a representation language
Usage/Maintenance adaptation of the ontology according to new requirements Telecom and Informatics
19
Ontology engineering activities Management
Development oriented
Telecom and Informatics
Support
Methodologies g for building g ontologies g Validated guidelines on how the ontology building process should be structured Well-organized process instead of „ontology development driven by inspiration and intuition only“ only Methodologies do not support all of the aforementioned activities They implicitly assume a particular development paradigm for the ontology engineering process Some S off them th also l provide id supporting ti methods th d and d ttools l There are many different methodologies for building ontologies Telecom and Informatics
21
How to build an ontology? Natalya F. Noy and Deborah L. McGuinness. ``Ontology Development 101: A Guide to Creating Your First Ontology''. Stanford Knowledge Systems Laboratory Technical Report KSL-01-05 and Stanford Medical Informatics Technical Report SMI-2001-0880, March 2001.
Step 1: Determine the domain and scope of the ontology What is the domain that the ontology will cover? For what we are going to use the ontology? For what types of questions the information in the ontology should
provide answers? ? Who will use and maintain the ontology?
Competency p y Questions A set of queries which place demands on the underlying ontology Ontology must be able to represent the questions using its
terminology and the answers based on the axioms Ideally, in a staged manner, where consequent questions require the input from the preceeding ones A rationale for each competency question should be given
Telecom and Informatics
22
How to build an ontology? (cont’) Natalya F. Noy and Deborah L. McGuinness. ``Ontology Development 101: A Guide to Creating Your First Ontology''. Stanford Knowledge Systems Laboratory Technical Report KSL-01-05 and Stanford Medical Informatics Technical Report SMI-2001-0880, March 2001.
Step 2: Consider reusing existing ontologies Reuse ensures interoperability and reduces costs Ontology libraries and tools for customization are required for this step Sub-steps
Discover potential reuse candidates Evaluate their usability Customize ontologies to be reused Integrate and merge to the target ontology
Step 3: Enumerate important terms in the ontology What are the terms we would like to talk about? What properties do those terms have? What would we like to say about those terms?
Telecom and Informatics
23
How to build an ontology? (cont’) Natalya F. Noy and Deborah L. McGuinness. ``Ontology Development 101: A Guide to Creating Your First Ontology''. Stanford Knowledge Systems Laboratory Technical Report KSL-01-05 and Stanford Medical Informatics Technical Report SMI-2001-0880, March 2001.
Step 4: Define classes and class hierarchy From the list created in Step 3, select the terms that describe objects
having independent existence rather than terms that describe these objects These terms will be classes in the ontology Organize the classes into a hierarchical taxonomy by asking if by being an instance of one class, the object will necessarily (i.e., by definition) be an instance of some other class If a class l A is i a superclass l off class l B, B then th every iinstance t off B is i also l an instance of A Classes as unary predicates—questions that have one argument. For example, “Is this object a wine?” Later: binary predicates (or slots)—questions that have two arguments. For example, “Is the flavor of this object strong?” “What is the flavor of this object?”
Telecom and Informatics
24
How to build an ontology? (cont’) Natalya F. Noy and Deborah L. McGuinness. ``Ontology Development 101: A Guide to Creating Your First Ontology''. Stanford Knowledge Systems Laboratory Technical Report KSL-01-05 and Stanford Medical Informatics Technical Report SMI-2001-0880, March 2001.
Step 5: Define attributes and relationships Step 4 selected classes from the list of terms we created in Step 3
Most of the remaining terms are likely to be properties of these classes For each property in the list, we must determine which class it describes Types of properties “intrinsic” “i t i i ” properties ti “extrinsic” properties parts, if the object is structured (physical or abstract) relationships l ti hi tto other th individuals i di id l Properties are inherited and should be attached to the most general class in the hierarchy
Telecom and Informatics
Agenda g Model Driven Interoperability Ontologies Intro to Ontology engineering
Semantic Web Intro RDF, RDFS, and SPARQL Tool support for RDF/RDFS
Conclusions
Telecom and Informatics
25
World Wide Web ("WWW" or simply the "Web") “A system of interlinked, hypertext documents that runs over the I t Internet. t With a W Web bb browser, a user views i W Web b pages th thatt may contain text, images, and other multimedia and navigates between them using hyperlinks” http://en.wikipedia.org/wiki/World_Wide_Web The Th success off WWW is i based b d on three th simple i l principles: i i l 1. A simple and uniform addressing schema to indentify information chunks
i.e. Uniform Resource Identifiers (URIs) 2 A simple and uniform 2. niform representation formalism to str structure ct re information chunks allowing browsers to render them i.e. Hyper Text Markup Language (HTML) 3. A simple and uniform protocol to access information chunks i.e. Hyper Text Transfer Protocol (HTTP)
Telecom and Informatics
27
Semantic Web (SW) ( ) “An extension of the current web in which information is given well-defined meaning, better enabling computers and people to work in cooperation.” (T. Berners-Lee, J. Hendler, O. Lassila, “The Semantic Web”, Scientific American, May 2001) Semantic Web is about: Web Data Annotation connecting (syntactic) Web objects, like text chunks, images, … to their semantic notion (e.g., this image is about Oslo, Arne J. Berre is a professor) Data Linking on the Web (Web of Data) g global networking g of knowledge g through g URI,, RDF,, and SPARQL (e.g., connecting my calendar with my rss feeds, my pictures, ...) Data Integration over the Web seamless integration g of data based on different conceptual p models (e.g., integrating data coming from my two favorite book sellers) Telecom and Informatics
28
Linked Data htt //li k dd t http://linkeddata.org/ / A term used to describe a recommended best practice for exposing, sharing, h i and d connecting ti pieces i off d data, t iinformation, f ti and d kknowledge l d on the Semantic Web using URIs and RDF
Telecom and Informatics
29
Data linking g on the Web principles p p Use URIs as names for things anything, not just documents you are not your homepage information resources and non-information non information resources
Use HTTP URIs globally unique names, distributed ownership allows people to look up those names
Provide useful information in RDF when someone looks up a URI
Include RDF links to other URIs to enable discovery of related information
Telecom and Informatics
30
Data integration g over the Web Data integration involves combining data residing in different sources and providing user with a unified view of these data Data integration over the Web can be implemented as follows: 1. 2. 3.
Export the data sets to be integrated as RDF graphs Merge identical resources (i.e. resources having the same URI) from different data sets Start making queries on the integrated data, queries that were not possible on the individual data sets.
Telecom and Informatics
Data integration g over the Web 1.
Export first data set as RDF graph For example the following RDF graph contains information about book “The Glass Palace” by Amitav Ghosh
http://www.w3.org/People/Ivan/CorePresentations/SWTutorial/Slides.pdf Telecom and Informatics
Data integration g over the Web 1.
Export second data set as RDF graph Information about the same book but in French this time is modeled in RDF graph below
http://www.w3.org/People/Ivan/CorePresentations/SWTutorial/Slides.pdf Telecom and Informatics
Data integration over the Web 2.
Merge identical resources (i.e. resources having the same URI) from different data sets
Same URI = Same resource
http://www.w3.org/People/Ivan/CorePresentations/SWTutorial/Slides.pdf Telecom and Informatics
Data integration over the Web Merge identical resources (i.e. resources having the same URI) from different data sets
2.
http://www.w3.org/People/Ivan/CorePresentations/SWTutorial/Slides.pdf Telecom and Informatics
Data integration over the Web 3.
Start making queries on the integrated data
A user of the second dataset may ask queries like: “give
me the title of the original book” This Thi information i f ti is i nott in i the th second d dataset d t t This information can be however retrieved from the integrated eg a ed da dataset, ase , in which c the e seco second d da dataset ase was as connected with the the first dataset
Telecom and Informatics
Semantic Web Architecture
Adapted from http://en.wikipedia.org/wiki/Semantic_Web_Stack Telecom and Informatics
UNICODE,, URI and XML UNICODE is the standard international character set E.g. used to encode the data in the repository
U Uniform if R Resource Id Identifiers tifi (URI (URIs)) id identify tif thi things and d concepts E.g. used to indentify resources on the Web and in the repository
eXtensible Markup Language (XML) is a markup language used d ffor data d t exchange h E.g. format that can be wrapped into RDF and imported into the
repository
Telecom and Informatics
RDF,, RDFS and OWL Resource Description Framework (RDF) is the HTML of th S the Semantic ti W Web b
Simple way to describe resources on the Web Based on triples V i Various serializations, i li ti iincluding l di one b based d on XML A simple ontology language (RDFS) E.g. language used to store the data in the repository
Web Ontology Language (OWL) is a more complex ontology language than RDFS Layered language based on DL Overcomes some RDF(S) limitations E.g. ontology language used to define the schemas used in the
repository
Telecom and Informatics
SPARQL and Rule Languages g g SPARQL Query language for RDF triples A protocol for querying RDF data over the Web E.g. E g language used to query the repository from the user interface
Rule languages (esp. Rule Interchange Format RIF) Extend ontology languages with proprietary axioms Based on different types of logics Description Logic Logic Programming E.g. used to enable reasoning over data to infer new knowledge
Telecom and Informatics
RDF Basics RDF is a language that enable to describe making statements on resources John is father of Bill
Statement ((or triple) p ) as a logical g formula P(x, ( , y), where the binary predicate P relates the object x to the object y Triple data model: 30)} @prefix
result: x =================
ex: . @prefix vcard: . ex:john vcard:FN "John Smith" ; vcard:N [ vcard:Given "John" ; vcard:Family "Smith" ] ; ex:hasAge 32 ; ex:marriedTo :mary . ex:mary vcard:FN "Mary Smith" ; vcard:N [ vcard:Given "Mary" ; vcard:Family "Smith" ] ; ex:hasAge 29 .
Telecom and Informatics
SPARQL Queries: Optional p Patterns “Return all people and (optionally) their spouse” PREFIX ex: SELECT ?person, ?spouse WHERE {?person ex:hasAge ?age . OPTIONAL { ?person ex:marriedTo ?spouse } }
result:
@prefix ex: . @prefix vcard: . ex:john vcard:FN "John Smith" ; vcard:N [ vcard:Given "John" ; vcard:Family "Smith" ] ; ex:hasAge 32 ; ex:marriedTo :mary . ex:mary vcard:FN "Mary Smith" ; vcard:N [ vcard:Given "Mary" ; vcard:Family "Smith" ] ; ex:hasAge 29 .
?person ?spouse =============================
Telecom and Informatics
Example – A RDF Graph Modeling Movies movie:Genre movie:Movie rdf:type
rdf:type yp
movie:Romance
rdf:type
movie:Comedy
movie:genre movie:genre movie1 movie:year y “1990”
movie:Role
movie:title movie:hasPart
rdf:type “Edward ScissorHands” r 1
“Edward ScissorHands”
movie:characterName
movie:playedBy
actor1
[http://www.openrdf.org/conferences/eswc2006/Sesa me-tutorial-eswc2006.ppt] Telecom and Informatics
Example p Query y1 Select the movies that has a character called “Edward Scissorhands” PREFIX movie: SELECT DISTINCT ?x ?t WHERE { ?x movie:title ?t ; movie:hasPart ?y . ?y movie:characterName ?z . FILTER (?z = “Edward Scissorhands”@en) }
Telecom and Informatics
Example p Query y1 PREFIX movie: SELECT DISTINCT ?x ?t WHERE { ?x movie:title ?t ; movie:hasPart ?y . ?y movie:characterName ?z . FILTER (?z = “Edward Scissorhands”@en) } Note the use of “;” This allows to create triples referring to the previous triple pattern (extended version would be ?x movie:hasPart ?y) Note as well the use of the language speciation in the filter @en Telecom and Informatics
Example p Query y2 Create a graph of actors and relate them to the movies they play in (through a new ‘playsInMovie’ p y relation)) PREFIX movie: PREFIX foaf: CONSTRUCT ?x ?x ?x ? } WHERE {
{ foaf:firstName ?fname. foaf:lastName ?lname. movie:playInMovie o e:p ay o e ? ?m
?m movie:title ?t ; y . movie:hasPart ?y ?y movie:playedBy ?x . ?x foaf:firstName ?fname. ?x foaf:lastName ?lname. }
Telecom and Informatics
Example p Query y3 Find all movies which share at least one genre with “Gone with the Wind” PREFIX movie: SELECT DISTINCT ?x2 ?t2 WHERE { ?x1 movie:title ?t1. ?x1 movie:genre ?g1. ?x2 movie:genre ?g2. ?x2 movie:title ?t2. FILTER (?t1 = “Gone with the Wind”@en && ?x1!=?x2 && ?g1=?g2) }
Telecom and Informatics
Tool Support pp for RDF/RDFS Ontology editors Protégé (http://protege.stanford.edu/)
Browser /facet (http://slashfacet.semanticweb.org/) ( p g)
RFD repositories Sesame (http://www.openrdf.org/)
APIs RDF2Go – Java (http://semanticweb.org/wiki/RDF2Go) Jena – Java (http://jena.sourceforge.net/)
Validator W3C Validator (http://www.w3.org/RDF/Validator/)
Telecom and Informatics
Developed by Stanford Medical Informatics Has a large user community (approx 30k) Support Graph view, view consistency check check, web web,
merging
No support Addition of new basic types Limited multi multi-user user support
Telecom and Informatics
/facet /facet is a generic browser for heterogeneous semantic web repositories Works on any RDFS dataset without ith t any additional dditi l configuration g facets of Select and navigate resources of any type Make selections based on properties of other other, semantically related, types Allows the inclusion of facetspecific display options
Telecom and Informatics
Sesame A framework for storage, querying and inferencing of RDF and d RDF S Schema h A Java Library for handling RDF A Database Server for (remote)access to repositories of RDF data Features:
Light-weight Light weight yet powerful Java API SeRQL, SPARQL High scalability (O(10^7) triples on desktop hardware) Various backends (Native Store Store, RDBMS, RDBMS main memory) Reasoning support Transactional support Context support RDF/XML, Turtle, N3, N-Triples Telecom and Informatics
Jena A Java framework for building Semantic Web applications Initiated by Hewlett Packard (HP) Labs Semantic Web Programme. Includes: I l d A RDF API Reading and writing RDF in RDF/XML, N3 and N-Triples An OWL API In-memory and persistent storage SPARQL query engine
Telecom and Informatics
RDF2Go RDF2Go is an abstraction over triple (and quad) stores. It allows developers to program against rdf2go interfaces and choose or change the implementation later easily It can be extended: you can create an adapter from any RDF Object Model to RDF2Go object model Directly supported implementations: Jena 2.4 Jena 2.6 Sesame 2
Telecom and Informatics
W3C Validator RDF Validator Parse RDF documents and detects errors w.r.t. the current RDF specification Available online service Downloadable code Based on ARP parser (the one also adopted in Jena)
Telecom and Informatics
Agenda g Model Driven Interoperability Ontologies Intro to Ontology engineering
Semantic Web Intro RDF, RDFS, and PARQL Tool support for RDF/RDFS
Conclusions
Telecom and Informatics
Conclusions MDI Interoperability is an important and unsolved problem Ontologies and Semantic Web technologies have significant potential for
solving interoperability problems
Ontologies and Semantic Web aim at automating tasks currently carried out by humans Ontologies are about: Formal, explicit specification of shared conceptualizations Semantic Web is about: annotation of data on the Web data linking on the Web data integration over the Web
Telecom and Informatics
106