690 likes | 951 Views
RDFS: Resource Description Framework Schema. slides are borrowed from Costello . Lecture schedule. Ontology Syntax of RDF and RDFS Basic Ideas of RDF Three representations of RDF Basic Concepts of RDF Schema Τhe Language of RDF Schema Axiomatic Semantics for RDF and RDFS
E N D
RDFS: Resource Description Framework Schema slides are borrowed from Costello
Lecture schedule • Ontology • Syntax of RDF and RDFS • Basic Ideas of RDF • Three representations of RDF • Basic Concepts of RDF Schema • Τhe Language of RDF Schema • Axiomatic Semantics for RDF and RDFS • Applications of RDF and RDFS • Querying of RDF/RDFS Documents
RDF Schema is about creating Taxonomies RDF S motivation NaturallyOccurringWaterSource BodyOfWater Stream Brook River Ocean Tributary Lake Sea Properties: length: Literal emptiesInto: BodyOfWater Rivulet
What inferences can be made on this RDF/XML, given the taxonomy on the last slide? RDF S motivation <?xml version="1.0"?> <River rdf:ID="Yangtze" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.geodesy.org/water/naturally-occurring#"> <length>6300 kilometers</length> <emptiesInto rdf:resource="http://www.china.org/geography#EastChinaSea"/> </River> Inferences are made by examining a taxonomy that contains River. See next slide.
NaturallyOccurringWaterSource BodyOfWater Stream RDF S motivation Brook Tributary River Ocean Lake Sea Properties: length: Literal emptiesInto: BodyOfWater Inference Engine Rivulet <?xml version="1.0"?> <River rdf:ID="Yangtze" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.geodesy.org/water/naturally-occurring#"> <length>6300 kilometers</length> <emptiesInto rdf:resource="http://www.china.org/geography#EastChinaSea"/> </River> Yangtze.rdf Inferences: - Yangtze is a Stream - Yangtze is an NaturallyOcurringWaterSource - http://www.china.org/geography#EastChinaSea is a BodyOfWater
How does a taxonomy facilitate searching? NaturallyOccurringWaterSource RDF S motivation BodyOfWater Stream Brook River Ocean Tributary Lake Sea Properties: length: Literal emptiesInto: BodyOfWater Rivulet 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.
NaturallyOccurringWaterSource From Costello BodyOfWater Stream Brook Tributary River Ocean Lake Sea Properties: length: Literal emptiesInto: BodyOfWater Search Engine Rivulet "Show me all documents that contain info about Streams" <River rdf:ID="Yangtze" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.geodesy.org/water/naturally-occurring#"> <length>6300 kilometers</length> <emptiesIntordf:resource="http://www.china.org/geography#EastChinaSea"/> </River> Yangtze.rdf Results: - Yangtze is a Stream, so this document is relevant to the query.
You now know everything about RDF Schemas! • RDF Schemas is all about defining taxonomies (class hierarchies). • 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. • we need to express the taxonomy in a form that is machine-processable. • RDF Schemas provides an XML vocabulary to express taxonomies. RDF S motivation From Costello
Lecture Schedule • Ontology • Syntax of RDF and RDFS • Basic Ideas of RDF • Three representations of RDF • Basic Concepts of RDF Schema • Τhe Language of RDF Schema • Axiomatic Semantics for RDF and RDFS • Applications of RDF and RDFS • Querying of RDF/RDFS Documents using RQL
Defining a class (e.g., River) All classes and properties are defined within rdf:RDF 1 <?xml version="1.0"?> <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"> <rdfs:Class rdf:ID="River"> <rdfs:subClassOf rdf:resource="#Stream"/> </rdfs:Class> <rdfs:Class rdf:ID="Stream"> <rdfs:subClassOf rdf:resource="#NaturallyOccurringWaterSource"/> </rdfs:Class> ... </rdf:RDF> Assigns a namespace to the taxonomy! 2 3 Defines the River class Since the Stream class is defined in the same document we can reference it using a fragment identifier. 5 Defines the Stream class 4 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." ... From Costello
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. Name of the class equivalent <rdfs:Class rdf:ID="River"> <rdfs:subClassOf rdf:resource="#Stream"/> </rdfs:Class> <rdf:Description rdf:ID="River"> <rdf:type rdf:resource="http://www.w3.org/2000/01/rdf-schema#Class"/> <rdfs:subClassOf rdf:resource="#Stream"/> </rdf:Description>
rdfs:subClassOf is transitive NaturallyOccurringWaterSource BodyOfWater Stream Brook Tributary River Ocean Lake Sea 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.)
Defining properties <?xml version="1.0"?> <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"> <rdf:Property rdf:ID="emptiesInto"> <rdfs:domain rdf:resource="#River"/> <rdfs:range rdf:resource="#BodyOfWater"/> </rdf:Property> ... </rdf:RDF> NaturallyOccurringWaterSource.rdfs (snippet) 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. emptiesInto BodyOfWater River range domain
Rdf:Property • This type is used to define a property. • The rdf:ID provides a name for the property. • The contents are used to indicate the usage of the property. • The contents are ANDed together. Name of the property equivalent <rdf:Property rdf:ID="emptiesInto"> <rdfs:domain rdf:resource="#River"/> <rdfs:range rdf:resource="#BodyOfWater"/> </rdf:Property> ANDed <rdf:Description rdf:ID="emptiesInto"> <rdf:type rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#Property"/> <rdfs:domain rdf:resource="#River"/> <rdfs:range rdf:resource="#BodyOfWater"/> </rdf:Description>
<rdf:Property rdf:ID="emptiesInto"> <rdfs:domain rdf:resource="#River"/> <rdfs:range rdf:resource="#BodyOfWater"/> <rdfs:range rdf:resource="http://www.geodesy.org/coast#CoastalWater"/> </rdf:Property> CoastalWater BodyOfWater - the value of emptiesInto is a BodyOfWater and a CoastalWater. range Properties can have multiple domain and range
Note that properties are defined separately from classes • OO: when a class is defined the properties (attributes) are simultaneously defined. • E.g, "I hereby define a Rectangle class, and its attributes are length and width.” • In RDF: classes and properties are defined separately. • define the Rectangle class, and indicate that it is a subclass of GeometricObject. • Separately, define a length property, indicate its domain (Retangle) and range. • Advantage: anyone, anywhere, anytime can create a property and state that it is usable with the class!
The XML Representation of the taxonomy <?xml version="1.0"?> <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"> <rdfs:Class rdf:ID="River"> <rdfs:subClassOf rdf:resource="#Stream"/> </rdfs:Class> <rdfs:Class rdf:ID="Stream"> <rdfs:subClassOf rdf:resource="#NaturallyOccurringWaterSource"/> </rdfs:Class> <rdf:Property rdf:ID="emptiesInto"> <rdfs:domain rdf:resource="#River"/> <rdfs:range rdf:resource="#BodyOfWater"/> </rdf:Property> <rdf:Property rdf:ID="length"> <rdfs:domain rdf:resource="#River"/> <rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Literal"/> </rdf:Property> ... </rdf:RDF>
NaturallyOccurringWaterSource Ontology! • NaturallyOccurringWaterSource.rdfs defines • a set of classes and how the classes are related. • 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! • RDF Schema • Classes and Properties • Class and instances (RDFS and RDF) • Class Hierarchies and Inheritance • Property Hierarchies
Classes and their Instances • We must distinguish between • Concrete “things” (individual objects) in the domain: Discrete Maths, David Billington etc. • Sets of individuals sharing properties called classes: lecturers, students, courses etc. • Individual objects that belong to a class are referred to as instances of that class • The relationship between instances and classes in RDF is through rdf:type
Why Classes are Useful • Impose restrictions on what can be stated in an RDF document using the schema • As in programming languages • E.g. A+1, where A is an array • Disallow nonsense from being stated • “Discrete Maths is taught by Concrete Maths” • We want courses to be taught by lecturers only • Restriction on values of the property “is taught by” (range restriction) • “Room MZH5760 is taught by David Billington” • Only courses can be taught • This imposes a restriction on the objects to which the property can be applied (domainrestriction)
Class hierarchy • Classes can be organised in hierarchies • A is a subclass of B if every instance of A is also an instance of B • Then B is a superclass of A • A subclass graph need not be a tree • A class may have multiple superclasses
Inferring a resource's class from the properties' domain Notice that in this RDF/XML instance the class of the resource (Yangtze) is not identified: <rdf:Descriptionrdf:ID="Yangtze" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.geodesy.org/water/naturally-occurring#"> <length>6300 kilometers</length> <emptiesIntordf:resource="http://www.china.org/geography#EastChinaSea"/> </rdf:Description> However, we can infer that Yangtze is a River because length and emptiesInto have a rdfs:domain of River, i.e., their domain asserts that these properties will be used in a River instance.
NaturallyOccurringWaterSource WaterwayObstacle BodyOfWater Levee Dam Stream Brook River Ocean Tributary Lake Sea Properties: length: Literal emptiesInto: BodyOfWater obstacle: http://www.ussdam.org#Dam Rivulet WaterResource Taxonomy
<rdf:Property rdf:ID="obstacle"> <rdfs:domain rdf:resource="#River"/> <rdfs:range rdf:resource="http://www.ussdam.org#Dam"/> </rdf:Property> Read this as: "I hereby define a property called obstacle. The type of value that this property will have is of type Dam (more specifically, of type http://www.ussdam.org#Dam). This property will be used in a River Class” the River class is defined locally, so we simply use a fragment identifier. Defining the obstacle property
What inferences can be made on this RDF/XML? <River rdf:ID="Yangtze" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.geodesy.org/water/naturally-occurring#"> <length>6300 kilometers</length> <emptiesIntordf:resource="http://www.china.org/geography#EastChinaSea"/> <obstacle rdf:resource="http://www.china.org/geography/river/dam#ThreeGorges"/> </River> Yangtze.rdf What inferences can be made about Yangtze, EsatChinaSea, and ThreeGorges? Inferences are made by examining the taxonomies that contains River and Dam.
NaturallyOcurringWaterSource WaterwayObstacle BodyOfWater Stream Levee Dam Brook Tributary River Ocean Lake Sea Properties: length: Literal emptiesInto: BodyOfWater obstacle: http://www.ussdams.org#Dam Inference Engine Rivulet <River rdf:ID="Yangtze" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.geodesy.org/water/naturally-occurring#"> <length>6300 kilometers</length> <emptiesIntordf:resource="http://www.geodesy.org/water#EastChinaSea"/> <obstacle rdf:resource="http://www.china.org/geography/river/dam#ThreeGorges"/> </River> Yangtze.rdf 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
Create an RDF Schema for the following RDF document: <River rdf:ID="Yangtze" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.geodesy.org/water/naturally-occurring#" xmlns:uom="http://www.nist.org#"> <length> <rdf:Description> <rdf:value>6300</rdf:value> <uom:units>kilometers</uom:units> </rdf:Description> </length> <emptiesIntordf:resource="http://www.china.org/geography#EastChinaSea"/> <obstacle rdf:resource="http://www.china.org/geography/river/dam#ThreeGorges"/> </River> untyped resource Note that the property length has a value that has no type indicated. What is the corresponding property declaration? Note that the property units is from a different namespace (a different taxonomy). Untyped resource
<rdf:RDFxmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"<rdf:RDFxmlns: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"> <rdfs:Classrdf:ID="River"> <rdfs:subClassOfrdf:resource="#Stream"/> </rdfs:Class> <rdf:Propertyrdf:ID="length"> <rdfs:domainrdf:resource="#River"/> </rdf:Property> ... </rdf:RDF> No rdfs:range specified. This means that we are providing no information on the type of value that length will have. NaturallyOccurringWaterSource.rdfs (snippet) Disadvantage: this way of defining length yields no inferencing capability about its value. Defining length with no Type Information
A resource that doesn't have a type specified may nonetheless be typed! <length> <rdf:Description> <rdf:value>6300</rdf:value> <uom:units>kilometers</uom:units> </rdf:Description> </length> 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. <rdf:Property rdf:ID="length"> <rdfs:domain rdf:resource="#River"/> <rdfs:range rdf:resource="http://www.nist.org#Distance"/> </rdf:Property> Advantage: now we can infer that the contents of length is of type Distance.
This RDF Schema: <rdf:Property rdf:ID="length"> <rdfs:domain rdf:resource="#River"/> <rdfs:range rdf:resource="http://www.nist.org#Distance"/> </rdf:Property> Does not mandate that the RDF/XML instance specify a type, e.g., <length> <uom:Distance> <rdf:value>6300</rdf:value> <uom:units>kilometers</uom:units> </uom:Distance> </length> Best Practice Best Practice It is perfectly fine to keep that class information isolated to the RDF Schema, e.g., <length> <rdf:Description> <rdf:value>6300</rdf:value> <uom:units>kilometers</uom:units> </rdf:Description> </length> (However, it is better practice to expose the type information in the RDF/XML instance.)
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.nist.org#"> <simpleType name="kilometer"> <restriction base="integer"> </restriction> </simpleType> <simpleType name="meter"> <restriction base="integer"> </restriction> </simpleType> </schema> uom.xsd Create RDF Schema for an RDF document <rdf:RDFxmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.geodesy.org/water/naturally-occurring#"> <rdf:Descriptionrdf:ID="Yangtze”> <length rdf:datatype="http://www.nist.org#kilometer">6300</length> <maxWidthrdf:datatype="http://www.nist.org#meter">175</maxWidth> <maxDepthrdf:datatype="http://www.nist.org#meter">55</maxDepth> </rdf:Description> </rdf:RDF> Yangtze.rdf The River class has three properties containing typed literals. The referenced xml schema datatypes in Yangtze.rdf
<?xml version="1.0"?> <rdf:RDFxmlns: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"> <rdf:Propertyrdf:ID="length"> <rdfs:domainrdf:resource="#River"/> <rdfs:rangerdf:resource="http://www.nist.org#kilometer"/> </rdf:Property> <rdfs:Datatyperdf:about="http://www.nist.org#kilometer"> <rdfs:subClassOfrdf:resource="http://www.w3.org/2001/XMLSchema#integer"/> </rdfs:Datatype> <rdf:Propertyrdf:ID="maxWidth"> <rdfs:domainrdf:resource="#River"/> <rdfs:rangerdf:resource="http://www.nist.org#meter"/> </rdf:Property> <rdfs:Datatyperdf:about="http://www.nist.org#meter"> <rdfs:subClassOfrdf:resource="http://www.w3.org/2001/XMLSchema#integer"/> </rdfs:Datatype> ... </rdf:RDF> NaturallyOccurringWaterSource.rdfs (snippet)
NaturallyOccurringWaterSource BodyOfWater Stream Properties: length: Literal Brook River Ocean Tributary Lake Sea Properties: emptiesInto: BodyOfWater obstacle: http://www.ussdam.org#Dam Rivulet length has been defined to be a property of Stream. Therefore, all Stream subclasses inherit the length property. Note that the properties emptiesInto and obstacle are defined to be local to River. Classes inherit properties from their ancestors
Table showing what properties are applicable to each class Classes Brook River Stream Rivulet Tributary length X X X X X emptiesInto X obstacle X Properties
Defining length and emptiesInto <?xml version="1.0"?> <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"> <rdf:Property rdf:ID="length"> <rdfs:domain rdf:resource="#Stream"/> <rdfs:range rdf:resource="http://www.nist.org#Distance"/> </rdf:Property> <rdf:Property rdf:ID="emptiesInto"> <rdfs:domain rdf:resource="#River"/> <rdfs:range rdf:resource="#BodyOfWater"/> </rdf:Property> ... </rdf:RDF> NaturallyOccurringWaterSource.rdfs (snippet)
rdfs:subPropertyOf You can define a property to be a specialization of another property: Property Hierarchy: length "rdfs:subPropertyOf" "rdfs:subPropertyOf" estimatedLength officialLength 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. if P is a subproperty of Q, P(x,y) -> Q(x,y).
Table showing what properties are applicable to each class Classes Brook River Stream Rivulet Tributary length X X X X X emptiesInto X obstacle X estimatedLength X X X X X officialLength X X X X X Properties
What inferences can we make on the estimatedLength property: <?xml version="1.0"?> <River rdf:ID="Yangtze" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.geodesy.org/water/naturally-occurring#"> <estimatedLength>6300 kilometers</estimatedLength> <emptiesInto rdf:resource="http://www.china.org/geography#EastChinaSea"/> </River> Inference: Since estimatedLength is a subproperty of length, we can infer that the Yangtze has a length of 6300 kilometers. Making inferences with subproperties
Another example of inferencing using property hierarchies Property Hierarchy: parent "rdfs:subPropertyOf" father <?xml version="1.0"?> <Person rdf:ID="Mary" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.genealogy.org#"> <father> <Person rdf:about="#John"/> </father> </Person> "Mary has a father named John." Inference: Since father is a subproperty of parent, we can infer that Mary has a parent named John.
A subproperty can narrow the range and/or domain Property Hierarchy: emptiesInto: BodyOfWater "rdfs:subPropertyOf" emptiesIntoSea: Sea This subproperty narrows the range to Sea. <rdf:Property rdf:ID="emptiesInto"> <rdfs:domain rdf:resource="#River"/> <rdfs:range rdf:resource="#BodyOfWater"/> </rdf:Property> <rdf:Property rdf:ID="emptiesIntoSea"> <rdfs:subPropertyOf rdf:resource="#emptiesInto"/> <rdfs:range rdf:resource="#Sea"/> </rdf:Property> The property emptiesInto permits a range of BodyOfWater. This property, however, narrows the range to Sea.
rdfs:label, rdfs:comment <rdf:Property rdf:ID="Creator"> <rdfs:label xml:lang="EN">Author/Creator</rdfs:label> <rdfs:comment xml:lang="EN">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. </rdfs:comment> </rdf:Property> 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.
Exercise Create an RDF Schema for the following RDF/XML instance: <?xml version="1.0"?> <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"> <item> <Book rdf:ID="_0-06-099325-2" xml:base="http://www.publishing.org/book"> <dc:Title>Lateral Thinking</dc:Title> <dc:Creator>Edward de Bono</dc:Creator> <dc:Date>1973</dc:Date> <dc:Publisher>Harper & Row</dc:Publisher> </Book> </item> <item> <Book rdf:ID="_0-440-34319-4" xml:base="http://www.publishing.org/book"> <dc:Title>Illusions: The Adventures of a Reluctant Messiah</dc:Title> <dc:Creator>Richard Bach</dc:Creator> <dc:Date>1977</dc:Date> <dc:Publisher>Dell Publishing Co.</dc:Publisher> </Book> </item> ... </Catalogue> Barnes_and_Noble_BookCatalogue.rdf
Answer: <?xml version="1.0"?> <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"> <rdfs:Class rdf:ID="Catalogue"> <rdfs:subClassOf rdf:resource="http://www.w3.org/2000/01/rdf-schema#Resource"/> </rdfs:Class> <rdfs:Class rdf:ID="Book"> <rdfs:subClassOf rdf:resource="http://www.w3.org/2000/01/rdf-schema#Resource"/> </rdfs:Class> <rdf:Property rdf:ID="item"> <rdfs:domain rdf:resource="#Catalogue"/> <rdfs:range rdf:resource="#Book "/> </rdf:Property> ... </rdf:RDF> PublishingOntology.rdfs
Lecture schedule • Ontology • Syntax of RDF and RDFS • Basic Ideas of RDF • Three representations of RDF • Basic Concepts of RDF Schema • Τhe Language of RDF Schema • Axiomatic Semantics for RDF and RDFS • Applications of RDF and RDFS • Querying of RDF/RDFS Documents
Axiomatic Semantics • Example: what is the meaning (semantics) of subClass? PropVal(subClassOf,?c,?c') (Type(?c,Class) Type(?c',Class) ?x (Type(?x,?c) Type(?x,?c'))) • Formalize the meaning of the modeling primitives of RDF and RDF Schema • By translating into first-order logic; • Make the semantics unambiguous and machine accessible; • Provide a basis for reasoning support by automated reasoners manipulating logical formulas. • All language primitives in RDF and RDF Schema are represented by constants: • Such as Resource, Class, Property, subClassOf, etc. • A few predefined predicates are used as a foundation for expressing relationships between the constants • Such as PropVal, Type • We use predicate logic with equality • Variable names begin with ? • All axioms are implicitly universally quantified
Basic predicates • PropVal(P, R, V) • A predicate with 3 arguments, which is used to represent an RDF statement with resource R, property P and value V • An RDF statement (triple) (P,R,V) is represented as PropVal(P, R, V). • Type(R, T) • Short for PropVal(type,R,T) • Specifies that the resource R has the type T Type(?r,?t) PropVal(type,?r,?t)
RDF Classes • Constants: Class, Resource, Property, Literal • All classes are instances of Class Type(Class,Class) Type(Resource,Class) Type(Property,Class) Type(Literal,Class) • The predicate in an RDF statement must be a property PropVal(?p,?r,?v) Type(?p,Property) • Resource is the most general class: every class and every property is a resource Type(?p,Property) Type(?p,Resource) Type(?c,Class) Type(?c,Resource) Instance relationship Subclass relationship
Type property • type is a property PropVal(type,type,Property) • type can be applied to resources (domain) and has a class as its value (range) Type(?r,?c) Type(?r,Resource) Type(?c,Class)
Functional property • P is a functional property if, and only if, • it is a property, and • there are no x, y1 and y2 with P(x,y1), P(x,y2 ) and y1y2 Type(?p, FuncProp) (Type(?p, Property) ?r ?v1 ?v2 (PropVal(?p,?r,?v1) PropVal(?p,?r,?v2) ?v1 = ?v2)) • Example Type(square, FuncProp) (Type(square, Property) ?r ?v1 ?v2 (PropVal(square,?r,?v1) PropVal(square,?r,?v2) ?v1 = ?v2))