You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Jakub Krauz <ja...@volny.cz> on 2011/10/24 11:12:57 UTC

Problem with OntologyModel

Hello,

I work on a project that uses Jena and Jenabean to create an OWL 
document from instances of Java classes.

We add Java annotations to the Jenabean library to describe ontologies, 
that´s why we have to use ontology model
ModelFactory.createOntologyModel();
instead of ModelFactory.createDefaultModel() as we used before.

But we encountered problems with the processing speed (adding Java 
instances to the model). There was probably linear dependence on data 
amount as we used the default model, but now (with ontology model) it 
seems to be at least quadratic dependence, duration of the processing is 
unacceptable. The same data (without any added annotations) that are 
loaded in the default model in a few minutes would take a lot of hours 
or a few days with the ontology model.

Is there any reason for this matter in the Jena library, or should we 
search for the problem somewhere else?

Thanks in advance
Jakub Krauz

Re: Problem with OntologyModel

Posted by Ian Dickinson <ia...@epimorphics.com>.
Hi Jakub,
On 24/10/11 10:12, Jakub Krauz wrote:
> I work on a project that uses Jena and Jenabean to create an OWL
> document from instances of Java classes.
> 
> We add Java annotations to the Jenabean library to describe ontologies,
> that´s why we have to use ontology model
> ModelFactory.createOntologyModel();
> instead of ModelFactory.createDefaultModel() as we used before.
The default ontology model includes RDFS-level inference, which will
impose a computational cost. If you don't need reasoning in your
project, try:

ModelFactory.createOntologyModel( OntModelSpec.OWL_MEM );


Ian


-- 
____________________________________________________________
Ian Dickinson                   Epimorphics Ltd, Bristol, UK
mailto:ian@epimorphics.com        http://www.epimorphics.com
cell: +44-7786-850536              landline: +44-1275-399069
------------------------------------------------------------
Epimorphics Ltd.  is a limited company registered in England
(no. 7016688). Registered address: Court Lodge, 105 High St,
              Portishead, Bristol BS20 6PT, UK