In Semantic Web RDFS-Plus is an extension of RDFS, and a subset of OWL
owl:inverseOf
: InverseExample
:hasParent
- then the inverse is :hasChild
owl:inverseOf
makes this relation explicitIn math,
CONSTRUCT { ?y ?q ?x } WHERE { ?p owl:inverseOf ?q . ?x ?p ?y . }
Example:
lit:Shakespeare lit:wrote lit:Macbeth
lit:wrote owl:inverseOf lit:writtenBy
lit:Macbeth lit:writtenBy lit:Shakespeare
owl:SymmetricProperty
: Symmetric Propertiesbio:Anne bio:married lit:Shakespeare
SELECT ?who WHERE { ?lit:Shakespeare bio:married ?who }
bio:married owl:inverseOf bio:married
owl:SymmetricProperty
owl:inverseOf
can saybio:married rdf:type owl:SymmetricType
CONSTRUCT { ?p owl:inverseOf ?p. } WHERE { ?p a owl:SymmetricProperty . }
Also, can be useful to say that owl:inverseOf
is symmetric
owl:inverseOf rdf:type owl:SymmetricProperty
owl:inverseOf
$:P_2 \Rightarrow$owl:inverseOf
$:P_1$
owl:TransitiveProperty
: TransitivityIn math:
In RDFS-plus, owl:TransitiveProperty
is used for that:
:P rdf:type owl:TransitiveProperty
Meaning:
CONSTRUCT { ?x ?p ?z .} WHERE { ?x ?p ?y . ?y ?p ?x . ?p a owl:TransitiveProperty . }
Note that for longer chains like $a \to b \to ... \to q$ the rule also holds
owl:equivalentClass
: EquivalenceIdentity
:A rdfs:subClassOf :B
$\land$ :B rdfs:subClassOf :A
owl:equivalentClass
CONSTRUCT { ?r rdf:type ?b .} WHERE { ?a owl:equivalentClass ?b . ?r rdf:type ?a . } CONSTRUCT { ?r rdf:type ?a .} WHERE { ?a owl:equivalentClass ?b . ?r rdf:type ?b . }
Note that we need to have 2 CONSTRUCT statements
owl:equivalentClass
is symmetricowl:equivalentClass rdf:type owl:SymmetricProperty
owl:equivalentClass rdfs:subPropertyOf rdfs:subClassOf
owl:sameAs
: Same IndividualsSuppose in 3 namespaces we have 3 different ways of describing a person
pr:WilliamShakspere owl:sameAs lit:Shakespeare
it's defined by 3 rules:
-- when it's a subject CONSTRUCT { ?s ?p ?x. } WHERE { ?s ?p ?y. ?x owl:sameAs ?y . } -- when it's an object CONSTRUCT { ?x ?p ?o. } WHERE { ?y ?p ?o . ?x owl:sameAs ?y . } -- when it's a predicate CONSTRUCT {?s ?x ?o. } WHERE { ?s ?y ?o . ?x owl:sameAs ?y . }
To avoid adding 3 more rules
owl:sameAs rdf:type owl:SymmetricProperty
owl:FucntionalProperty
Functional - of functions (in math)
Examples (from RL):
hasMother
- can have only one biological motherhasBirthplace
birthdate
In RDFS-plus use owl:FucntionalProperty
to describe that
CONSTRUCT { ?a owl:sameAs ?b . } WHERE { ?p rdf:type owl:FunctionalProperty . ?x ?p ?a . ?x ?p ?b . }
Note the semantics
owl:InverseFunctionalProperty
Inverse of owl:FucntionalProperty
CONSTRUCT { ?a owl:sameAs ?b . } WHERE { ?p rdf:type owl:InverseFunctionalProperty . ?a ?p ?x . ?b ?p ?x . }
Student ID
:hasIdentityNo rdfs:domain :Student .
:hasIdentityNo rdfs:range xsd:Integer .
:hasIdentityNo rdf:type owl:FunctionalProperty .
:hasIdentityNo rdf:type owl:InverseFunctionalProperty .
Functional Only
hasMotheris
a functional property only. Inverse Functional Only
hasDiary
is an inverse functional property onlyBoth Functional and Inverse Functional
owl:DatatypeProperty
and owl:ObjectPropery
In RDF, subjects and objects are resource
Examples:
uni:studentId a owl:DatatypeProperty
bio:married a owl:ObjectProperty
owl:Class
owl:Class rdfs:subClassOf rdfs:Class .