Thursday, April 22, 2010

When OWL 2 QCRs Don't Qualify

Was bitten hard by this one recently, leading me to have to refactor a fair amount of work. In TopBraid Composer I've enjoyed using the OWL2 Qualified Cardinality Restrictions in subclass constraints in the form:

  my:property exactly 1 my:Class

which I liked mostly for the brevity of the syntax -which I thought was shorthand for:

  my:property all my:Class
  my:property exactly 1

But its not. The semantics of the first is "the class may have any number of my:property properties, but one of the many must be of type my:Class". While the semantics of the second form reads "the class has only one my:property property and its value must be a my:Class type".

Seems obvious now. Live and learn (and refactor)...