You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Steve Vestal <st...@adventiumlabs.com> on 2021/06/14 12:14:21 UTC

Questions about punning

I'm starting to use OWL 2 punning some.  The OWL 2 New Features standard 
doesn't say a whole lot.  I would appreciate a recommendation if anyone 
knows a good tutorial on punning (in either the domain of OWL or humor, 
bonus points for jokes that meta-pun the two domains).  Here is my 
initial impression of how this works, with some questions.

My simple mental model is that an IRI can be interpreted differently in 
different contexts.  Depending on the call made to an OntModel, the same 
IRI could be returned as a class by one method and as an individual by 
another.  Here is a simple test case.

     Declaration( Class( :myClass ) )
     Declaration( Class( :mySubclass ) )
     SubClassOf( :mySubclass :myClass )
     ClassAssertion( :myClass :myThing )
     ClassAssertion( :mySubclass :mySubThing )
     ## Here is the pun
     ClassAssertion( :mySubclass :mySubclass )
     ## Presumably OWL2-DL is not powerful enough to define Russell's 
paradox.

In both Protege and Jena, :mySubclass will appear in a list of classes 
and also in a list of individuals for class :mySubclass. When I ask an 
OntModel for a list of classes, it returns :mySubclass as an 
OntClassImpl.  When I ask for a list of individual members of 
:mySubClass, it returns :mySubClass as an IndividualImpl.  It depends on 
what I ask for.  Is that generally correct?

What is necessary and sufficient to cause an IRI to have both an 
interpretation as a class and as an individual?  Adding the following is 
sufficient to cause both Protege and Jena to say :myClass is a member of 
owl:Thing, and a request to Jena to return a list of individual members 
of owl:Thing returns :myClass as an IndividualImpl.  Does declaring any 
(OWL) object property triple (other than special OWL meta-properties 
used by OntModel) cause the declared (Triple/Sentence) object to have an 
interpretation as an individual?

     Declaration( ObjectProperty( :subToSuper ))
     ObjectPropertyAssertion( :subToSuper :mySubclass :myClass )

What about subjects and objects of triples?  I could find no methods in 
OntModel or OntClass that would return triples. Methods like 
Model#listObjectsOfProperty return Nodes.  Is it up to either my code or 
the user to determine whether a subject or object IRI is to be 
interpreted as a class or an individual in cases where it would matter?