RDFS

54
Chapter 9

description

RDFS. Chapter 9. 9 RDFS (RDF Schema). RDFS Part of the Ontological Primitive layer Adds features to RDF Provides standard vocabulary for describing concepts (meta-vocabulary) Chapter Overview of RDFS features Introduces classes, individuals, and properties. 9.1 RDFS Overview. - PowerPoint PPT Presentation

Transcript of RDFS

Page 1: RDFS

Chapter 9

Page 2: RDFS

9 RDFS (RDF Schema)RDFS

Part of the Ontological Primitive layer

Adds features to RDFProvides standard

vocabulary for describing concepts (meta-vocabulary)

ChapterOverview of RDFS featuresIntroduces classes,

individuals, and properties

RDF Schema Individuals

XML and XMLS Datatypes

URIs and Namespaces

Applications

Ontology Languages (OWL Full, OWL DL, and OWL Lite)

RDF and RDF/ XML

Page 3: RDFS

9.1 RDFS Overview

RDFS (RDF Schema)Domain-neutral lightweight schema languageProvides basic structures: classes & propertiesBuilds on RDF

Specificationhttp://www.w3.org/TR/rdf-schema/

NamespacePrefix: rdfsName: http://www.w3.org/2000/01/rdf-schema#

Page 4: RDFS

9.2 RDFS Features•RDFS (RDF Schema)

▫Defines additional modeling primitives▫Extends RDF using a formal class concept▫Permits restricting properties and classes▫Uses RDF/XML syntax

•RDFS vocabulary▫Collection of class & property descriptions▫Can be combined▫Describes domain using RDF resources that

define characteristics of other resources▫Managed by decentralized communities of

interest

Page 5: RDFS

9.3 RDFS Classes

RDFSExtends the RDF type conceptProvides formal mechanisms for classes

which represent conceptsPredefines several core classes

Page 6: RDFS

9.3.1 RDFS Class ConceptRDFS classes

Sets used to describe concepts as categories of resources, typically for a particular domain

Templates used to instantiate objectsHave associated resources (instances of the class)

Resources can be multi-classedSet of all instances called “class extension”

Similar to OOP classes (but no behavior) Properties are not tied to specific classes

More like entities in data models or RDBMS tables

Page 7: RDFS

9.3.2 Predefined RDFS Classes

RDFS supports formal vocabularies by formalizing the concepts ofResourceClassPropertyDatatypeLiteralXML literal

using predefined resources

Page 8: RDFS

9.3.2.1 Defining RDFS Classes

rdfs:Class typeIs defined as an rdf:typeEstablishes class membershipSuperseded by OWL classesUsually uses the typed node syntax

Classes are RDF resources whose rdf:type is “rdfs:Class”

RDFS uses RDF to define itself

Page 9: RDFS

9.3.2.2 RDFS Resources

rdfs:Resource classBuilt-in classRoot class of all RDF resources and classes

Similar to Java Object class

All RDFS classes and RDF resources are subclasses of rdfs:Resource

Page 10: RDFS

9.3.2.3 RDF Properties

rdf:Property classBuilt-in classRoot class of all RDF & RDFS properties

Similar to Java Property class

RDFS uses the RDF definition of propertiesUse rdf prefix, not rdfs

All RDFS properties are instances of the rdf:Property class

Page 11: RDFS

9.3.2.4 RDFS Classes

rdfs:Class classAll resources that have an rdf:type of

rdfs:class are RDFS classesDefined recursively

rdfs:Class resource is an rdfs:ClassInstances are classesRoot class of all RDFS classes

Similar to Java Class class

Page 12: RDFS

9.3.2.5 RDFS Literals

rdfs:Literal classSet of atomic plain and typed literal valuesCan be used to specify restriction that

property’s values (range) must be string literals

Instances are literal values such as strings and integers

Used by OWL directly as a datatypeImplicitly part of all ontologies

All RDFS literals are instances of rdfs:Literal

Page 13: RDFS

9.3.2.6 XML Literals

rdf:XMLLiteral classSubclass of rdfs:LiteralRepresents XML strings within RDF

statementsOnly datatype predefined in RDF

Use rdf prefix, not rdfsCan also include language identifiersSubset of XMLS datatypes

Page 14: RDFS

9.3.2.7 RDFS Datatype Class• Datatypes define subsets of literal values that

have associated semantics• rdfs:Datatype class

▫Parent class for all RDFS datatypes▫Instances of the class are also implicitly subclasses

of rdfs:Literal▫Provide mechanism for referring to XMLS

datatypes• Example

▫&xsd;nonNegativeInteger is instance of rdfs:Datatype and subclass of rdfs:Literal

• Although legal, defining new instances discouraged

Page 15: RDFS

9.3.2.8 RDFS Predefined Class SummaryPredefined Class Description

rdfs:Resource Root class of all resources

rdf:Property Class of all properties

rdfs:Class Class of all classes

rdfs:Literal Class of all literal values

rdf:XMLLiteral XML strings within RDF statements

rdfs:Datatype Identifies datatypes

Page 16: RDFS

9.4 Individuals

IndividualsInstances of user-defined classesAssociated to classes using rdf:type propertyCan be assigned to one or more classesCovered in more detail in Chapter 15

Page 17: RDFS

9.5 Properties

RDFS enhances RDF Properties, allowing the specification of restrictions or constraintsLimit the values a property can haveLimit which properties a resource can have

RDFS provides vocabulary forCore propertiesClarification propertiesContainer descriptionsDocumentation properties

Page 18: RDFS

9.5.1 Core Properties

Core properties provided by RDFSrdf:type

Relate individuals to classesrdfs:subClassOf

Relate classes to classesrdfs:subPropertyOf

Relate properties to propertiesrdfs:range & rdfs:domain

Relate properties to classes

All properties are instances of rdf:Property

Page 19: RDFS

9.5.1.1 RDF Type Property

rdf:Type propertyAsserts that an individual is a member of a

particular classDomain: any ResourceRange: Instance of rdfs:Class

Page 20: RDFS

9.5.1.2 Specializing Classes•Classes are organized into generalization/

specialization hierarchy (hyponymy)•rdfs:subClassOf property

▫Defines a specialization relationship▫Specified in the subclass▫Value is the superclass▫Domain: Instance of rdfs:Class▫Range: Instance of rdfs:Class

•Similar to subset relation between classes•A class can be a subclass of multiple

superclasses

Page 21: RDFS

9.5.1.2 Specializing Classes cont’dSyntax

<rdfs:Class rdfID="subclassURIref"> <rdfs:subClassOf rdf:resource="superclassURIref"/></rdfs:Class>

Example<rdfs:Class rdfID="spaghettiDish">

<rdfs:subClassOf rdf:resource="#pastaDish"/></rdfs:Class>

All classes automatically subclass of rdfs:ResourceSubclasses “inherit” superclass’ property restrictionsTransitive property

C is a subclass of B ∧ B is a subclass of A → C is a subclass of A

Instance of subclass has properties of both subclass and superclass

Page 22: RDFS

9.5.1.3 Specializing Properties• Properties can also be organized into hierarchies• rdfs:subPropertyOf property

▫ Defines specialization relationship b/w properties▫ Specified in the subproperty▫ Value is the superproperty▫ Domain: Instance of rdf:Property▫ Range: Instance of rdf:Property

• Subproperties can have multiple superproperties• Transitive, like rdf:subClassOf• Example

▫ <rdf:Property rdf:ID="faxNumber"> <rdfs:subPropertyOf rdf:resource="#phoneNumber"/></rdf:Property>

Page 23: RDFS

9.5.1.4 Restricting Property Values• rdfs:Range property

▫Restricts values of properties to classes or datatypes/data ranges

▫Applies to all uses of the property▫Domain: Instance of rdf:Property▫Range: Instance of rdfs:Class

• Example:▫ <rdf:Property rdf:ID="ownedBy">

<rdfs:range rdf:resource="#Person"/></rdf:Property> // Only a Person can own something

▫ <Restaurant rdf:ID="JoesPizzaria"> <restaurantName>Joe’s Pizzaria</restaurantName> <ownedBy rdf:resource="#Person123"/></Restaurant> // Valid only if Person123 is an instance of Person

Page 24: RDFS

9.5.1.4 Restricting Values cont’d• Use global property restrictions with care

▫Might want something to be owned by a company!• Recommended: make property name specific

▫“restaurantOwnerIndividual”, not “ownedBy”• Range restrictions should not be separate URIs

▫Causes scalability & usability difficulties• Multiple range restrictions can be specified

▫ If 2 or more rdfs:range properties specified, resources used as property values must be instances of all (intersection of) classes specified in rdfs:range properties

• Can infer that individual is member of a class if it is the value of a property that has a range restriction

Page 25: RDFS

9.5.1.5 Restricting Property Subjects• rdfs:domain property

▫Restricts the subject of a property to instances of a class, or to a specified intersection of classes

▫Applies to all uses of the property▫Domain: Instance of rdf:Property▫Range: Instance of rdfs:Class

• Example▫ <rdf:Property rdf:ID="ownedBy">

<rdfs:domain rdf:resource="#Restaurant"/></rdf:Property> // Only a Restaurant can be ownedBy something

▫ <Restaurant rdf:ID="JoesPizzaria"> <restaurantName>Joe’s Pizzaria</restaurantName> <ownedBy rdf:resource="#Person123"/></Restaurant> // Valid since JoesPizzaria instance of Restaurant

Page 26: RDFS

9.5.1.5 Restricting Subjects cont’dCan infer that individual belongs to class if

it’s subject of a property that has a range restriction

Multiple range restrictions can be specifiedIf 2 or more rdfs:domain properties

specified, resources used as property’s subject must be instances of all (intersection of) classes specified in rdfs:domain properties

Page 27: RDFS

9.5.1.6 RDFS Core Properties Summary

Core Property Description

rdf:Type Identifies the class of an individual

rdfs:subClassOf Creates a specialization of a class

rdfs:subPropertyOf

Creates a specialization of a property

rdfs:range Limits the values of a property

rdfs:domain Limits the individuals that can have a property

Page 28: RDFS

9.5.2 RDFS Clarification Properties

Clarification propertiesReference related resources (rdf:seeAlso)Identify a resource’s source

(rdf:isDefinedBy)Non-core properties

Page 29: RDFS

9.5.2.1 Referencing Related Resources• rdf:seeAlso property

▫ Identifies a resource that provides additional information about subject

▫Domain & Range: Instance of rdfs:Resource• Syntax

▫<rdf:seeAlso rdf:resource="referencedURIref"/>• Example

▫<menu:Pie rdf:ID="chocolatePie"> <rdf:seeAlso rdf:resource="#frenchSilkPie"/></menu:Pie>

• Weak semantics, but occasionally useful

Page 30: RDFS

9.5.2.2 Identifying A Resource’s Sourcerdfs:isDefinedBy property

Subproperty of rdfs:seeAlsoRelates resource to other resource that defines

itDomain & Range: Instance of rdfs:Resource

Syntax<rdfs:isDefinedBy rdf:resource="definingURIref"/>

Can be used to explicitly identify the defining RDF vocabulary for a resourceUseful if the URI portion of a resource does not

indicate the schema of the resource

Page 31: RDFS

rdfs:Container classSuperclass of the 3 RDF

containers (Bag, Seq, Alt)Encapsulates things into groups referenced

as a wholeHelps manage description of container types

9.5.3(.1) RDFS Container Classes

Page 32: RDFS

9.5.3.2&3 Membership Propertiesrdfs:ContainerMembershipProperty class

Used to instantiate individual subproperties for accessing members of containers

Subproperties are named rdf:_1, rdf:_2, … rdf:_n

Specific types of rdfs:member propertyrdfs:member property

Superproperty of all container membership properties (rdf:_n)

Page 33: RDFS

9.5.4 RDFS Documentation PropertiesUsed to associate human-readable names,

labels, and descriptions of resourcesrdfs:label & rdfs:comment propertiesCan be used by user interface software to

provide documentation to developersCan supply multiple values using xml:lang

attributes to support internationalizationBest practice: always label and comment

classes and properties

Page 34: RDFS

• rdfs:Label property▫Provides human-readable version of resource

name▫Short textual string useful in user interface▫Domain: Instance of rdfs:Resource▫Range: Instance of rdfs:Literal

• Syntax▫ <rdfs:label>labelString</rdfs:label>

• Example▫ <menu:Dessert rdf:ID="KLP">

<rdfs:label>Key Lime Pie</rdfs:label></menu:Dessert>

• Best practice: label everything! Use xml:lang attributes to support labels in other languages

9.5.4.1 Labeling Resources

Page 35: RDFS

9.5.4.2 Commenting Resources• rdfs:comment property

▫ Used to describe a resource with free-form text▫ Longer textual string describing the resource▫ Domain: Instance of rdfs:Resource▫ Range: Instance of rdfs:Literal

• Syntax▫ <rdfs:comment>commentString</rdfs:comment>

• Example▫ <menu:Dessert rdf:ID="KLP">

<rdfs:comment>Key Lime Pie is a dessert made from milk, juice, and crackers </rdfs:comment></menu:Dessert>

• Best practice: use instead of <!-- XML comment -->Comment everything, use xml:lang attribute

Page 36: RDFS

9.6 RDFS Summary•RDFS

▫Provides many of the features required in a Semantic Web language by extending RDF with additional semantic features

▫Supports specification of limited ontologies through standardization of Classes Properties Individuals Generalizations Property restrictions

Page 37: RDFS

9.6 RDFS Summary cont’d• Complete example showing most RDFS features

<rdfs:Class rdf:ID="KeyLimePie"> <rdfs:label>Key Lime Pie</rdfs:label> <rdfs:comment>This class represents Key lime pies</rdfs:comment> <rdfs:subClassOf rdf:resource="#Dessert"/> <rdfs:subClassOf rdf:resource="#FoodItem"/>

</rdfs:Class><rdf:Property rdf:ID="primaryIngredient">

<rdfs:subPropertyOf rdf:resource="#ingredient"/> <rdfs:range rdf:resource="&rdfs;Literal"/>

</rdf:Property><Pie rdf:ID="KLP">

<primaryIngredient>condensed milk</primaryIngredient></Pie><rdfs:Datatype rdf:about="http://www.restaurant.org/calories">

<rdfs:subClassOf rdf:resource="&xsd;positiveInteger"></rdfs:Datatype>

Page 38: RDFS

9.6 RDFS Summary cont’dCategory Construct Domain Range

Core Properties

rdf:Type &rdfs;Resource &rdfs;Class

rdfs:subClassOf &rdfs;Class &rdfs;Class

rdfs:subPropertyOf

&rdfs;Property &rdfs;Property

Constraint Properties

rdfs:range &rdfs;Property &rdfs;Class

rdfs:domain &rdfs;Property &rdfs;Class

Clarification Properties

rdfs:seeAlso &rdfs;Resource &rdfs;Resource

rdfs:isDefinedBy &rdfs;Resource &rdfs;Resource

Documentation Properties

rdfs:label &rdfs;Resource &rdfs;Literal

rdfs:comment &rdfs;Resource &rdfs;Literal

Page 39: RDFS

9.6 Why RDFS is not Enough

RDFSAdds critical ontological primitivesProvides several features for specifying

ontologiesDoes not support sufficient property restrictions

No restrictions on cardinalityProvides few descriptors to support inferencing

Can’t conclude that an object belongs to a class based on its property values

Can’t do class unions, complementsOWL provides the missing pieces

Page 40: RDFS

OWLChapter 10

Page 41: RDFS

10(.1) OWL (Web Ontology Language)• OWL

▫ Logical layer▫ Builds on & extends RDF

& RDFS▫ Adds language features for

describing ontologies▫ Developed to satisfy

requirements of Semantic Web

• Chapter▫ Overview of OWL features▫ Introduces the 3 species

OWL Lite OWL Full OWL DL

RDF Schema Individuals

XML and XMLS Datatypes

URIs and Namespaces

Applications

Ontology Languages (OWL Full, OWL DL, and OWL Lite)

RDF and RDF/ XML

Page 42: RDFS

10.1.1 OWL Definition

OWLW3C’s recommended ontology languageUsed to define an ontology for a particular

domainOWL ontology

Set of axioms describing classes, properties, and relationships between them

RDF/XML used to define conforming instance data

Page 43: RDFS

10.1.2 OWL History•OWL evolved from

▫DARPA Agent Markup Language (DAML)▫Ontology Inference Layer (OIL)▫Both combined into DAML+OIL

•DARPA Agent Markup Language (DAML)▫Developed by DARPA & MIT

Defense Advanced Research Projects Agency Research branch of US Dept of Defense

▫Initiated Aug 2000 Led by Dr. James Hendler

Page 44: RDFS

10.1.2 OWL History cont’d

Ontology Inference Layer (OIL)European Union developed in parallel with

DAMLDAML+OIL

Merged in March 2001Designed to enable agent communication“Thin layer” on top of RDFSStarting point for Web Ontology Working

Group

Page 45: RDFS

10.1.2 OWL History cont’dW3C WebOnt Working Group

Led by Hendler and Guus SchreiberMission

Define a formal semantics to precisely define the meaning of expressions in a language and valid inferences that can be made from those expressions

Use XML syntax and datatypesRetain compatibility with XML & RDF if

possible

OWL adopted by W3C as official recommendation February 10, 2004

Page 46: RDFS

10.1.3 OWL Specification

OWL Overview (introduction)http://www.w3.org/TR/owl-features/

OWL Guide (good examples)http://www.w3.org/TR/owl-guide/

OWL Reference (reference guide)http://www.w3c.org/TR/owl-ref/

OWL Semantics and Abstract Syntax (abstruse!)http://www.w3.org/owl-semantics/

Page 47: RDFS

10.1.3 OWL Specification cont’dOWL Test Cases (used to certify

applications)http://www.w3.org/owl-test/

OWL Use Cases & Requirements (scenarios)http://www.w3.org/webont-req

NamespacePrefix: owlName: http://www.w3.org/2002/07/owl#Mime type: application/rdf+xml

Page 48: RDFS

10.1.4 OWL Features

OWLProvides features that extend RDFSSupports better inferencingEnables the creation of domain-agile tools

and reasoners to provide new functionalityTransitions effort from coding complex

software to representing information

Page 49: RDFS

10.2 OWL Species

Three dialects (or species) of OWLOWL FullOWL DLOWL Lite

Each supports a different group of users that need a different level of expressional capability

Page 50: RDFS

10.2.1 OWL Full

Complete set of all language constructsSuperset of RDF

All RDF documents are OWL Full documentsNo restrictions

RDF statements can be mixed in as desiredNo guarantee of decidability!NP-complete problem

Page 51: RDFS

10.2.2 OWL DL

Sublanguage of OWL DLDescription Language (DL) dialectRestricts use of some OWL Full constructsPrimary goal: Keep OWL decidable

Guarantee that computations will finish in a finite amount of time

Compromise between expressivity and decidable reasoning

Extension of restricted view of RDF

Page 52: RDFS

10.2.3 OWL Lite

Sublanguage of OWL DLMinimal set of features for users that want to

benefit from ontologies without a significant investment in encoding complex relationships

Provides easier transition path for upgrading existing database, XML, or RDF(S) data

Eases burden on tool developersExtension of restricted view of RDF

Page 53: RDFS

10.2.4 OWL Species SummarySpecies Summary Subset of

Constructs

Restrictions on Use

OWL Full Superset of RDF

OWL DL Same constructs as OWL Full, but restrictions on use

OWL Lite Subset of OWL Full constructs, same restrictions as OWL DL

√ √

Page 54: RDFS

10.3 OWL Language Summary•OWL (Web Ontology Language)

▫New language supporting Semantic Web▫Defined by the W3C▫Three species

OWL Full: complete language OWL DL: decidable sublanguage OWL Lite: simplified sublanguage

•Section 3 covers OWL Lite•Section 4 covers OWL DL, OWL Full, and

OWL applications