owlim-discussion  

[Owlim-discussion] Deleting contexts

Haibo Liu
Tue, 15 Jun 2010 08:11:05 -0700

Dear Ivan,

I'm experiencing a strange situation with deleting context here. I'm using Sesame2.30 and SwiftOWLIM-3.0beta9. The code snip is here:

if (catalog.owlse2.hasContext(uriConstruct, catalog.con)){ //make sure the context exist RepositoryConnection con2 = catalog.owlse2.getConnection(); con2.clear((Resource) uriConstruct); //delete the context
                   con2.close();
catalog.log.info("Finished removing URL: " + uriConstruct);
               }

The whole repository is wiped out  by above code.
I know if the context does not exist the whole repository will be cleared. Here I test if the context exist before deleting. However, the repository still get wiped out with one context deleting. This particular repository has more then 100 contexts to delete.

Any way to go around this issue?

Thanks a lot,

Haibo

_______________________________________________
OWLIM-discussion mailing list
OWLIM-discussion@ontotext.com
http://ontotext.com/mailman/listinfo/owlim-discussion