Is a schema language for RDF
RDFS "extends" RDF
rdfs:Class
A set is identified in RDFS with rdfs:Class
rdfs:
namespace:AllStarPlayer rdf:type rdfs:Class. :MajorLeaguePlayer rdf:type rdfs:Class. :Surgeon rdf:type rdfs:Class. :Staff rdf:type rdfs:Class. :Physician rdf:type rdfs-subproperty:Class.
rdfs:subClassOf
Suppose we have the following assertions
:Apple rdfs:subClassOf :Fruit
:RedDelicions a :Apple
:RedDelicions a :Fruit
The inference rule is
CONSTRUCT { ?r rdf:type ?B } WHERE { ?A rdfs:subClassOf ?B . ?r rdf:type ?A }
rdfs:subPropertyOf
Example:
:brother rdfs:subPropertyOf :sibling
The inference rule is
CONSTRUCT { ?x ?r ?y } WHERE { ?x ?q ?y . ?q rdfs:subPropertyOf ?r }
Another example
rdfs:domain
and rdfs:range
Typing data by usage (also - implicit typing)
rdf:type
rdfs:domain
- set of values for which a property is defined (subject)rdfs:range
- set of values it can take (object)Can define them as
CONSTRUCT {?y rdf:type ?D .} WHERE { ?P rdfs:range ?D . ?x ?P ?y . } CONSTRUCT {?x rdf:type ?D .} WHERE { ?P rdfs:domain ?D . ?x ?P ?y . }
NB:
Suppose we have the following schema
:MarriedWoman rdfs:subClassOf :Woman.
:hasMaidenName rdfs:domain :MarriedWoman.
And the following assertions:
:Karen :hasMaidenName "Stephens".
Inference:
:Karen
is a :Woman
, we can infer that she's married:Karen rdf:type :MarriedWoman
based on rdfs:domain
:Karen rdf:type :Woman
based on rdfs:subClassOf
There are some basic modeling patterns that can be used in RDFS
$C \equiv A \cap B$
:C rdfs:subClassOf :A
:C rdfs:subClassOf :B
$C \equiv A \cup B$
:A rdfs:subClassOf :C
:B rdfs:subClassOf :C
Intersection and Union can also be used for properties, e.g.
:R rdfs:subPropertyOf :P .
:R rdfs:subPropertyOf :Q .
:P rdfs:subPropertyOf :R .
:Q rdfs:subPropertyOf :R .
fc:Civilian rdfs:subClassOf cc:OffLimitTarget
space:NoFlyZone rdfs:subClassOf cc:OffLimitTarget
:A rdfs:label "something"
, then "something" is a printable name of :A
:person1 :personName "James Dean"
:movie1 :movieTitle "Giant"
:personName rdfs:subPropertyOf rdfs:label
:movieTitle rdfs:subPropertyOf rdfs:label
There are properties that aren't used for inference, but just for description
rdfs:label
- text representationrdfs:seeAlso
- cross referencingrdfs:isDefinedBy
- primary source/description of a resourcerdfs:comment
- a comment