On 19/07/12 18:42, Johan Kumps wrote:
Hi all,
I managed to load owl files into a Jena Model and persist it in an SQL
datase using SDB. The triples in these ontologies can be used to
reason with but the ontologies beiing imported using owl:import are
not in the model. What should I do to fix this.
If you want to store the import-closure as a single model in your
database then the easy route would be to load the OWL into an in-memory
OntModel and then materialize the whole closure into your target
destination:
storemodel.add( ontmodel ) ;
[It is also possible to use the OntDocumentManager to allow you store
all these ontologies separately and do the import-closure at runtime
from the store. However, that requires a ModelMaker wrapper which I'm
not sure is available for SDB.]
Another question I have is how I can materialize all inferences at
application startup in order to maximize performance of the
application.
Similar pattern to the above. Create an (in-memory) InfModel/OntModel
with an appropriate reasoner then copy the relevant inferences out to
your storage model. If we want to materialize the entire
inference-closure then again storemodel.add() will do this.
Dave