I am creating an OntClass but also want to pun that IRI, so that I have an Individual with that same IRI that can be a member of a class.  Here is an example of doing that in OFN (a class that contains itself, sort of but not really as I understand it), which works in Protege.

    Declaration( Class( :myClass ) )
    ClassAssertion( :myClass :myClass )

When I try the following two approaches, I get an org.apache.jena.ontology.ConversionException.  How do I make the above declarations using the Jena APIs?

// punnedClass is an OntClass to be punned
// containingClass is an OntClass to contain the Individual interpretation of punnedClass
model.createIndividual(punnedClass.getURI(), containingClass);
containingClass.createIndividual(punnedClass.getURI());

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

Reply via email to