1

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?

Joshua Taylor
  • 84,998
  • 9
  • 154
  • 353
umar
  • 910
  • 10
  • 24
  • Are you trying to see if the property is an InverseFunctionalProperty? – Pradeep Gollakota Feb 28 '12 at 04:56
  • In general, you can check [Section 2, Mapping from the Structural Specification to RDF Graphs](http://www.w3.org/TR/owl2-mapping-to-rdf/#Mapping_from_the_Structural_Specification_to_RDF_Graphs) to find out how various OWL axioms will be mapped to RDF (and thus, how to query for them using SPARQL.) In this particular case, the OWL axiom `InverseFunctionalObjectProperty( OPE )` is translated into the RDF triple `T(OPE) rdf:type owl:InverseFunctionalProperty .`. – Joshua Taylor Sep 19 '13 at 20:33

1 Answers1

3

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.

Ian Dickinson
  • 12,875
  • 11
  • 40
  • 67