You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Johan Kumps <jo...@telenet.be> on 2012/07/19 19:42:02 UTC
Jena load ontology imports
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.
Another question I have is how I can materialize all inferences at
application startup in order to maximize performance of the
application.
Kind regards for helping me out.
Johan
Re: Jena load ontology imports
Posted by Dave Reynolds <da...@gmail.com>.
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