I have a Yen ontology model ( OntModel ), which I modify programmatically. This model was originally created using the defaultFactoryFactory method to create an ontology model (without parameters) . The problem was that as the program starts and the model changes, by default, Jena Reasoner will start (and start, run, and run). The process was too slow for what I needed, and on large datasets, out of memory would end.
I modified the program to use a different factory ontology model to create a model with no argument. This happened very quickly and did not display any of the memory problems that I had seen before (even for very large datasets). The problem with this approach is that I can access data directly using its direct class type (I cannot access objects using its parent class).
For example, imagine that I had two class resources: a flower and a seed. They are inherited from the common parent, "plant material." My program accepts all the "seeds", launches the "grow" method, which turns the "seed" object into a "flower" object. The grow method is too slow and runs out of memory when using a Reasoner (even Micro Reasoner). If I turn off Reasoner, then I will not be able to access all the "flowers" and "seeds" using the class "plant material".
Is there a preferred way (happy environment) to do this ... allowing the ability to access objects using your superclass, as well as being fast rather than a memory swamp?
I was looking for a way to "disable the argumentator" while I run my grow method and then return it as soon as the method completes. Is it possible somehow?
source share