Model operations performance improvements (#347)
* created RDFServiceBulkUnionUpdater * fix and indents * use bulk updater for RDFServiceGraph in blankNodeFilteringGraph * use removeAll to optimize removal all triples from TDB modeles * avoid additional serialization/deserialization cycle of removing model chunk * fixed VitroModelFactory tests * fixes for BulkUpdating models * Created custom ModelCom, OntModelImpl, BulkGraphMem to avoid triple by triple transactions on add/remove model Load n3 files from home directory into in-memory model to use bulk loading. * refact: simplified BulkGraphMem checks * removed unused import
This commit is contained in:
parent
2e682e6f38
commit
020b9385f8
13 changed files with 434 additions and 128 deletions
|
@ -346,10 +346,13 @@ public class VitroModelFactoryTest extends AbstractTestClass {
|
|||
public void addMultipleToVitroUnion() {
|
||||
umg = new VitroUnionModelGroup();
|
||||
umg.m.add(MULTIPLE_STATEMENTS);
|
||||
new MethodCalls().add(umg.base.g, "add", "add")
|
||||
.add(umg.base.l, "addedStatement", "addedStatement")
|
||||
.add(umg.plus.g).add(umg.plus.l)
|
||||
.add(umg.l, "addedStatements").test();
|
||||
new MethodCalls()
|
||||
.add(umg.base.g, "performAdd", "performAdd")
|
||||
.add(umg.base.l, "addedStatements", "addedStatements")
|
||||
.add(umg.plus.g)
|
||||
.add(umg.plus.l)
|
||||
.add(umg.l)
|
||||
.test();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
@ -452,10 +455,12 @@ public class VitroModelFactoryTest extends AbstractTestClass {
|
|||
public void addMultipleToVitroOntUnion() {
|
||||
uomg = new VitroUnionOntModelGroup();
|
||||
uomg.om.add(MULTIPLE_STATEMENTS);
|
||||
new MethodCalls().add(uomg.base.g, "add", "add")
|
||||
new MethodCalls()
|
||||
.add(uomg.base.g, "add", "add")
|
||||
.add(uomg.base.l, "addedStatement", "addedStatement")
|
||||
.add(uomg.plus.g).add(uomg.plus.l)
|
||||
.add(uomg.l, "addedStatements").test();
|
||||
.add(uomg.l)
|
||||
.test();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
@ -566,12 +571,16 @@ public class VitroModelFactoryTest extends AbstractTestClass {
|
|||
public void addMultipleToVitroOntModeledUnionModel() {
|
||||
omumg = new VitroOntModelUnionModelGroup();
|
||||
omumg.om.add(MULTIPLE_STATEMENTS);
|
||||
new MethodCalls().add(omumg.om, "add").add(omumg.ol, "addedStatements")
|
||||
.add(omumg.union.base.g, "add", "add")
|
||||
.add(omumg.union.base.m)
|
||||
.add(omumg.union.base.l, "addedStatement", "addedStatement")
|
||||
new MethodCalls()
|
||||
.add(omumg.om, "add")
|
||||
.add(omumg.ol)
|
||||
.add(omumg.union.base.g, "performAdd", "performAdd")
|
||||
.add(omumg.union.base.m, "add", "add")
|
||||
.add(omumg.union.base.l, "addedStatements", "addedStatements")
|
||||
.add(omumg.union.plus.g)
|
||||
.add(omumg.union.plus.m).add(omumg.union.plus.l).test();
|
||||
.add(omumg.union.plus.m)
|
||||
.add(omumg.union.plus.l)
|
||||
.test();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue