rdfs

100 %
0 %
Information about rdfs
Education

Published on June 20, 2007

Author: Aric85

Source: authorstream.com

Inferring and Discovering Relationships using RDF Schemas:  Inferring and Discovering Relationships using RDF Schemas Roger L. Costello David B. Jacobs The MITRE Corporation (The creation of this tutorial was sponsored by DARPA) Slide2:  Acknowledgments We are very grateful to the Defense Agency Research Projects Agency (DARPA) for funding the creation of this tutorial. We are especially grateful to Murray Burke (DARPA) and John Flynn (BBN) for making it all happen. Special thanks to Stephen Dyer for creating the labs. Special thanks to Jon Hanna and Frank Manola for answering our many questions. Purpose of RDF Schema:  Purpose of RDF Schema The purpose of RDF Schema is to provide an XML vocabulary to: express classes and their (subclass) relationships. define properties and associate them with classes. The benefit of an RDF Schema is that it facilitates inferencing on your data, and enhanced searching. Slide4:  Ocean Lake BodyOfWater River Stream Properties: length: Literal emptiesInto: BodyOfWater Sea NaturallyOccurringWaterSource RDF Schema is about creating Taxonomies! Tributary Brook Rivulet Slide5:  Yangtze.rdf andlt;?xml version='1.0'?andgt; andlt;River rdf:ID='Yangtze' xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns='http://www.geodesy.org/water/naturally-occurring#'andgt; andlt;lengthandgt;6300 kilometersandlt;/lengthandgt; andlt;emptiesInto rdf:resource='http://www.china.org/geography#EastChinaSea'/andgt; andlt;/Riverandgt; What inferences can be made with this data? Inferences are made by examining a taxonomy that contains River. See next slide. What inferences can be made on this RDF/XML, given the taxonomy on the last slide? Slide6:  Ocean Lake BodyOfWater River Stream Properties: length: Literal emptiesInto: BodyOfWater Sea NaturallyOccurringWaterSource Tributary Brook Inference Engine Inferences: - Yangtze is a Stream - Yangtze is an NaturallyOcurringWaterSource - http://www.china.org/geography#EastChinaSea is a BodyOfWater Yangtze.rdf Rivulet andlt;?xml version='1.0'?andgt; andlt;River rdf:ID='Yangtze' xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns='http://www.geodesy.org/water/naturally-occurring#'andgt; andlt;lengthandgt;6300 kilometersandlt;/lengthandgt; andlt;emptiesInto rdf:resource='http://www.china.org/geography#EastChinaSea'/andgt; andlt;/Riverandgt; How does a taxonomy facilitate searching?:  How does a taxonomy facilitate searching? Ocean Lake BodyOfWater River Stream Properties: length: Literal emptiesInto: BodyOfWater Sea NaturallyOccurringWaterSource Tributary Brook The taxonomy shows that when searching for 'streams', any RDF/XML that uses the class Brook, Rivulet, River, or Tributary are relevant. See next slide. Rivulet Slide8:  Ocean Lake BodyOfWater River Stream Properties: length: Literal emptiesInto: BodyOfWater Sea NaturallyOccurringWaterSource Tributary Brook andlt;?xml version='1.0'?andgt; andlt;River rdf:ID='Yangtze' xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns='http://www.geodesy.org/water/naturally-occurring#'andgt; andlt;lengthandgt;6300 kilometersandlt;/lengthandgt; andlt;emptiesInto rdf:resource='http://www.china.org/geography#EastChinaSea'/andgt; andlt;/Riverandgt; Search Engine Results: - Yangtze is a Stream, so this document is relevant to the query. 'Show me all documents that contain info about Streams' Yangtze.rdf Rivulet You now know everything about RDF Schemas!:  You now know everything about RDF Schemas! RDF Schemas is all about defining taxonomies (class hierarchies). As we've seen, a taxonomy can be used to make inferences and to facilitate searching. That's all there is to RDF Schemas! The rest is just syntax … The previous slide showed the taxonomy in a graphical form. Obviously, we need to express the taxonomy in a form that is machine-processable. RDF Schemas provides an XML vocabulary to express taxonomies. RDF Schema provides an XML vocabulary to express taxonomies:  RDF Schema provides an XML vocabulary to express taxonomies Ocean Lake BodyOfWater River Stream Properties: length: Literal emptiesInto: BodyOfWater Sea NaturallyOccurringWaterSource Tributary Brook XML NaturallyOccurringWaterSource.rdfs Rivulet 'express as' Classes/properties are defined using RDF/XML!:  Classes/properties are defined using RDF/XML! RDF Schema uses the RDF/XML design pattern to define classes and properties. Recall the RDF/XML design pattern: andlt;?xml version='1.0'?andgt; andlt;Class rdf:ID='resource' xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns='uri'andgt; andlt;property rdf:resource='…'/andgt; andlt;propertyandgt;valueandlt;/propertyandgt; ... andlt;/Classandgt; [Use this syntax if the value of the property is a resource] [Use this syntax if the value of the property is a literal] Defining a class (e.g., River) :  Defining a class (e.g., River) andlt;?xml version='1.0'?andgt; andlt;rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:rdfs='http://www.w3.org/2000/01/rdf-schema#' xml:base='http://www.geodesy.org/water/naturally-occurring'andgt; andlt;rdfs:Class rdf:ID='River'andgt; andlt;rdfs:subClassOf rdf:resource='#Stream'/andgt; andlt;/rdfs:Classandgt; andlt;rdfs:Class rdf:ID='Stream'andgt; andlt;rdfs:subClassOf rdf:resource='#NaturallyOccurringWaterSource'/andgt; andlt;/rdfs:Classandgt; ... andlt;/rdf:RDFandgt; This is read as: 'I hereby define a River Class. River is a subClassOf Stream.' 'I hereby define a Stream Class. Stream is a subClassOf NaturallyOccurringWaterSource.' ... NaturallyOccurringWaterSource.rdfs (snippet) All classes and properties are defined within rdf:RDF Defines the River class Defines the Stream class Since the Stream class is defined in the same document we can reference it using a fragment identifier. 1 2 Assigns a namespace to the taxonomy! 3 4 5 rdfs:Class:  rdfs:Class This type is used to define a class. The rdf:ID provides a name for the class. The contents are used to indicate the members of the class. The contents are ANDed together. Equivalent!:  Equivalent! andlt;rdfs:Class rdf:ID='River'andgt; andlt;rdfs:subClassOf rdf:resource='#Stream'/andgt; andlt;/rdfs:Classandgt; andlt;rdf:Description rdf:ID='River'andgt; andlt;rdf:type rdf:resource='http://www.w3.org/2000/01/rdf-schema#Class'/andgt; andlt;rdfs:subClassOf rdf:resource='#Stream'/andgt; andlt;/rdf:Descriptionandgt; rdfs:subClassOf:  rdfs:subClassOf Stream River This represents the set of Streams, i.e., the set of instances of type Stream. This represents the set of Rivers, i.e., the set of instances of type River. Slide16:  rdfs:subClassOf Use this property to indicate a subclass relationship between one class and another class. You may specify zero, one, or multiple rdfs:subClassOf properties. Zero: if you define a class without specifying rdfs:subClassOf then you are implicitly stating that the class is a subClassOf rdfs:Resource (the root of all classes). One: if you define a class by specifying one rdfs:subClassOf then you are indicating that the class is a subclass of that class. Multiple: if you define a class by specifying multiple rdfs:subClassOf properties then you are indicating that the class is a subclass of each of the other classes. Example: consider the River class: suppose that it has two rdfs:subClassOf properties - one that specifies Stream and a second that specifies SedimentContainer. Thus, the two rdfs:subClassOf properties indicate that a River is a Stream and a SedimentContainer. That is, each instance of River is both a Stream and a SedimentContainer. Example of multiple rdfs:subClassOf properties:  Example of multiple rdfs:subClassOf properties andlt;rdfs:Class rdf:ID='River'andgt; andlt;rdfs:subClassOf rdf:resource='#Stream'/andgt; andlt;rdfs:subClassOf rdf:resource='http://www.containers.org#SedimentContainer'/andgt; andlt;/rdfs:Classandgt; Stream River SedimentContainer - a River is both a Stream and a SedimentContainer. The conjunction (AND) of two subClassOf statements is a subset of the intersection of the classes. rdfs:subClassOf is transitive:  rdfs:subClassOf is transitive Ocean Lake BodyOfWater River Stream Sea NaturallyOccurringWaterSource Tributary Brook Rivulet Consider the above class hierarchy. It says, for example, that: - A Rivulet is a Brook. - A Brook is a Stream. Therefore, since subClassOf is transitive, a Rivulet is a Stream. (Note that a Rivulet is also a NaturallyOccurringWaterSource.) Slide19:  Defining a property (e.g., emptiesInto) andlt;?xml version='1.0'?andgt; andlt;rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:rdfs='http://www.w3.org/2000/01/rdf-schema#' xml:base='http://www.geodesy.org/water/naturally-occurring'andgt; andlt;rdf:Property rdf:ID='emptiesInto'andgt; andlt;rdfs:domain rdf:resource='#River'/andgt; andlt;rdfs:range rdf:resource='#BodyOfWater'/andgt; andlt;/rdf:Propertyandgt; ... andlt;/rdf:RDFandgt; This is read as: 'I hereby define an emptiesInto Property. The domain (class) in which emptiesInto is used is River. The range (of values) for emptiesInto are instances of BodyOfWater.' That is, the emptiesInto Property relates (associates) a River to a BodyOfWater. NaturallyOccurringWaterSource.rdfs (snippet) River BodyOfWater emptiesInto domain range Slide20:  rdf:Property Equivalent!:  Equivalent! andlt;rdf:Property rdf:ID='emptiesInto'andgt; andlt;rdfs:domain rdf:resource='#River'/andgt; andlt;rdfs:range rdf:resource='#BodyOfWater'/andgt; andlt;/rdf:Propertyandgt; andlt;rdf:Description rdf:ID='emptiesInto'andgt; andlt;rdf:type rdf:resource='http://www.w3.org/1999/02/22-rdf-syntax-ns#Property'/andgt; andlt;rdfs:domain rdf:resource='#River'/andgt; andlt;rdfs:range rdf:resource='#BodyOfWater'/andgt; andlt;/rdf:Descriptionandgt; Careful: Class and Property are in different namespaces:  Careful: Class and Property are in different namespaces Class is in the rdfs namespace. Property is in the rdf namespace. rdfs:range:  rdfs:range Use this property to indicate the type of values that a property will contain. You may specify zero, one, or multiple rdfs:range properties. Zero: if you define a property without specifying rdfs:range then you are providing no information about the type of value that the property will contain. One: if you define a property by specifying one rdfs:range then you are indicating that the property will contain a value whose type is that specified by rdfs:range. Multiple: if you define a property by specifying multiple rdfs:range properties then you are indicating that the property will contain a value which belongs to every class defined by the rdfs:range properties. Example: consider the property emptiesInto: suppose that it has two rdfs:range properties - one that specifies BodyOfWater and a second that specifies CoastalWater. Thus, the two rdfs:range properties indicate that emptiesInto will contain a value that is a BodyOfWater and a CoastalWater. Example of multiple rdfs:range properties:  Example of multiple rdfs:range properties Slide25:  rdfs:domain Use this property to indicate the classes that a property will be used with. You may specify zero, one, or multiple rdfs:domain properties. Zero: if you define a property without specifying rdfs:domain then you are providing no information about the class that the property will be used with, i.e., the property can be used with any class. One: if you define a property by specifying one rdfs:domain then you are indicating that the property will be used with the class specified by rdfs:domain. Multiple: if you define a property by specifying multiple rdfs:domain properties then you are indicating that the property will be used with a class which belongs to every class defined by the rdfs:domain properties. Example: consider the property emptiesInto: suppose that it has two rdfs:domain properties - one that specifies River and a second that specifies Vessel. Thus, the two rdfs:domain properties indicate that emptiesInto will be used with a class that is a River and a Vessel. Slide26:  Example of multiple rdfs:domain properties Note that properties are defined separately from classes:  Note that properties are defined separately from classes With most Object-Oriented languages when a class is defined the properties (attributes) are simultaneously defined. For example, 'I hereby define a Rectangle class, and its attributes are length and width.' With RDF Schema things are different. You define a class (and indicate its relationships to other classes). Separately, you define properties and then associate them with a class! For the above example you would define the Rectangle class (and indicate that it is a subclass of GeometricObject). Separately, you then define a length property, indicate its range of value, and then indicate that length may be used with the Rectangle class. (Thus, if you have an untyped Resource with a length property you can infer the Resource is a Rectangle.) Likewise for the width property. Advantage of separately defining classes and properties:  Advantage of separately defining classes and properties As we have seen, the RDF Schema approach is to define a class, and then separately define properties and state that they are to be used with the class. The advantage of this approach is that anyone, anywhere, anytime can create a property and state that it is usable with the class! The XML Representation of the taxonomy:  The XML Representation of the taxonomy andlt;?xml version='1.0'?andgt; andlt;rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:rdfs='http://www.w3.org/2000/01/rdf-schema#' xml:base='http://www.geodesy.org/water/naturally-occurring'andgt; andlt;rdfs:Class rdf:ID='River'andgt; andlt;rdfs:subClassOf rdf:resource='#Stream'/andgt; andlt;/rdfs:Classandgt; andlt;rdfs:Class rdf:ID='Stream'andgt; andlt;rdfs:subClassOf rdf:resource='#NaturallyOccurringWaterSource'/andgt; andlt;/rdfs:Classandgt; andlt;rdf:Property rdf:ID='emptiesInto'andgt; andlt;rdfs:domain rdf:resource='#River'/andgt; andlt;rdfs:range rdf:resource='#BodyOfWater'/andgt; andlt;/rdf:Propertyandgt; andlt;rdf:Property rdf:ID='length'andgt; andlt;rdfs:domain rdf:resource='#River'/andgt; andlt;rdfs:range rdf:resource='http://www.w3.org/2000/01/rdf-schema#Literal'/andgt; andlt;/rdf:Propertyandgt; ... andlt;/rdf:RDFandgt; NaturallyOccurringWaterSource.rdfs (snippet) Literal value:  Literal value andlt;rdf:Property rdf:ID='length'andgt; andlt;rdfs:domain rdf:resource='#River'/andgt; andlt;rdfs:range rdf:resource='http://www.w3.org/2000/01/rdf-schema#Literal'/andgt; andlt;/rdf:Propertyandgt; A literal type is a simple, untyped string. NaturallyOccurringWaterSource Ontology!:  NaturallyOccurringWaterSource Ontology! NaturallyOccurringWaterSource.rdfs defines a set of classes and how the classes are related. It defines a set of properties and indicates the type of values they may have and what classes they may be associated with. That is, it defines an ontology for NaturallyOccurringWaterSources! Inferring a resource's class from the properties' domain:  Inferring a resource's class from the properties' domain Design to facilitate inferencing!:  Design to facilitate inferencing! andlt;?xml version='1.0'?andgt; andlt;River rdf:ID='Yangtze' xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns='http://www.geodesy.org/water/naturally-occurring#'andgt; andlt;lengthandgt;6300 kilometersandlt;/lengthandgt; andlt;emptiesInto rdf:resource='http://www.china.org/geography#EastChinaSea'/andgt; andlt;/Riverandgt; Yangtze.rdf With this design: We are able to infer (using the ontology) that the value of emptiesInto is a BodyOfWater. Suppose instead we had designed it as such: andlt;?xml version='1.0'?andgt; andlt;River rdf:ID='Yangtze' xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns='http://www.geodesy.org/water/naturally-occurring#'andgt; andlt;lengthandgt;6300 kilometersandlt;/lengthandgt; andlt;emptiesIntoandgt;East China Seaandlt;/emptiesIntoandgt; andlt;/Riverandgt; Now we can make no inferences about emptiesInto, since it just contains a literal. Lesson Learned: to maximize the utility of your data, design to facilitate inferencing! Slide34:  Example #2: WaterwayObstacle Taxonomy NaturallyOccurringWaterSource Taxonomy (Updated):  NaturallyOccurringWaterSource Taxonomy (Updated) Slide36:  What inferences can be made on this RDF/XML, given the taxonomies on the last two slides? Slide37:  Ocean Lake BodyOfWater River Stream Properties: length: Literal emptiesInto: BodyOfWater obstacle: http://www.ussdams.org#Dam Sea NaturallyOcurringWaterSource Tributary Brook andlt;?xml version='1.0'?andgt; andlt;River rdf:ID='Yangtze' xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns='http://www.geodesy.org/water/naturally-occurring#'andgt; andlt;lengthandgt;6300 kilometersandlt;/lengthandgt; andlt;emptiesInto rdf:resource='http://www.geodesy.org/water#EastChinaSea'/andgt; andlt;obstacle rdf:resource='http://www.china.org/geography/river/dam#ThreeGorges'/andgt; andlt;/Riverandgt; Inference Engine Inferences: - Yangtze is a Stream - Yangtze is an NaturallyOcurringWaterSource - http://www.geodesy.org/water#EastChinaSea is a BodyOfWater - http://www.china.org/geography/river/dam#ThreeGorges is a Dam Yangtze.rdf Rivulet Levee Dam WaterwayObstacle Defining the obstacle property:  Defining the obstacle property Example #3:  Example #3 Defining length with no Type Information :  Defining length with no Type Information A resource that doesn't have a type specified may nonetheless be typed!:  A resource that doesn't have a type specified may nonetheless be typed! andlt;lengthandgt; andlt;rdf:Descriptionandgt; andlt;rdf:valueandgt;6300andlt;/rdf:valueandgt; andlt;uom:unitsandgt;kilometersandlt;/uom:unitsandgt; andlt;/rdf:Descriptionandgt; andlt;/lengthandgt; There is no type shown for this resource. But that doesn't mean that this resource has no type. It only means that no type has been specified in this RDF/XML instance. In the RDF Schema we can specify what its type is. andlt;rdf:Property rdf:ID='length'andgt; andlt;rdfs:domain rdf:resource='#River'/andgt; andlt;rdfs:range rdf:resource='http://www.nist.org#Distance'/andgt; andlt;/rdf:Propertyandgt; Advantage: now we can infer that the contents of length is of type Distance. Lesson Learned:  Lesson Learned andlt;rdf:Property rdf:ID='length'andgt; andlt;rdfs:domain rdf:resource='#River'/andgt; andlt;rdfs:range rdf:resource='http://www.nist.org#Distance'/andgt; andlt;/rdf:Propertyandgt; This RDF Schema: Does not mandate that the RDF/XML instance specify a type, e.g., andlt;lengthandgt; andlt;uom:Distanceandgt; andlt;rdf:valueandgt;6300andlt;/rdf:valueandgt; andlt;uom:unitsandgt;kilometersandlt;/uom:unitsandgt; andlt;/uom:Distanceandgt; andlt;/lengthandgt; It is perfectly fine to keep that class information isolated to the RDF Schema, e.g., andlt;lengthandgt; andlt;rdf:Descriptionandgt; andlt;rdf:valueandgt;6300andlt;/rdf:valueandgt; andlt;uom:unitsandgt;kilometersandlt;/uom:unitsandgt; andlt;/rdf:Descriptionandgt; andlt;/lengthandgt; (However, it is better practice to expose the type information in the RDF/XML instance.) Best Practice Best Practice Example #4:  Example #4 Slide44:  Here are the two XML Schema datatypes being referenced in the RDF Defining properties with typed literals:  Defining properties with typed literals Indicating that rdf:resource is identifying a "datatype":  Indicating that rdf:resource is identifying a 'datatype' andlt;rdf:Property rdf:ID='length'andgt; andlt;rdfs:domain rdf:resource='#River'/andgt; andlt;rdfs:range rdf:resource='http://www.nist.org#kilometer'/andgt; andlt;/rdf:Propertyandgt; andlt;rdfs:Datatype rdf:about='http://www.nist.org#kilometer'andgt; andlt;rdfs:subClassOf rdf:resource='http://www.w3.org/2001/XMLSchema#integer'/andgt; andlt;/rdfs:Datatypeandgt; To indicate that this is referencing a datatype, we use this Here's how to read this: I hereby declare that this: http://www.nist.org#kilometer represents a 'datatype'. And this datatype is a subclass of: http://www.w3.org/2001/XMLSchema#integer Thus, we are clearly identifying that the length property associates River with a datatype. (In all of the other properties we have seen they associated a Class with another Class. Here we have the case of a property associating a Class with a datatype.) If the RDF Schema indicates a datatype then the RDF/XML instance must use rdf:datatype:  If the RDF Schema indicates a datatype then the RDF/XML instance must use rdf:datatype andlt;rdf:Property rdf:ID='length'andgt; andlt;rdfs:domain rdf:resource='#River'/andgt; andlt;rdfs:range rdf:resource='http://www.nist.org#kilometer'/andgt; andlt;/rdf:Propertyandgt; andlt;length rdf:datatype='http://www.nist.org#kilometer'andgt;6300andlt;/lengthandgt; andlt;rdf:Property rdf:ID='length'andgt; andlt;rdfs:domain rdf:resource='#River'/andgt; andlt;rdfs:range rdf:resource='http://www.w3.org/2000/01/rdf-schema#Literal'/andgt; andlt;/rdf:Propertyandgt; andlt;lengthandgt;6300andlt;/lengthandgt; This means that the property's value must be a typed literal. This means that the property's value is an untyped string Slide48:  Example #5 TerraFirmaSensorReading Taxonomy Slide49:  What inferences can be made on this RDF/XML, given the taxonomy on the last slide? Slide50:  Slide51:  Classes inherit properties from their ancestors:  Classes inherit properties from their ancestors Slide53:  Table showing what properties are applicable to each class Defining length and emptiesInto:  Defining length and emptiesInto andlt;?xml version='1.0'?andgt; andlt;rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:rdfs='http://www.w3.org/2000/01/rdf-schema#' xml:base='http://www.geodesy.org/water/naturally-occurring'andgt; andlt;rdf:Property rdf:ID='length'andgt; andlt;rdfs:domain rdf:resource='#Stream'/andgt; andlt;rdfs:range rdf:resource='http://www.nist.org#Distance'/andgt; andlt;/rdf:Propertyandgt; andlt;rdf:Property rdf:ID='emptiesInto'andgt; andlt;rdfs:domain rdf:resource='#River'/andgt; andlt;rdfs:range rdf:resource='#BodyOfWater'/andgt; andlt;/rdf:Propertyandgt; ... andlt;/rdf:RDFandgt; NaturallyOccurringWaterSource.rdfs (snippet) Slide55:  Properties from all superclasses are inherited andlt;rdfs:Class rdf:ID='River'andgt; andlt;rdfs:subClassOf rdf:resource='#Stream'/andgt; andlt;rdfs:subClassOf rdf:resource='http://www.containers.org#SedimentContainer'/andgt; andlt;/rdfs:Classandgt; Stream River SedimentContainer - inherits both length and SedimentType. Properties: length Properties: SedimentType Defining a property to be applicable to multiple classes:  Defining a property to be applicable to multiple classes River domain Vessel - emptiesInto is to be used in instances that are of type River and Vessel. How do we define emptiesInto so that it may be used with a River class OR a Vessel class? andlt;rdf:Property rdf:ID='emptiesInto'andgt; andlt;rdfs:domain rdf:resource='#River'/andgt; andlt;rdfs:domain rdf:resource='http://www.containers.org#Vessel'/andgt; andlt;rdfs:range rdf:resource='#BodyOfWater'/andgt; andlt;/rdf:Propertyandgt; Answer: associate emptiesInto with a superclass:  Answer: associate emptiesInto with a superclass River Vessel VesselOrRiver Properties: emptiesInto: BodyOfWater Both Vessel and River inherit the property emptiesInto. Thus, emptiesInto may be used with the Vessel class or the River class. rdfs:subPropertyOf:  rdfs:subPropertyOf length officialLength 'rdfs:subPropertyOf' estimatedLength Property Hierarchy: You can define a property to be a specialization of another property: 'rdfs:subPropertyOf' Notes: 1. The subproperties inherit the rdfs:range and rdfs:domain values from the parent property. 2. If a subproperty is true, then its parent property is true, e.g., if the Yangtze River has an officialLength of 6300 kilometers then it also has a length of 6300 kilometers. Slide59:  Table showing what properties are applicable to each class Stream Brook Rivulet length emptiesInto obstacle X X X X X Properties Classes River Tributary X X estimatedLength officialLength X X X X X X X X X X Making inferences with subproperties:  Making inferences with subproperties Another example of inferencing using property hierarchies:  Another example of inferencing using property hierarchies parent father Property Hierarchy: 'rdfs:subPropertyOf' andlt;?xml version='1.0'?andgt; andlt;Person rdf:ID='Mary' xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns='http://www.genealogy.org#'andgt; andlt;fatherandgt; andlt;Person rdf:about='#John'/andgt; andlt;/fatherandgt; andlt;/Personandgt; Inference: Since father is a subproperty of parent, we can infer that Mary has a parent named John. 'Mary has a father named John.' Slide62:  rdfs:subPropertyOf Use this property to create a property that specializes another property. You may specify zero, one, or multiple rdfs:subPropertyOf properties. Zero: if you define a property without specifying rdfs:subPropertyOf then you are providing no relationship information to another property. One: if you define a property by specifying one rdfs:subPropertyOf then you are indicating that the property is a subproperty of the other property. Multiple: if you define a property by specifying multiple rdfs:subPropertyOf properties then you are indicating that the property is a subproperty of each of the other properties. Example: consider the length property: suppose that it has two rdfs:subPropertyOf properties - one that specifies Distance and a second that specifies Measurement. Thus, the two rdfs:subPropertyOf properties indicate that a length is a Distance and a Measurement. A subproperty can narrow the range and/or domain:  A subproperty can narrow the range and/or domain emptiesInto: BodyOfWater emptiesIntoSea: Sea Property Hierarchy: 'rdfs:subPropertyOf' This subproperty narrows the range to Sea. andlt;rdf:Property rdf:ID='emptiesInto'andgt; andlt;rdfs:domain rdf:resource='#River'/andgt; andlt;rdfs:range rdf:resource='#BodyOfWater'/andgt; andlt;/rdf:Propertyandgt; andlt;rdf:Property rdf:ID='emptiesIntoSea'andgt; andlt;rdfs:subPropertyOf rdf:resource='#emptiesInto'/andgt; andlt;rdfs:range rdf:resource='#Sea'/andgt; andlt;/rdf:Propertyandgt; The property emptiesInto permits a range of BodyOfWater. This property, however, narrows the range to Sea. Slide64:  rdfs:label, rdfs:comment andlt;rdf:Property rdf:ID='Creator'andgt; andlt;rdfs:label xml:lang='EN'andgt;Author/Creatorandlt;/rdfs:labelandgt; andlt;rdfs:comment xml:lang='EN'andgt;The person or organization primarily responsible for creating the intellectual content of the resource. For example, authors in the case of written documents, artists, photographers, or illustrators in the case of visual resources. andlt;/rdfs:commentandgt; andlt;/rdf:Propertyandgt; rdfs:label is used to provide a human-readable version of the property/class name. rdfs:comment is used to provide a human-readable description of the property/class. Example #6:  Example #6 Slide66:  A snippet of the Publishing Ontology andlt;?xml version='1.0'?andgt; andlt;rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:rdfs='http://www.w3.org/2000/01/rdf-schema#' xml:base='http://www.publishing.org'andgt; andlt;rdfs:Class rdf:ID='Article'andgt; andlt;rdfs:subClassOf rdf:resource='http://www.w3.org/2000/01/rdf-schema#Resource'/andgt; andlt;/rdfs:Classandgt; andlt;rdf:Property rdf:ID='paragraph'andgt; andlt;rdfs:domain rdf:resource='#Article'/andgt; andlt;rdfs:range rdf:resource='http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral'/andgt; andlt;/rdf:Propertyandgt; … andlt;/rdf:RDFandgt; The paragraph property is to be used within an Article class. The contents will be any well-formed XML. PublishingOntology.rdfs (snippet) Slide67:  Distinguish between rdfs:Literal and rdfs:XMLLiteral rdfs:Literal denotes a simple, untyped string. rdfs:XMLLiteral denotes any well-formed XML string. Example #7:  Example #7 andlt;?xml version='1.0'?andgt; andlt;Catalogue rdf:ID='BookCatalogue' xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns='http://www.publishing.org#' xmlns:dc='http://pur1.org/metadata/dublin-core#' xml:base='http://www.bn.com'andgt; andlt;itemandgt; andlt;Book rdf:ID='_0-06-099325-2' xml:base='http://www.publishing.org/book'andgt; andlt;dc:Titleandgt;Lateral Thinkingandlt;/dc:Titleandgt; andlt;dc:Creatorandgt;Edward de Bonoandlt;/dc:Creatorandgt; andlt;dc:Dateandgt;1973andlt;/dc:Dateandgt; andlt;dc:Publisherandgt;Harper andamp;amp; Rowandlt;/dc:Publisherandgt; andlt;/Bookandgt; andlt;/itemandgt; andlt;itemandgt; andlt;Book rdf:ID='_0-440-34319-4' xml:base='http://www.publishing.org/book'andgt; andlt;dc:Titleandgt;Illusions: The Adventures of a Reluctant Messiahandlt;/dc:Titleandgt; andlt;dc:Creatorandgt;Richard Bachandlt;/dc:Creatorandgt; andlt;dc:Dateandgt;1977andlt;/dc:Dateandgt; andlt;dc:Publisherandgt;Dell Publishing Co.andlt;/dc:Publisherandgt; andlt;/Bookandgt; andlt;/itemandgt; ... andlt;/Catalogueandgt; Barnes_and_Noble_BookCatalogue.rdf Create an RDF Schema for the following RDF/XML instance: Another snippet of the Publishing Ontology:  Another snippet of the Publishing Ontology andlt;?xml version='1.0'?andgt; andlt;rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:rdfs='http://www.w3.org/2000/01/rdf-schema#' xml:base='http://www.publishing.org'andgt; andlt;rdfs:Class rdf:ID='Catalogue'andgt; andlt;rdfs:subClassOf rdf:resource='http://www.w3.org/2000/01/rdf-schema#Resource'/andgt; andlt;/rdfs:Classandgt; andlt;rdfs:Class rdf:ID='Book'andgt; andlt;rdfs:subClassOf rdf:resource='http://www.w3.org/2000/01/rdf-schema#Resource'/andgt; andlt;/rdfs:Classandgt; andlt;rdf:Property rdf:ID='item'andgt; andlt;rdfs:domain rdf:resource='#Catalogue'/andgt; andlt;rdfs:range rdf:resource='#Book '/andgt; andlt;/rdf:Propertyandgt; ... andlt;/rdf:RDFandgt; PublishingOntology.rdfs The Dublin Core properties - Title, Creator, Date, Publisher - are defined in the Dublin Core RDF Schema (see next slide). Slide70:  andlt;?xml version='1.0'?andgt; andlt;rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:rdfs='http://www.w3.org/TR/1999/PR-rdf-schema-19990303#' xml:base='http://pur1.org/metadata/dublin-core'andgt; andlt;rdf:Description rdf:ID='Title'andgt; andlt;rdf:type rdf:resource='http://www.w3.org/1999/02/22-rdf-syntax-ns#Property'/andgt; andlt;rdfs:labelandgt;Titleandlt;/rdfs:labelandgt; andlt;rdfs:commentandgt;The name given to the resource, usually by the Creator or Publisher.andlt;/rdfs:commentandgt; andlt;/rdf:Descriptionandgt; andlt;rdf:Description rdf:ID='Creator'andgt; andlt;rdf:type rdf:resource='http://www.w3.org/1999/02/22-rdf-syntax-ns#Property'/andgt; andlt;rdfs:labelandgt;Author/Creatorandlt;/rdfs:labelandgt; andlt;rdfs:commentandgt;The person or organization primarily responsible for creating the intellectual content of the resource. For example, authors in the case of written documents, artists, photographers, or illustrators in the case of visual resources.andlt;/rdfs:commentandgt; andlt;/rdf:Descriptionandgt; andlt;rdf:Description ID='Date'andgt; andlt;rdf:type rdf:resource='http://www.w3.org/1999/02/22-rdf-syntax-ns#Property'/andgt; andlt;rdfs:labelandgt;Dateandlt;/rdfs:labelandgt; andlt;rdfs:commentandgt;A date associated with the creation or availability of the resource. Such a date is not to be confused with one belonging in the Coverage element, which would be associated with the resource only insofar as the intellectual content is somehow about that date. Recommended best practice is defined in a profile of ISO 8601 [Date and Time Formats (based on ISO8601), W3C Technical Note, http://www.w3.org/TR/NOTE-datetime] that includes (among others) dates of the forms YYYY and YYYY-MM-DD. In this scheme, for example, the date 1994-11-05 corresponds to November 5, 1994.andlt;/rdfs:commentandgt; andlt;/rdf:Descriptionandgt; andlt;rdf:Description ID='Publisher'andgt; andlt;rdf:type rdf:resource='http://www.w3.org/1999/02/22-rdf-syntax-ns#Property'/andgt; andlt;rdfs:labelandgt;Publisherandlt;/rdfs:labelandgt; andlt;rdfs:commentandgt;The entity responsible for making the resource available in its present form, such as a publishing house, a university department, or a corporate entity.andlt;/rdfs:commentandgt; andlt;/rdf:Descriptionandgt; ... andlt;/rdf:RDFandgt; Dublin Core RDF Schema Equivalent!:  Equivalent! andlt;rdf:Description rdf:ID='Title'andgt; andlt;rdf:type rdf:resource='http://www.w3.org/1999/02/22-rdf-syntax-ns#Property'/andgt; andlt;rdfs:labelandgt;Titleandlt;/rdfs:labelandgt; andlt;rdfs:commentandgt;The name given to the resource, usually by the Creator or Publisher.andlt;/rdfs:commentandgt; andlt;/rdf:Descriptionandgt; andlt;rdf:Property rdf:ID='Title'andgt; andlt;rdfs:labelandgt;Titleandlt;/rdfs:labelandgt; andlt;rdfs:commentandgt;The name given to the resource, usually by the Creator or Publisher.andlt;/rdfs:commentandgt; andlt;/rdf:Propertyandgt; Metaclasses:  Metaclasses A metaclass is a class of classes. Example: The instances of an Aircraft class are: F16, B1, F117, etc. The properties of Aircraft are: wingspan, range, weight, etc. Each of the instances of Aircraft are themselves classes! The instances of a F16 class are specific F16 planes. The properties of F16 are: tailNum, deployedAt, etc. The Aircraft class is a metaclass! Aircraft is a Metaclass:  Aircraft is a Metaclass Aircraft F16 B1 F117 F16 XEJ-10 Tango-1 Defining Aircraft and its Instances:  Defining Aircraft and its Instances andlt;?xml version='1.0'?andgt; andlt;rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:rdfs='http://www.w3.org/2000/01/rdf-schema#' xml:base='http://www.nato.org/aircraft'andgt; andlt;rdfs:Class rdf:ID='Aircraft'/andgt; andlt;rdfs:Class rdf:ID='F16'/andgt; ... andlt;rdf:Property rdf:ID='wingspan'andgt; andlt;rdfs:domain rdf:resource='#Aircraft'/andgt; andlt;rdfs:range rdf:resource='http://www.w3.org/2000/01/rdf-schema#Literal'/andgt; andlt;/rdf:Propertyandgt; ... andlt;rdf:Property rdf:ID='deployedAt'andgt; andlt;rdfs:domain rdf:resource='#F16'/andgt; andlt;rdfs:range rdf:resource='http://www.w3.org/2000/01/rdf-schema#Literal'/andgt; andlt;/rdf:Propertyandgt; ... andlt;/rdf:RDFandgt; Aircraft.rdfs Properties of Aircraft Properties of F16 Classes Sample Instances:  Sample Instances andlt;?xml version='1.0'?andgt; andlt;Aircraft rdf:about='http://www.nato.org/Aircraft.rdfs#F16' xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns='http://www.nato.org/aircraft#'andgt; andlt;wingspanandgt;10 metersandlt;/wingspanandgt; ... andlt;/Aircraftandgt; F16.rdf andlt;?xml version='1.0'?andgt; andlt;F16 rdf:ID='XEJ-10' xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns='http://www.military.org/aircraft#'andgt; andlt;deployedAtandgt;Persian Gulfandlt;/deployedAtandgt; ... andlt;/F16andgt; XEJ-10.rdf F16 is being used as an instance! F16 is being used as a class! Equivalent!:  Equivalent! andlt;?xml version='1.0'?andgt; andlt;Aircraft rdf:about='http://www.nato.org/Aircraft.rdfs#F16' xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns='http://www.nato.org/aircraft#'andgt; andlt;wingspanandgt;10 metersandlt;/wingspanandgt; ... andlt;/Aircraftandgt; andlt;?xml version='1.0'?andgt; andlt;rdf:Description rdf:about='http://www.nato.org/Aircraft.rdfs#F16' xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns='http://www.nato.org/aircraft#'andgt; andlt;rdf:type rdf:resource='http://www.nato.org/Aircraft.rdfs#Aircraft'/andgt; andlt;wingspanandgt;10 metersandlt;/wingspanandgt; ... andlt;/rdf:Descriptionandgt; Merge Descriptions:  Merge Descriptions andlt;rdfs:Class rdf:ID='F16'/andgt; andlt;?xml version='1.0'?andgt; andlt;rdf:Description rdf:about='http://www.nato.org/Aircraft.rdfs#F16' xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns='http://www.nato.org/aircraft#'andgt; andlt;rdf:type rdf:resource='http://www.nato.org/Aircraft.rdfs#Aircraft'/andgt; andlt;wingspanandgt;10 metersandlt;/wingspanandgt; ... andlt;/rdf:Descriptionandgt; andlt;?xml version='1.0'?andgt; andlt;rdfs:Class rdf:ID='F16' xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns='http://www.nato.org/aircraft#'andgt; andlt;rdf:type rdf:resource='http://www.nato.org/Aircraft.rdfs#Aircraft'/andgt; andlt;wingspanandgt;10 metersandlt;/wingspanandgt; ... andlt;/rdfs:Classandgt; 'The F16 is an Aircraft, with a wingspan of 10 meters, …' This clearly shows F16 being used as both a class and as an instance! RDF Schemas: simple, yet powerful:  RDF Schemas: simple, yet powerful Let's summarize what we have learned: Use RDF Schema to define: a class hierarchy (a taxonomy), properties associate them with a class (use rdfs:domain) indicate the range of values (use rdfs:range) Once an RDF Schema is defined then it can be used to infer additional facts about data: a class is an instance of all superclasses a property is a specialization of its superproperty Desire more expressiveness:  Desire more expressiveness Although you can express a lot with RDF Schemas it is lacking in some desirable expressiveness: Two classes, same concept - people use different words to represent the same thing. It would be very useful to be able to state 'this class is equivalent to this second class'. One person may create an ontology with a class called 'Airplane'. Another person may create an ontology with a class called 'Plane'. It would be useful to be able to indicate that the two classes are equivalent. Cardinality constraints - oftentimes it is useful to indicate the allowable number of occurrences of a property Example. We would like to be able to express that a River has only 'one' officialLength property. Example. We would like to be able to express that an Ocean has one maxDepth. Slide80:  RDF Schemas: Building Block to More Expressive Ontology Languages RDF Schema OWL RDF Schema was designed to be extended. The ontology languages all use RDF Schema's basic notions of Class, Property, domain, and range. OWL = Web Ontology Language - see the OWL Tutorial at: http://www.xfront.com/owl/ RDF Schema vs XML Schema:  RDF Schema vs XML Schema XML Schemas is all about syntax. RDF Schema is all about semantics. An XML Schema tool is intended to validate that an XML instance conforms to the syntax specified by the XML Schema. An RDF Schema tool is intended to provide additional facts to supplement the facts in RDF/XML instances. XML Schemas is prescriptive - an XML Schema prescribes what an element may contain, and the order the child elements may occur. RDF Schemas is descriptive - an RDF Schema simply describes classes and properties.

Add a comment

Related presentations

Related pages

RDF-Schema – Wikipedia

Das Resource Description Framework Schema (RDFS) ist wie RDF eine W3C-Empfehlung. Ebenso wie XML im konkreten Anwendungsfall die Definition eines ...
Read more

W3C RDF Schema 1.1 - w3.org

3.1 rdfs:range. rdfs:range is an instance of rdf:Property that is used to state that the values of a property are instances of one or more classes.
Read more

Resource Description Framework - Schema

rdfs:Datatype a rdfs:Class ; rdfs:isDefinedBy ; rdfs:label "Datatype" ; rdfs:comment "The class of RDF datatypes." ; rdfs:subClassOf rdfs:Class . rdfs ...
Read more

Kapitel WT:VIII (Fortsetzung) - uni-weimar.de

RDFS: Einführung Modellieren und Schlussfolgern mit RDF/RDFS Spezifikation eines Vokabulars V Ausschnitt der realen Welt Modell des Weltausschnitts (in ...
Read more

RDFS Introduction | Cambridge Semantics

RDFS:subClassOf. Most Cars have a Miles per Gallon rating, including Used Cars For Sale. And all resources that are for sale have a Price, including Used ...
Read more

RDFS — e-teaching.org

RDFS steht für RDF-Schema und ist eine Auszeichnungssprache die es erlaubt, eine Grammatik sowie Interpretationsregeln für RDF-Aussagen festzulegen und ...
Read more

Roadrunner Transportation Systems Home

© Roadrunner Transportation Systems Inc. 2014 All Rights Reserved. ...
Read more

RDF Schema (RDFS) | semantisches web // semantic web

Das RDF-Schema (RDFS) ist eine Erweiterung des klassischen RDF Ansatzes. Genauso wie RDF ist auch RDFS eine W3C-Konsortium Recommendation und somit ein
Read more

Web Ontology Language – Wikipedia

Um die Abbildbarkeit auf diese Logik zu gewährleisten, wurden diverse Einschränkungen für den Einsatz von RDFS-Konstrukten eingefügt, ...
Read more