I am doing my own import closure, and I saw some behaviors that I was a bit curious about.  For my own education, I'd appreciate any observations you might have.

I call setProcessImports(false) when creating the document manager, but 1) my OntModel gets created as a UnionModel, and 2) a query is made to OntModel#getGraph() to find all owl:Imports.  I thought these would be unnecessary with setProcessImports(false). Is there any non-negligible overhead, or processing I am not anticipating, going on?  Are there additional properties I should be setting?  Is it the case that setProcessImports(false) has no effect on how the overall structure is assembled, but it does stop the actual creation of new sub-models and the loading of those imported documents?

As background, I am constructing the sort of tree shown in section /Compound Ontology Documents and Imports Processing/ on page https://jena.apache.org/documentation/ontology/.  I do some custom ontology management, and my code processes all imports, OWL and otherwise.  Some of the leaf (non-base) models are OntModels.  I am loading those leaf OntModels as

            leafDocMgr = new OntDocumentManager();
            leafDocMgr.setFileManager();
            leafDocMgr.setProcessImports(false);
            leafDocMgr.setCacheModels(false);
            leafModelSpec = new OntModelSpec(OntModelSpec.OWL_MEM);
            leafModelSpec.setDocumentManager(leafDocMgr);
            OntModel leafOntModel = ModelFactory.createOntologyModel(leafModelSpec);

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

Reply via email to