I want to check whether a property is functional or not. I tried:
ASK {
pz:isBase owl:isInverseFunctional .
}
but it is a syntax error. How can I check whether a property is functional?
I want to check whether a property is functional or not. I tried:
ASK {
pz:isBase owl:isInverseFunctional .
}
but it is a syntax error. How can I check whether a property is functional?
Try:
ASK {pz:isBase rdf:type owl:InverseFunctionalProperty}
To explain: the patterns that RDF represents, and which SPARQL queries, are triples of subject predicate object
, or in other words a binary predicate. You're thinking of a unary predicate isInverseFunctional()
, but RDF doesn't do unary predicates. Instead, that kind of type or sortal information is encoded as a binary predicate with a special predicate rdf:type
, which you can think of as isKindOf
or is member of the class
.
So, to discover whether a resource denoting a particular predicate in your domain model is an inverse functional property, you ask whether that resource is in the class of, i.e. has rdf:type
the class of all inverse functional properties or owl:InverseFunctionalProperty
.