You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by dafNi <dz...@gmail.com> on 2012/04/08 16:21:26 UTC

keep OntModel in a file

hello everyone!

I am currently using an in-memory model:

model = ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM);

That works fine for a small data set,

though, I would like to test a really big data set without having any
memory issues.

Is there a way to keep the model in a file an read from this file to take
all the information I need?

Thank you in advance!

dafni

Re: keep OntModel in a file

Posted by Paolo Castagna <ca...@googlemail.com>.
Hi dafni

dafNi wrote:
> hello everyone!
> 
> I am currently using an in-memory model:
> 
> model = ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM);
> 
> That works fine for a small data set,
> 
> though, I would like to test a really big data set without having any
> memory issues.


How big is a "really big data set" in number of triples? :-)

> 
> Is there a way to keep the model in a file an read from this file to take
> all the information I need?

Have you read the documentation about TDB and/or Fuseki?
http://incubator.apache.org/jena/documentation/tdb/
http://incubator.apache.org/jena/documentation/serving_data/

You can use TDB (Fuseki uses TDB) to store your RDF on disk,
this way you will not need to load the entire ontology in RAM.
However, if you have sufficient RAM loading ontologies in
memory it's a possibility.

Paolo

> 
> Thank you in advance!
> 
> dafni