1 / 41

Resource Description Framework Schema (RDFS)

Resource Description Framework Schema (RDFS). Dario Aganovic Industrial PhD-student NPI Production Kista, Ericsson AB and Production Engineering Department Kungl Tekniska Högskolan Semantic Web PhD-Course Linköping, 2002-03-20. RDF.

monte
Download Presentation

Resource Description Framework Schema (RDFS)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Resource Description Framework Schema (RDFS) Dario Aganovic Industrial PhD-student NPI Production Kista, Ericsson AB and Production Engineering Department Kungl Tekniska Högskolan Semantic Web PhD-Course Linköping, 2002-03-20

  2. RDF • Foundation for processing metadata on the www. A metadata model. • Three object types: resource, property, and statement. • RDF XML syntax • Application domain independent Resource Property Property Value Statement Subject Predicate Object

  3. Why RDFS? • Semantics of a certain application domain needs to be represented. • Properties should be re-used globally. Their domain and range need therefore to be clearly specified. • Classes of resources that properties connect need to be specified in class and subclass hierarchies. • RDFS provides means to do that.

  4. How do we know that this resource actually represents a constituency? The Data Integrity Problem <rdf:Description rdf:about="http://www.epolitix.com/austin-mitchell"> <epx:Name>Austin Mitchell</epx:Name> <epx:CandidateFor rdf:resource="http://www.pa.press.net/constituencies/281" /> <epx:MemberOf>Labour Party</epx:MemberOf> <epx:DOB>19 September, 1934</epx:DOB> </rdf:Description>

  5. Isn´t it obvious that a parlamentary constituency doesn´t have a DOB-property? The Data Integrity Problem <rdf:Description rdf:about="http://www.pa.press.net/constituencies/281"> <epx:Name>Great Grimsby</epx:Name> <epx:MainIndustry>Fishing</epx:MainIndustry> <epx:DOB>19 September, 1934</epx:DOB> </rdf:Description>

  6. Validation of Statements • Is the object suitable for the predicate? • Is the predicate suitable for the subject? { epx:CandidateFor, [http://www.epolitix.com/austin-mitchell], [http://www.microsoft.com/] } { epx:DOB, [http://www.pa.press.net/constituencies/281], "19 September, 1934" }

  7. Typing Resources • How do we know that this is a consistuency? <rdf:Description rdf:about="http://www.pa.press.net/constituencies/281"> <epx:Name>Great Grimsby</epx:Name> <epx:MainIndustry>Fishing</epx:MainIndustry> </rdf:Description> • We need to type this resource as a consistuency.

  8. Resource Type: Consistuency <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:epx="http://www.ePolitix.com/2001/03/rdf-schema#" >     <rdf:Description rdf:about="http://www.pa.press.net/constituencies/281">     <rdf:type resource="http://www.ePolitix.com/2001/03/rdf-schema#Constituency" /> <epx:Name>Great Grimsby</epx:Name>     <epx:MainIndustry>Fishing</epx:MainIndustry> </rdf:Description> </rdf:RDF>

  9. { epx:CandidateFor, [http://www.epolitix.com/austin-mitchell], [http://www.microsoft.com/] } Invalid: Not a consistuency Specifying property values: linking a predicate to an apropriate object

  10. Create rdf:property CandidateFor <rdf:Description rdf:about="http://www.ePolitix.com/2001/03/rdf-schema#CandidateFor" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" >     <rdf:type resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#Property" /> </rdf:Description> Specifying property values: linking a predicate to an apropriate object

  11. Constrain the property CandidateFor to only have a value that is a resource of type Constituency <rdf:Property rdf:about="http://www.ePolitix.com/2001/03/rdf-schema#CandidateFor" >     <rdfs:range rdf:resource="http://www.ePolitix.com/2001/03/rdf-schema#Constituency" /> </rdf:Property> Specifying property values: linking a predicate to an apropriate object

  12. <rdf:Property rdf:about="http://www.ePolitix.com/2001/03/rdf-schema#CandidateFor" >     <rdfs:range rdf:resource="http://www.ePolitix.com/2001/03/rdf-schema#Constituency" /> </rdf:Property> RDFS Namespace Prefix for RDF schema namespace. Namespace URI: http://www.w3.org/2000/01/rdf-schema#

  13. <rdf:Property rdf:about="http://www.ePolitix.com/2001/03/rdf-schema#CandidateFor" >     <rdfs:range rdf:resource="http://www.ePolitix.com/2001/03/rdf-schema#Constituency" /> </rdf:Property> rdfs:range An instance of ConstraintProperty that is used to indicate the class(es) that the values of a property must be members of. The value of a range property is always a Class. Range constraints are only applied to properties. A property can have at most one range property. It is possible for it to have no range, in which case the class of the property value is unconstrained.

  14. Validation of Statements • Is the object suitable for the predicate? • Is the predicate suitable for the subject? { epx:CandidateFor, [http://www.epolitix.com/austin-mitchell], [http://www.microsoft.com/] } { epx:DOB, [http://www.pa.press.net/constituencies/281], "19 September, 1934" }

  15. Specifying resource properties: linking predicates to apropriate subjects Constrain the property CandidateFor to only apply to resources of type Person rdf:Property rdf:about="http://www.ePolitix.com/2001/03/rdf-schema#CandidateFor">     <rdfs:domain rdf:resource="http://www.Schemas.org/2001/01/rdf-schema#Person" />     <rdfs:range        rdf:resource="http://www.ePolitix.com/2001/03/rdf-schema#Constituency" /> </rdf:Property>

  16. rdfs:domain An instance of ConstraintProperty that is used to indicate the class(es) on whose members a property can be used. A property may have zero, one, or more than one class as its domain. If there is no domain property, it may be used with any resource. If there is exactly one domain property, it may only be used on instances of that class (which is the value of the domain property). If there is more than one domain property, the constrained property can be used with instances of any of the classes (that are values of those domain properties). rdf:Property rdf:about="http://www.ePolitix.com/2001/03/rdf-schema#CandidateFor">     <rdfs:domain rdf:resource="http://www.Schemas.org/2001/01/rdf-schema#Person" />     <rdfs:range        rdf:resource="http://www.ePolitix.com/2001/03/rdf-schema#Constituency" /> </rdf:Property>

  17. rdfs:ConstraintResource This resource defines a subclass of rdfs:Resource whose instances are RDF schema constructs involved in the expression of constraints. The purpose of this class is to provide a mechanism that allows RDF processors to assess their ability to use the constraint information associated with an RDF model. rdfs:ConstraintProperty This resource defines a subclass of rdf:Property, all of whose instances are properties used to specify constraints. This class is a subclass of rdfs:ConstraintResource and corresponds to the subset of that class representing properties. Both rdfs:domain and rdfs:range are instances of rdfs:ConstraintProperty.

  18. Re-use of properties: Fake school elections (RDF-statements) <rdf:Description rdf:about="http://www.GrangeHill.edu/mark-birbeck">     <rdf:type resource="http://www.Schemas.org/2001/01/rdf-schema#Person" />     <gh:Name>Mark Birbeck</gh:Name>     <epx:CandidateFor rdf:resource="http://www.pa.press.net/constituencies/281" /> <gh:Born>28 September, 1964</gh:Born> </rdf:Description>

  19. Re-use of properties: Event web-site (a RDFS fragment) <rdf:Property rdf:about="http://www.ePolitix.com/2001/03/rdf-schema#Region">     <rdfs:domain rdf:resource="http://www.WhatsOnWhere.com/2001/01/rdf-schema#Event" /> </rdf:Property>

  20. Multiple Types <rdf:Description rdf:about="http://www.epolitix.com/austin-mitchell" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:s="http://www.Schemas.org/2001/01/rdf-schema#" xmlns:epx="http://www.ePolitix.com/2001/03/rdf-schema#" >     <rdf:type resource="http://www.Schemas.org/2001/01/rdf-schema#Person" /> <s:Name>Austin Mitchell</s:Name>     <s:DOB>19 September, 1934</s:DOB>     <rdf:type resource="http://www.ePolitix.com/2001/03/rdf-schema#Candidate" /> <epx:CandidateFor          rdf:resource="http://www.pa.press.net/constituencies/281" />     <epx:MemberOf>Labour Party</epx:MemberOf> </rdf:Description>

  21. Multiple Types

  22. Classes in RDFS • No methods. Only properties • Property-centric. In OOP a class is a set of methods and properties whilst in RDF a property is defined as being applicable to a class. • A property exists independantly of relationship between two certain classes.

  23. rdfs:Class <rdfs:Class rdf:about="http://www.Schemas.org/2001/01/rdf-schema#Person" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" /> This corresponds to the generic concept of a Type or Category, similar to the notion of a Class in object-oriented programming languages such as Java. When a schema defines a new class, the resource representing that class must have an rdf:type property whose value is the resource rdfs:Class. RDF classes can be defined to represent almost anything, such as Web pages, people, document types, databases or abstract concepts.

  24. Creating Subclasses

  25. Creating Subclasses: RDFS Class Definition <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" >     <rdfs:Class rdf:about="http://www.Schemas.org/2001/01/rdf-schema#Person" />     <rdfs:Class           rdf:about="http://www.ePolitix.com/2001/03/rdf-schema#Politician">         <rdfs:subClassOf rdf:resource="http://www.Schemas.org/2001/01/rdf-schema#Person"         />     </rdfs:Class>     <rdfs:Class rdf:about="http://www.ePolitix.com/2001/03/rdf-schema#Candidate">         <rdfs:subClassOf          rdf:resource="http://www.ePolitix.com/2001/03/rdf-schema#Politician"         />     </rdfs:Class> </rdf:RDF>

  26. rdfs:subClassOf This property specifies a subset/superset relation between classes. The rdfs:subClassOf property is transitive. If class A is a subclass of some broader class B, and B is a subclass of C, then A is also implicitly a subclass of C. Consequently, resources that are instances of class A will also be instances of C, since A is a sub-set of both B and C. Only instances of rdfs:Class can have the rdfs:subClassOf property and the property value is always of rdf:type rdfs:Class. A class may be a subclass of more than one class.

  27. Creating Subclasses

  28. Using Subclasses: RDFS Property Definition <rdf:RDF>     <rdf:Property rdf:about="http://www.Schemas.org/2001/01/rdf-schema#Name">         <rdfs:domain rdf:resource="http://www.Schemas.org/2001/01/rdf-schema#Person" />         <rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Literal" />     </rdf:Property>     <rdf:Property rdf:about="http://www.Schemas.org/2001/01/rdf-schema#DOB">         <rdfs:domain rdf:resource="http://www.Schemas.org/2001/01/rdf-schema#Person" />         <rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Literal" />     </rdf:Property> </rdf:RDF> <rdf:Property rdf:ID="MemberOf">     <rdfs:domain rdf:resource="#Politician" />     <rdfs:range rdf:resource="#PoliticalParty" /> </rdf:Property> <rdf:Property rdf:ID="CandidateFor">     <rdfs:domain rdf:resource="#Candidate" />     <rdfs:range rdf:resource="#Constituency" /> </rdf:Property>

  29. Using Subclasses: RDF-statements <rdf:Description rdf:about="http://www.epolitix.com/austin-mitchell" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:s="http://www.Schemas.org/2001/01/rdf-schema#" xmlns:epx="http://www.ePolitix.com/2001/03/rdf-schema#" > <rdf:type resource="http://www.ePolitix.com/2001/03/rdf-schema#Candidate" /> <s:Name>Austin Mitchell</s:Name> <s:DOB>19 September, 1934</s:DOB> <epx:CandidateFor rdf:resource="http://www.pa.press.net/constituencies/281" /> <epx:MemberOf rdf:resource="http://www.ePolitix.com/parties#labour" /> </rdf:Description>

  30. Using Subclasses <rdf:Description rdf:about="http://www.epolitix.com/austin-mitchell" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:s="http://www.Schemas.org/2001/01/rdf-schema#" xmlns:epx="http://www.ePolitix.com/2001/03/rdf-schema#" > <rdf:type resource="http://www.ePolitix.com/2001/03/rdf-schema#Candidate" /> <s:Name>Austin Mitchell</s:Name> <s:DOB>19 September, 1934</s:DOB> <epx:CandidateFor rdf:resource="http://www.pa.press.net/constituencies/281" /> <epx:MemberOf rdf:resource="http://www.ePolitix.com/parties#labour" /> </rdf:Description> <rdf:RDF>     <rdf:Property rdf:about="http://www.Schemas.org/2001/01/rdf-schema#Name">         <rdfs:domain rdf:resource="http://www.Schemas.org/2001/01/rdf-schema#Person" />         <rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Literal" />     </rdf:Property>     <rdf:Property rdf:about="http://www.Schemas.org/2001/01/rdf-schema#DOB">         <rdfs:domain rdf:resource="http://www.Schemas.org/2001/01/rdf-schema#Person" />         <rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Literal" />     </rdf:Property> </rdf:RDF> <rdf:Property rdf:ID="MemberOf">     <rdfs:domain rdf:resource="#Politician" />     <rdfs:range rdf:resource="#PoliticalParty" /> </rdf:Property> <rdf:Property rdf:ID="CandidateFor">     <rdfs:domain rdf:resource="#Candidate" />     <rdfs:range rdf:resource="#Constituency" /> </rdf:Property>

  31. Multiple Inheritance <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" >     <rdfs:Class       ‘ rdf:about="http://www.ePolitix.com/2001/03/rdf-schema#DefendingCandidate">         <rdfs:subClassOf          rdf:resource="http://www.ePolitix.com/2001/03/rdf-schema#Candidate"/>         <rdfs:subClassOf          rdf:resource=http://www.ePolitix.com/2001/03/rdf-schema#ElectedRepresentative />     </rdfs:Class> </rdf:RDF>

  32. Multiple Instantiation <rdf:Description rdf:about="http://www.epolitix.com/austin-mitchell">     <rdf:type resource="http://www.ePolitix.com/2001/03/rdf-schema#Candidate" />     <s:Name>Austin Mitchell</s:Name>     <epx:MemberOf>Labour Party</epx:MemberOf>     <s:DOB>19 September, 1934</s:DOB>     <rdf:type resource="http://www.Schemas.org/2001/01/rdf-schema#Husband" />     <s:Wife rdf:resource=" http://www.epolitix.com/linda-mcdougall" /> </rdf:Description>

  33. Multiple Instantiation

  34. Subproperties <rdf:Property rdf:ID="MemberOfOrganisation">     <rdfs:domain rdf:resource="#Person" />     <rdfs:range rdf:resource="#Organisation" /> </rdf:Property> <rdf:Property rdf:ID="MemberOfParty">     <rdfs:subPropertyOf rdf:resource= "#MemberOfOrganisation" /> </rdf:Property>

  35. rdfs:subPropertyOf The property rdfs:subPropertyOf is an instance of rdf:Property that is used to specify that one property is a specialization of another. A property may be a specialization of zero, one or more properties. If some property P2 is a subPropertyOf another more general property P1, and if a resource A has a P2 property with a value B, this implies that the resource A also has a P1 property with value B.

  36. rdf:Resource rdfs:label rdfs:comment rdfs:seeAlso rdfs:isDefinedBy rdf:Statement rdf:subject rdf:predicate rdf:object rdfs:container rdf:bag rdf:seq rdf:alt Other RDFS Elements All Elements are Defined in: http://www.w3.org/TR/rdf-schema/

  37. RDFS Class Hierarchy

  38. RDFS Constraints

  39. RDFS vs UML

  40. RDFS Extension: DAML+OIL • An ontology language built on top of RDFS • Basic ontological primitives and mechanisms from RDFS. • DAML+OIL is a set of RDF-statements. • DAML+OIL adds expressive power and well-defined semantics. • The purpose is to eliminate RDFSs expressive inadequacy in order to support inferencing on RDF-models.

  41. And now, more about expressiveness in general, and KIF in particular… Marcus!

More Related