Hello,

unfortunatelly, the problem persists.

When I store different data data to different contexts, they accumulate (and clearing does not work). Assume I have the code I mentioned earlier to connect to LocalRepositoryManager, and this piece of code for storing to different contexts:


for (String context : contexts) {
    Model inm = in.getModel(context);
    Model outm = out.getModel(context);

    if (outm.supportsTransactions()) outm.begin();
    outm.removeAll();
    if (outm.supportsTransactions()) outm.commit();

logger.info("Model after clearing: " + context + " in size = " + inm.size() + ", out size = " + outm.size());

    if (outm.supportsTransactions()) outm.begin();
    outm.add(inm);
    if (outm.supportsTransactions()) outm.commit();

logger.info("Model after loading: " + context + " in size = " + inm.size() + ", out size = " + outm.size());

    in.closeModel(inm);
    out.closeModel(outm);
}


Where "in" and "out" are my own connectors providing Jena Models. Input is another Jena repository (currently SDB), and output is the OWLIM repository.

With a clear OWLIM storage folder, the code outputs:

Model after clearing: http://.../mondis-core-data.owl in size = 1591, out size = 0 Model after loading: http://.../mondis-core-data.owl in size = 1591, out size = 1591

Model after clearing: http://.../mondis-translation.owl in size = 1922, out size = 1591 Model after loading: http://.../mondis-translation.owl in size = 1922, out size = 3513

Model after clearing: http://mondis.cz/ in size = 1587, out size = 3513
Model after loading: http://mondis.cz/ in size = 1587, out size = 3517


Am I doing something wrong, please?

Thanks for any help,
Marek Smid


On 08/30/2012 11:01 AM, Ing. Marek Smid wrote:
Hi Barry,

thank you, that explains it. Yes, I am using
com.ontotext.jena.SesameDatase, but as you already know, with a remote
repository. I will use local instead.

Best regards,
Marek Smid


On 08/30/2012 10:08 AM, Barry Bishop wrote:
Hi Marek,

Sorry for the slow response, the holiday period is slowing things up.

In your code below, it's not clear if you are using the
com.ontotext.jena.SesameDataset, which is the OWLIM Jena adapter. This
adapter will only work with local OWLIM repositories, i.e. not those
that are obtained via the RemoteRepositoryManager.

Please advise if you are using a different SesameDataset class.

Thanks for your patience,
barry

Barry Bishop
OWLIM Product Manager
Ontotext AD
Tel: +43 650 2000 237
email: barry.bis...@ontotext.com
skype: bazbishop
www.ontotext.com

On 28/08/12 15:21, Ing. Marek Smid wrote:
Hello,

I am using OWLIM-SE 5.2.5331 with both Sesame 2.6.8 and 2.6.9, and I
am having troubles with storing in different contexts.

I am using Jena API for accesing the repository, connecting remotely
like this:
RepositoryManager repoManager = new RemoteRepositoryManager(serverUrl);
repoManager.initialize();
Repository repo = repoManager.getRepository(repositoryId);
RepositoryConnection repoConnection = repo.getConnection();
repoConnection.setAutoCommit(true);
SesameDataset dataset = new SesameDataset(repoConnection);

And then, for each context, I do:
ModelFactory.createModelForGraph(dataset.getGraph(Node.createURI(ctxURI)));



But it seems it uses only the default graph (default context), all
data are stored in one heap.

However, it works well with remote connection just to Sesame (without
OWLIM).

Am I doing anything wrong?

Thank you for any help,
Marek Smid




--
Ing. Marek Smid
Katedra kybernetiky
CVUT FEL
Tel: +420 22435 7410
E-mail: smidm...@fel.cvut.cz
_______________________________________________
Owlim-discussion mailing list
Owlim-discussion@ontotext.com
http://ontomail.semdata.org/cgi-bin/mailman/listinfo/owlim-discussion

Reply via email to