On 07/04/18 10:49, Martynas Jusevičius wrote:
Sorry for the noise, it looks like the listImportedOntologyURIs() was a red
herring -- the submodel count actually comes from InfModel which includes
the schema submodels.
But I was able to dig a little further, and observed after the code I have
shown is executed, there are inconsistencies in models for the same
ontology but accessed in different ways:
Notice how imports for
How is that possible, and how do I avoid this?
No idea but since the first example has some inference enabled that
might be a clue.
Do you have a complete minimal example of an ontology which exhibits
On Fri, Apr 6, 2018 at 3:19 PM, Martynas Jusevičius <marty...@atomgraph.com>
I guess dynamic imports is what I need. But will they get triggered if I
remove and then re-add the whole Model (as shown in my example), rather
I could probably removeAll() statements from it instead of removing it
On Fri, Apr 6, 2018 at 1:59 PM, Martynas Jusevičius <
we have an ontology editor that stores ontologies and their terms in a
triplestore. On the other end, they are being loaded by OntDocumentManager.
The question is: what is the proper way to clear and reload an ontology
and its imports in OntDocumentManager?
Because, for example, a user could totally change owl:imports statements
of an ontology, and we need this feature to be able to reload a completely
new OntModel without any old imported submodels.
Right now I'm simply doing the following:
OntModel ontModel = OntDocumentManager.getInstance().getOntology(ontologyURI,
But this is not enough, because doing ontModel.listImportedOntologyURIs()
lists all the old imports from before.
Am I getting this right and what needs to be done to reload the imports
I can see there is a concept of dynamic imports in OntModel, but not sure