xml and semantic web ching-long yeh 葉慶隆 department of computer science and engineering tatung...

Post on 25-Dec-2015

248 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

XML and Semantic Web

Ching-Long Yeh 葉慶隆Department of Computer Science and Engineering

Tatung Universitychingyeh@cse.ttu.edu.tw

http://www.cse.ttu.edu.tw/chingyeh

XML & SW 2

Content

• Background• XML, XML Protocol and Web Services• Semantic Web: Machine Processable Web• Ontology Basics• XML-based Ontology Languages: RDFS, DAML, OWL• DAML-S: an Ontology for Semantic Web Services• Architecture for Managing the Metadata Layer of the Semantic

Web• Conclusions

XML & SW 3

Background

• WWW– HTML

– HTTP

– Mainly man-machine interaction

• Electronic Business (EB)– Standard XML document

– XML Protocol

– AP-2-AP interaction

• Semantic Web Services– RDF

– Ontology

– Web Services, agents

XML & SW 4

What is XML?

• Extensible Markup Language• A Syntax for Documents • A Meta-Markup Language• A Structural and Semantic Language, not a Formatting

Language• Not just for Web pages

XML & SW 5

XML Standards

• DTD• Namespace• Schema• DOM• CSS, XSL-T, XSL-FO• XLink• XPointer

XML & SW 6

XML Protocol: SOAP

XML & SW 7

<?xml version=“1.0” encoding=“UTF-8”?><SOAP:Encelope xmlns:SOAP=http://schemas.xmlsoap.org/soap/envelope xmlns=“http://www.smallco.org/order” xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance”> <SOAP:Header> <msg:MessageHeader xmlns:msg=“http://www.sterlingcommerce.com/message”> <msh:From>SterlingVommerce</msg:From> <msg:To>SmallCo</msg:To> <msg:Service>Purchase</msg:Service> <msg:Action>Order</msg:Action> <msg:MessageId>bbc006751</msg:MessageId> </msg:MessageHeader> </SOAP:Header> <SOAP:Body> <PurchaseOrder SOAP:encodingStyle=http://schemas.xmlsoap.org/soap/encoding/”> <PartnerID> <Name>Small Co Enterprise</Name> <ID type=“D-U-N-S+4”>123456789-0456</ID> </PartnerID> <Contact>John Adams</Contact> <Telephone>214-340-1234</Telephone> <Order> … </Order> <ShipInfo> … </ShipInfo> </PurchaseOrder> </SOAP:Body> </SOAP:Envelope>

A SOAP Message

XML & SW 8

Web Services

Serviceregistry

Servicerequester

Serviceprovider

FindWSDL, UDDI

PublishWSDL, UDDI

Bind

Servicedescriptions

Servicedescriptions

Services

XML & SW 9

Introduction to Semantic Web

• Facilities to put machine-understandable data on the Web are becoming a high priority for many communities.

• The Web can reach its full potential only if it becomes a place where data can be shared and processed by automated tools as well as by people.

• For the Web to scale, tomorrow's programs must be able to share and process data even when these programs have been designed totally independently.

XML & SW 10

Introduction to Semantic Web

• The Semantic Web is a vision:

• See “W3C Semantic Web Activity,” by Marja-Riitta Koivunen, for more descriptions.

the idea of having data on the web defined and linked in a way that it can be used by machines not just for display purposes, but for automation, integration and reuse of data across various applications

XML & SW 11

The Semantic Web Layered Architecture

(http://www.w3.org/2001/Talks/0228-tbl/slide5-0.html)

Tim Berners-Lee:“Axioms, Architecture and Aspirations”W3C all-working group plenary Meeting28 February 2001

URI Unicode

XML Namespaces

XML Schema

Sig

RDF M&S

RDF Schema

Ontology

Rules

Logic

Proof

Trust

XML & SW 12

The Big Picture of SW

Ontology Basics

XML & SW 14

Why Develop an Ontology

• Reasons why developing an ontology:– To share common understanding of the structure of

information among people or software agents– To enable reuse of domain knowledge– To make domain assumptions explicit– To separate domain knowledge from the operational

knowledge– To analyze domain knowledge

XML & SW 15

Ontologies

• One widely cited definition of an ontology is Gruber’s [Gruber 1993] “A specification of a conceptualization”.

XML & SW 16

Ontologies

• Ontologies can be used to provide a concrete specification of term names and term meanings.

What is an Ontology?What is an Ontology?

Catalog/ID

GeneralLogical

constraints

Terms/glossary

Thesauri“narrower

term”relation

Formalis-a

Frames(properties)

Informalis-a

Formalinstance

Value Restrs.

Disjointness, Inverse, part-

of…

XML & SW 17

What Is in an Ontology?

• For the purposes of tutorial an ontology is a formal explicit description of – concepts in a domain of discourse (classes (sometimes called

concepts)),

– properties of each concept describing various features and attributes of the concept (slots (sometimes called roles or properties)), and

– restrictions on slots (facets (sometimes called role restrictions)).

• An ontology together with a set of individual instances of classes constitutes a knowledge base.

XML & SW 18

A Simple Knowledge-Engineering Methodology

• There is no one “correct” way or methodology for developing ontologies.

• Here we discuss general issues to consider and offer one possible process for developing an ontology.

XML & SW 19

A Simple Knowledge-Engineering Methodology

Step 1: Determine the domain and scope of the ontology

Step 2: Consider reusing existing ontologies

Step 3: Enumerate important terms in the ontology

Step 4: Define the classes and the class hierarchy

Step 5: Define the properties of classes—slots

Step 6: Define the facets of the slots

Step 7: Create instances

XML & SW 20

Uses Cases of Web Ontologies

• Web portal • Multimedia collections • Corporate web site management • Design documentation • Agents and services • Ubiquitous computing

XML-Based Ontology Languages

XML & SW 22

OWLIntroduction

• OWL can be used to explicitly represent the meaning of terms in vocabularies and the relationships between those terms.

– This representation of terms and their interrelationships is called an ontology.

• OWL has more facilities for expressing meaning and semantics than XML, RDF, and RDF-S, and thus OWL goes beyond these languages in its ability to represent machine interpretable content on the Web.

• OWL is a revision of the DAML+OIL web ontology language incorporating lessons learned from the design and application of DAML+OIL.

From: http://www.w3.org/TR/2004/REC-owl-features-20040210/

XML & SW 23

OWLDocument Roadmap

• OWL is part of the growing stack of W3C recommendations related to the Semantic Web.

– XML provides a surface syntax for structured documents, but imposes no semantic constraints on the meaning of these documents.

– XML Schema is a language for restricting the structure of XML documents and also extends XML with datatypes.

– RDF is a data model for objects ("resources") and relations between them, provides a simple semantics for this data model, and these data models can be represented in an XML syntax.

– RDF Schema is a vocabulary for describing properties and classes of RDF resources, with a semantics for generalization-hierarchies of such properties and classes.

– OWL adds more vocabulary for describing properties and classes: among others, relations between classes (e.g. disjointness), cardinality (e.g. "exactly one"), equality, richer typing of properties, characteristics of properties (e.g. symmetry), and enumerated classes.

From: http://www.w3.org/TR/2004/REC-owl-features-20040210/

XML & SW 24

OWLWhy

• The OWL Use Cases and Requirements Document provides more details on ontologies, motivates the need for a Web Ontology Language in terms of six use cases, and formulates design goals, requirements and objectives for OWL.

XML & SW 25

OWLSix Use Cases

• Web portal • Multimedia collections • Corporate web site management • Design documentation • Agents and services • Ubiquitous computing

XML & SW 26

OWLDesign Goals

• Shared ontologies • Ontology evolution • Ontology interoperability • Inconsistency detection • Balance of expressivity and scalability • Ease of use • Compatibility with other standards • Internationalization

XML & SW 27

OWLRequirements

• R1. Ontologies as distinct resources • R2. Unambiguous concept referencing with URIs • R3. Explicit ontology extension • R4. Commitment to ontologies • R5. Ontology metadata • R6. Versioning information • R7. Class definition primitives • R8. Property definition primitives • R9. Data types • R10. Class and property equivalence • R11. Individual equivalence • R12. Attaching information to statements • R13. Classes as instances • R14. Cardinality constraints • R15. XML syntax • R16. User-displayable labels • R17. Supporting a character model • R18. Supporting a uniqueness of Unicode strings

XML & SW 28

OWLObjectives

• O1. Layering of language features • O2. Default property values • O3. Ability to state closed worlds • O4. Range constraints on data types • O5. Chained properties • O6. Effective decision procedure • O7. Commitment to portions of ontologies • O8. View mechanism • O9. Integration of digital signatures • O10. Arithmetic primitives • O11. String manipulation • O12. Aggregation and grouping • O13. Procedural attachment • O14. Local unique names assumptions • O15. Complex data types

XML & SW 29

The Three Sublanguages of OWL

OWL Litea classification hierarchy and simple constraints

OWL DLmaximum expressiveness while retaining computational completeness

OWL Fullmaximum expressiveness and the syntactic freedom of RDF with no computational guarantees

XML & SW 30

OWL Lite Synopsis• The list of OWL Lite language constructs

RDF Schema Features: Class (Thing, Nothing) rdfs:subClassOf rdf:Property rdfs:subPropertyOf rdfs:domain rdfs:range Individual

(In)Equality: equivalentClass equivalentProperty sameAs differentFrom AllDifferent distinctMembers

Property Characteristics: ObjectProperty DatatypeProperty inverseOf TransitiveProperty SymmetricProperty FunctionalProperty InverseFunctionalProperty

Property Restrictions: Restriction onProperty allValuesFrom someValuesFrom

Restricted Cardinality: minCardinality (only 0 or 1) maxCardinality (only 0 or 1) cardinality (only 0 or 1)

Header Information: Ontology imports

Class Intersection: intersectionOf

Versioning: versionInfo priorVersion backwardCompatibleWith incompatibleWith DeprecatedClass DeprecatedPropertyAnnotation Properties:

rdfs:label rdfs:comment rdfs:seeAlso rdfs:isDefinedBy AnnotationProperty OntologyProperty

Datatypes xsd datatypes

XML & SW 31

OWL DL and Full Synopsis

• The list of OWL DL and OWL Full language constructs that are in addition to or expand those of OWL Lite is given below.

Class Axioms: oneOf, dataRange disjointWith equivalentClass(applied to class expressions) rdfs:subClassOf(applied to class expressions)

Boolean Combinations of Class Expressions: unionOf complementOf intersectionOf

Arbitrary Cardinality: minCardinality maxCardinality cardinality

Filler Information: hasValue

XML & SW 32

Language Description of OWL Lite OWL Lite RDF Schema Features

• Class: A class defines a group of individuals that belong together because they share some properties.

<owl:Class rdf:ID="Winery"/> <owl:Class rdf:ID="Region"/> <owl:Class rdf:ID="ConsumableThing"/>

• Organized in a specialization hierarchy using subClassOf

• A built-in most general class named Thing – the class of all individuals and– a superclass of all OWL classes

• A built-in most specific class named Nothing – the class that has no instances and – a subclass of all OWL classes

XML & SW 33

Language Description of OWL Lite OWL Lite RDF Schema Features

• rdfs:subClassOf: Class hierarchies may be created by making one or more statements that a class is a subclass of another class.

<owl:Class rdf:ID="Wine"> <rdfs:subClassOf rdf:resource="&food;PotableLiquid"/> <rdfs:label xml:lang="en">wine</rdfs:label> <rdfs:label xml:lang="fr">vin</rdfs:label> ... </owl:Class> <owl:Class rdf:ID="Pasta"> <rdfs:subClassOf rdf:resource="#EdibleThing" /> ... </owl:Class>

XML & SW 34

Language Description of OWL Lite OWL Lite RDF Schema Features

• rdf:Property: Properties can be used to state relationships between individuals or from individuals to data values.

hasChild

hasRelative

hasSibling

hasAge

a person a person

a person a person

a person a person

a person an integer

occurrences ofObjectProperty

occurrences ofDatatypeProperty

subclasses of the RDF class rdf:Property

XML & SW 35

Language Description of OWL Lite OWL Lite RDF Schema Features

• rdfs:subPropertyOf: – Property hierarchies may be created by making one or more statements that

a property is a subproperty of one or more other properties. – For example, hasSibling may be stated to be a subproperty of

hasRelative.

hasSibling

hasRelative

a person a person

a person a person

deduce<owl:Class rdf:ID="WineDescriptor" />

<owl:Class rdf:ID="WineColor"> <rdfs:subClassOf rdf:resource="#WineDescriptor" /> ...</owl:Class>

<owl:ObjectProperty rdf:ID="hasWineDescriptor"> <rdfs:domain rdf:resource="#Wine" /> <rdfs:range rdf:resource="#WineDescriptor" /></owl:ObjectProperty>

<owl:ObjectProperty rdf:ID="hasColor"> <rdfs:subPropertyOf rdf:resource="#hasWineDescriptor" /> <rdfs:range rdf:resource="#WineColor" /> ...</owl:ObjectProperty>

XML & SW 36

Language Description of OWL Lite OWL Lite RDF Schema Features

• rdfs:domain: A domain of a property limits the individuals to which the property can be applied.

• rdfs:range: The range of a property limits the individuals that the property may have as its value.

<owl:ObjectProperty rdf:ID="madeFromGrape"> <rdfs:domain rdf:resource="#Wine"/> <rdfs:range rdf:resource="#WineGrape"/> </owl:ObjectProperty>

<owl:ObjectProperty rdf:ID="course"> <rdfs:domain rdf:resource="#Meal" /> <rdfs:range rdf:resource="#MealCourse" /></owl:ObjectProperty>

XML & SW 37

Language Description of OWL Lite OWL Lite RDF Schema Features

• Individual : Individuals are instances of classes, and properties may be used to relate one individual to another.

<owl:Class rdf:ID="WineGrape"> <rdfs:subClassOf rdf:resource="&food;Grape" /></owl:Class>

<WineGrape rdf:ID="CabernetSauvignonGrape" />

XML & SW 38

Language Description of OWL Lite OWL Lite Equality and Inequality

• equivalentClass : Two classes may be stated to be equivalent.

<owl:Class rdf:ID="Wine"> <owl:equivalentClass rdf:resource="&vin;Wine"/></owl:Class>

The Wine class in the food ontology is precisely the same as the existing wine ontology.

• equivalentProperty: Two properties may be stated to be equivalent.

XML & SW 39

Language Description of OWL Lite OWL Lite Equality and Inequality

• sameAs: Two individuals may be stated to be the same.

<Wine rdf:ID="MikesFavoriteWine"> <owl:sameAs rdf:resource="#StGenevieveTexasWhite" /> </Wine>

• differentFrom: An individual may be stated to be different from other individuals.

<WineSugar rdf:ID="Dry" />

<WineSugar rdf:ID="Sweet"> <owl:differentFrom rdf:resource="#Dry"/> </WineSugar>

<WineSugar rdf:ID="OffDry"> <owl:differentFrom rdf:resource="#Dry"/> <owl:differentFrom rdf:resource="#Sweet"/> </WineSugar>

XML & SW 40

Language Description of OWL Lite OWL Lite Equality and Inequality

• AllDifferent: A number of individuals may be stated to be mutually distinct in one AllDifferent statement.

<owl:AllDifferent> <owl:distinctMembers rdf:parseType="Collection"> <vin:WineColor rdf:about="#Red" /> <vin:WineColor rdf:about="#White" /> <vin:WineColor rdf:about="#Rose" /> </owl:distinctMembers></owl:AllDifferent>

Note that owl:distinctMembers can only be used in combination with owl:AllDifferent

XML & SW 41

Language Description of OWL Lite OWL Lite Property Characteristics

• inverseOf: One property may be stated to be the inverse of another property.

If a property, P1, is tagged as the owl:inverseOf P2, then for all x and y: P1(x,y) iff P2(y,x)

<owl:ObjectProperty rdf:ID="hasMaker"> <rdf:type rdf:resource="&owl;FunctionalProperty" /></owl:ObjectProperty> <owl:ObjectProperty rdf:ID="producesWine"> <owl:inverseOf rdf:resource="#hasMaker" /></owl:ObjectProperty>

XML & SW 42

Language Description of OWL Lite OWL Lite Property Characteristics

• TransitiveProperty: Properties may be stated to be transitive.

If a property, P, is specified as transitive then for any x, y, and z: P(x,y) and P(y,z) implies P(x,z)

<owl:ObjectProperty rdf:ID="locatedIn"> <rdf:type rdf:resource="&owl;TransitiveProperty" /> <rdfs:domain rdf:resource="&owl;Thing" /> <rdfs:range rdf:resource="#Region" /></owl:ObjectProperty>

<Region rdf:ID="SantaCruzMountainsRegion"> <locatedIn rdf:resource="#CaliforniaRegion" /></Region>

<Region rdf:ID="CaliforniaRegion"> <locatedIn rdf:resource="#USRegion" /></Region>

x= SantaCruzMountainsRegiony= CaliforniaRegionz= USRegionP= locatedIn

x yP y zPand

implies

x zP

XML & SW 43

Language Description of OWL Lite OWL Lite Property Characteristics

• SymmetricProperty: Properties may be stated to be symmetric.

If a property, P, is tagged as symmetric then for any x and y: P(x,y) iff P(y,x)

<owl:ObjectProperty rdf:ID="adjacentRegion"> <rdf:type rdf:resource="&owl;SymmetricProperty" /> <rdfs:domain rdf:resource="#Region" /> <rdfs:range rdf:resource="#Region" /></owl:ObjectProperty>

<Region rdf:ID="MendocinoRegion"> <locatedIn rdf:resource="#CaliforniaRegion" /> <adjacentRegion rdf:resource="#SonomaRegion" /></Region>

The MendocinoRegion is adjacent to the SonomaRegion and vice-versa. The MendocinoRegion is located in the CaliforniaRegion but not vice versa.

XML & SW 44

Language Description of OWL Lite OWL Lite Property Characteristics

• FunctionalProperty : Properties may be stated to have a unique value.

If a property, P, is tagged as functional then for all x, y, and z: P(x,y) and P(x,z) implies y = z

<owl:Class rdf:ID="VintageYear" />

<owl:ObjectProperty rdf:ID="hasVintageYear"> <rdf:type rdf:resource="&owl;FunctionalProperty" /> <rdfs:domain rdf:resource="#Vintage" /> <rdfs:range rdf:resource="#VintageYear" /></owl:ObjectProperty>

XML & SW 45

Language Description of OWL Lite OWL Lite Property Characteristics

• InverseFunctionalProperty: Properties may be stated to be inverse functional.

If a property, P, is tagged as InverseFunctional then for all x, y and z: P(y,x) and P(z,x) implies y = z

<owl:ObjectProperty rdf:ID="hasMaker" /> <owl:ObjectProperty rdf:ID="producesWine"> <rdf:type rdf:resource="&owl;InverseFunctionalProperty" /> <owl:inverseOf rdf:resource="#hasMaker" /></owl:ObjectProperty>

XML & SW 46

Language Description of OWL Lite OWL Lite Property Restrictions

• allValuesFrom: The restriction allValuesFrom is stated on a property with respect to a class. <owl:Class rdf:ID="Wine"> <rdfs:subClassOf rdf:resource="&food;PotableLiquid" /> ... <rdfs:subClassOf> <owl:Restriction> <owl:onProperty rdf:resource="#hasMaker" /> <owl:allValuesFrom rdf:resource="#Winery" /> </owl:Restriction> </rdfs:subClassOf> ...</owl:Class>

The maker of a Wine must be a Winery. The allValuesFrom restriction is on the hasMaker property of this Wine class only. Makers of Cheese are not constrained by this local restriction.

XML & SW 47

Language Description of OWL Lite OWL Lite Property Restrictions

• someValuesFrom: The restriction someValuesFrom is stated on a property with respect to a class.

<owl:Class rdf:ID="Wine"> <rdfs:subClassOf rdf:resource="&food;PotableLiquid" /> <rdfs:subClassOf> <owl:Restriction> <owl:onProperty rdf:resource="#hasMaker" /> <owl:someValuesFrom rdf:resource="#Winery" /> </owl:Restriction> </rdfs:subClassOf> ...</owl:Class>

allValuesFrom For all wines, if they have makers, all the makers are wineries.someValuesFrom For all wines, they have at least one maker that is a winery.

XML & SW 48

Language Description of OWL Lite OWL Lite Property Restrictions

• minCardinality, maxCardinality : Cardinality is stated on a property with respect to a particular class.

– Cardinality expressions with values limited to 0 or 1 are part of OWL Lite. – This permits the user to indicate 'at least one', 'no more than one', and

'exactly one'. – Positive integer values other than 0 and 1 are permitted in OWL DL. – owl:maxCardinality can be used to specify an upper bound.

owl:minCardinality can be used to specify a lower bound.

XML & SW 49

Language Description of OWL Lite OWL Lite Property Restrictions

• cardinality: Cardinality is provided as a convenience when it is useful to state that a property on a class has both minCardinality 0 and maxCardinality 0 or both minCardinality 1 and maxCardinality 1.

• owl:cardinality, which permits the specification of exactly the number of elements in a relation.

<owl:Class rdf:ID="Vintage"> <rdfs:subClassOf> <owl:Restriction> <owl:onProperty rdf:resource="#hasVintageYear"/> <owl:cardinality rdf:datatype="&xsd;nonNegativeInteger">1</owl:cardinality> </owl:Restriction> </rdfs:subClassOf></owl:Class>

XML & SW 50

Language Description of OWL Lite OWL Lite Class Intersection

• intersectionOf: OWL Lite allows intersections of named classes and restrictions.

<owl:Class rdf:ID="WhiteWine"> <owl:intersectionOf rdf:parseType="Collection"> <owl:Class rdf:about="#Wine" /> <owl:Restriction> <owl:onProperty rdf:resource="#hasColor" /> <owl:hasValue rdf:resource="#White" /> </owl:Restriction> </owl:intersectionOf></owl:Class>

XML & SW 51

Language Description of OWL Lite OWL Datatypes

• OWL uses most of the built-in XML Schema datatypes. The following datatypes are recommended for use with OWL:

xsd:string xsd:normalizedString xsd:boolean xsd:decimal xsd:float xsd:double xsd:integer xsd:nonNegativeInteger xsd:positiveInteger xsd:nonPositiveInteger xsd:negativeInteger xsd:long xsd:int xsd:short xsd:byte xsd:unsignedLong xsd:unsignedInt xsd:unsignedShort xsd:unsignedBytexsd:hexBinary xsd:base64Binary xsd:dateTime xsd:time xsd:date xsd:gYearMonth xsd:gYear xsd:gMonthDay xsd:gDay xsd:gMonth xsd:anyURI xsd:token xsd:language xsd:NMTOKEN xsd:Name xsd:NCName

<owl:Class rdf:ID="VintageYear" />

<owl:DatatypeProperty rdf:ID="yearValue"> <rdfs:domain rdf:resource="#VintageYear" /> <rdfs:range rdf:resource="&xsd;positiveInteger"/></owl:DatatypeProperty>

XML & SW 52

Language Description of OWL Lite OWL Lite Header Information

• OWL Lite supports notions of ontology inclusion and relationships and attaching information to ontologies.

<owl:Ontology rdf:about=""> <owl:versionInfo>v 1.17 2003/02/26 12:56:51 mdean</owl:versionInfo> <rdfs:comment>An example ontology</rdfs:comment> <owl:imports rdf:resource="http://www.example.org/foo"/></owl:Ontology>

XML & SW 53

Language Description of OWL Lite OWL Lite Annotation Properties and Versioning

• OWL Lite allows annotations on classes, properties, individuals and ontology headers.

• RDF already has a small vocabulary for describing versioning information. OWL significantly extends this vocabulary.

XML & SW 54

Incremental Language Description of OWL DL and OWL Full

• Both OWL DL and OWL Full use the same vocabulary although OWL DL is subject to some restrictions.

• Roughly, OWL DL requires type separation (a class can not also be an individual or property, a property can not also be an individual or class).

• This implies that restrictions cannot be applied to the language elements of OWL itself (something that is allowed in OWL Full).

• Furthermore, OWL DL requires that properties are either ObjectProperties or DatatypeProperties

• The OWL Semantics and Abstract Syntax document explains the distinctions and limitations.

• We describe the OWL DL and OWL Full vocabulary that extends the constructions of OWL Lite below.

XML & SW 55

Incremental Language Description of OWL DL and OWL Full

• oneOf: (enumerated classes): Classes can be described by enumeration of the individuals that make up the class.

<owl:Class rdf:ID="WineColor"> <rdfs:subClassOf rdf:resource="#WineDescriptor"/> <owl:oneOf rdf:parseType="Collection"> <owl:Thing rdf:about="#White"/> <owl:Thing rdf:about="#Rose"/> <owl:Thing rdf:about="#Red"/> </owl:oneOf></owl:Class>

XML & SW 56

Incremental Language Description of OWL DL and OWL Full

• hasValue: (property values): A property can be required to have a certain individual as a value (also sometimes referred to as property values).

<owl:Class rdf:ID="Burgundy"> ... <rdfs:subClassOf> <owl:Restriction> <owl:onProperty rdf:resource="#hasSugar" /> <owl:hasValue rdf:resource="#Dry" /> </owl:Restriction> </rdfs:subClassOf></owl:Class>

XML & SW 57

Incremental Language Description of OWL DL and OWL Full

• disjointWith: Classes may be stated to be disjoint from each other.

<owl:Class rdf:ID="Pasta"> <rdfs:subClassOf rdf:resource="#EdibleThing"/> <owl:disjointWith rdf:resource="#Meat"/> <owl:disjointWith rdf:resource="#Fowl"/> <owl:disjointWith rdf:resource="#Seafood"/> <owl:disjointWith rdf:resource="#Dessert"/> <owl:disjointWith rdf:resource="#Fruit"/></owl:Class>

XML & SW 58

Incremental Language Description of OWL DL and OWL Full

• unionOf, complementOf, intersectionOf (Boolean combinations): OWL DL and OWL Full allow arbitrary Boolean combinations of classes and restrictions: unionOf, complementOf, and intersectionOf.

<owl:Class rdf:ID="Fruit"> <owl:unionOf rdf:parseType="Collection"> <owl:Class rdf:about="#SweetFruit" /> <owl:Class rdf:about="#NonSweetFruit" /> </owl:unionOf></owl:Class>

<owl:Class rdf:ID="Fruit"> <rdfs:subClassOf rdf:resource="#SweetFruit" /> <rdfs:subClassOf rdf:resource="#NonSweetFruit" /></owl:Class>

XML & SW 59

Incremental Language Description of OWL DL and OWL Full

• minCardinality, maxCardinality, cardinality (full cardinality): While in OWL Lite, cardinalities are restricted to at least, at most or exactly 1 or 0, full OWL allows cardinality statements for arbitrary non-negative integers.

<owl:Class rdf:ID="Vintage"> <rdfs:subClassOf> <owl:Restriction> <owl:onProperty rdf:resource="#hasVintageYear"/> <owl:cardinality rdf:datatype="&xsd;nonNegativeInteger">1</owl:cardinality> </owl:Restriction> </rdfs:subClassOf></owl:Class>

XML & SW 60

Incremental Language Description of OWL DL and OWL Full

• complex classes : – In many constructs, OWL Lite restricts the syntax to single class names

(e.g. in subClassOf or equivalentClass statements). – OWL Full extends this restriction to allow arbitrarily complex class

descriptions, consisting of enumerated classes, property restrictions, and Boolean combinations.

– Also, OWL Full allows classes to be used as instances (and OWL DL and OWL Lite do not).

XML & SW 61

RDF M&S

• RDF (Resource Description Framework)– Beyond Machine readable to Machine understandable

• RDF consists of two parts– RDF Model (a set of triples)– RDF Syntax (different XML serialization syntaxes)

• RDF Schema for definition of Vocabularies (simple Ontologies) for RDF (and in RDF)

XML & SW 62

RDF Data Model

• Resources– A resource is a thing you talk about (can reference)– Resources have URI’s– RDF definitions are themselves Resources (linkage, see

requirement 1)

• Properties – slots, define relationships to other resources or atomic values

• Statements– “Resource has Property with Value”– (Values can be resources or atomic XML data)

• Similar to Frame Systems

XML & SW 63

A Simple Example

• Statement– “Ora Lassila is the creator of the resource

http://www.w3.org/Home/Lassila”

• Structure– Resource (subject) http://www.w3.org/Home/Lassila– Property (predicate) http://www.schema.org/#Creator– Value (object) "Ora Lassila”

• Directed graph

http://www.w3.org/Home/Lassilas:Creator

Ora Lassila

XML & SW 64

EmailName

s:Creator

http://www.w3.org/Home/Lassila

Another Example

• To add properties to Creator, point through an intermediate Resource.

Person://fi/654645635

Ora Lassila lassila@w3.org

XML & SW 65

Example: Bag

• The students incourse 6.001 are Amy, Tim,John, Mary,and Sue

Rdf:Bag

/Students/Amy

/Students/Tim

/Students/John

/Students/Mary

/Students/Sue

bagid1

/courses/6.001

students

rdf:type

rdf:_1

rdf:_2

rdf:_3

rdf:_4

rdf:_5

XML & SW 66

rdf:_1

rdf:_2

rdf:_3

rdf:typesource

ftp.eu.net

ftp.cs.purdue.edu

ftp.x.org

Example: Alternative

• The source code for X11 may be found at ftp.x.org, ftp.cs.purdue.edu, or ftp.eu.net

altid

rdf:Althttp://x.org/package/X11

XML & SW 67

RDF Syntax I

• Data model does not enforce particular syntax• Specification suggests many different syntaxes

based on XML• General form:

<rdf:RDF> <rdf:Description about="http://www.w3.org/Home/Lassila"> <s:Creator>Ora Lassila</s:Creator> <s:createdWith rdf:resource=“http://www.w3c.org/amaya”/> </rdf:Description></rdf:RDF>

Starts an RDF-Description

Properties

Subject (OID)

Literal

Resource (possibly another RDF-description)

XML & SW 68

Resulting Graph

<rdf:RDF> <rdf:Description about="http://www.w3.org/Home/Lassila"> <s:Creator>Ora Lassila</s:Creator> <s:createdWith rdf:resource=“http://www.w3c.org/amaya”/> </rdf:Description></rdf:RDF>

http://www.w3c.org/amaya

http://www.w3.org/Home/Lassila

Ora Lassila

s:createdWiths:Creator

XML & SW 69

RDF Syntax II: Syntactic Varieties

<s:Homepage rdf:about="http://www.w3.org/Home/Lassila” s:Creator=“Ora Lassila”/>

<s:createdWith> <s:HTMLEditor rdf:about=“http://www.w3c.org/amaya”/> </s:createdWith> </s:Homepage>

Typing InformationIn-Element Property

Property

Subject (OID)

http://www.w3c.org/amaya

http://www.w3.org/Home/Lassila

Ora Lassila

s:createdWiths:Creator

HTMLEditor

s:Homepagerdf:type

rdf:type

XML & SW 70

RDF Schema (RDFS)

• RDF just defines the data model

• Need for definition of vocabularies for the data model - an

Ontology Language!

• The RDF Schema mechanism provides a basic type system for

use in RDF models.

• The RDF schema specification language is less expressive, but

much simpler to implement, than full predicate calculus languages

such as CycL and KIF.

XML & SW 71

Most Important Modeling Primitives

• Core Classes– Root-Class rdfs:Resource

– MetaClass rdfs:Class

– Literals rdfs:Literal

• rdfs:subclassOf-property

• Inherited from RDF: properties (slots)

• rdfs:domain & rdfs:range

• rdfs:label, rdfs:comment, etc.

• Inherited from RDF: InstanceOf (rdf:type)

XML & SW 72

DAML+OIL: an Ontology Language

• Extension of RDF Schema• Ontology Language DAML+OIL: Result of a Joint

(European + US-American) Committee• Extension of RDF Schema

– Class Expressions (Intersection, Union, Complement)– XML Schema Datatypes– Enumerations– Property Restrictions

• Cardinality Constraints

• Value Restrictions

OWL-S: An Ontology for Semantic web Service

XML & SW 74

Motivation Tasks of DAML-S

• Users and software agents should be able to discover, invoke, compose, and monitor Web resources offering particular services and having particular properties.

• As part of the DARPA Agent Markup Language program, we have begun to develop an ontology of services, called DAML-S.

XML & SW 75

Top Level of the Service Ontology

Service

Resource

ServiceGrounding

ServiceProfile

ServiceModel

provides presents

supports described by

(what it does)

(how it works)(how to access it)

XML & SW 76

Process Modeling Ontology

Applications of Ontology

XML & SW 78

Ontology library sites

• http://protege.stanford.edu/plugins/owl/ontologies.html• http://www.daml.org/ontologies/keyword.html• http://www.mindswap.org/2003/owl/

XML & SW 79

Ontology

XML & SW 80

travel

XML & SW 81

travel

XML & SW 82

wine

XML & SW 83

wine

XML & SW 84travel

XML & SW 85travel

XML & SW 86travel

XML & SW 87wine

XML & SW 88wine

Protégé 使用說明

XML & SW 90

編輯新檔

XML & SW 91

選擇 OWL Files

XML & SW 92

XML & SW 93

增加 class

XML & SW 94

更名所要的 class name

XML & SW 95

編輯完的 Class 跟 slot的增加

XML & SW 96

儲存檔案選擇 namespace

XML & SW 97

增加 plugin

XML & SW 98

Query

XML & SW 99

Protégé輸出 HTML

XML & SW 100

Semantic Web Applications

XML & SW 102

An Architecture of Semantic Community Web Portals

(From: http://www9.org/w9cdrom/134/134.html)

XML & SW 103

A KM Framework over SW

(From: http://www2002.org/CDROM/poster/130.pdf)

XML & SW 104

top related