I have the following code

        data = TDBFactory.createDataset( dir.getAbsolutePath() );
        data.begin( ReadWrite.WRITE);
        // read 2 files into the model (approx 3.5K triples)
        Model dataM = loadDir( ctxt, "/WEB-INF/resources/rdf/documents");
        // read http://www.w3.org/2009/08/skos-reference/skos.rdf
        Model schemaM = loadDir( ctxt, "/WEB-INF/resources/rdf/schemas" );
        Reasoner reasoner = ReasonerRegistry.getOWLMiniReasoner();
        reasoner = reasoner.bindSchema(schemaM);

        infModel = ModelFactory.createInfModel(reasoner, dataM);
        data.commit();

        // DEBUGGING CODE
        String realPath = ctxt.getRealPath("/WEB-INF/resources/");
        File f2 = new File(realPath, "data.rdf");

        // OOM occures here
        infModel.write(new FileOutputStream(f2));


So my questions are:


1) Should in inferencing be done within a write transaction and if so how
does one assure that all inferencing will be done within a write
transaction?  In this case I would expect that all inferencing would be
done in the infModel.write() call but in the general case I may not be
making that call.

2) Shoudn't the inferencing be writing to the TDB datastore?  If so why is
there an OOM error?

Many thanks,
Claude


-- 
I like: Like Like - The likeliest place on the web
<http://like-like.xenei.com>
LinkedIn: http://www.linkedin.com/in/claudewarren

Reply via email to