Package org.ontoware.rdf2go.model.impl

Examples of org.ontoware.rdf2go.model.impl.DiffImpl


            assertEquals(1, i);
            assertFalse(diff.getRemoved().iterator().hasNext());
          }
        });
    this.notifyingModel.open();
    Diff diff = new DiffImpl();
    diff.addStatement(subject, predicate, object);
    this.notifyingModel.update(diff);
    this.notifyingModel.close();
  }
View Full Code Here


      }
    }
    it.close();
    ClosableIterator<Statement> addIt = add.iterator();
    ClosableIterator<Statement> removeIt = remove.iterator();
    model.update(new DiffImpl(addIt, removeIt));
    addIt.close();
    removeIt.close();
    add.close();
    remove.close();
  }
View Full Code Here

      log.trace("rule adds    "+stmt);
      addModel.addStatement(stmt);
    }
    it.close();

    DiffReader diff = new DiffImpl(addModel.iterator(), removeModel.iterator());
    addModel.close();
    removeModel.close();
    model.update(diff);
  }
View Full Code Here

      log.trace("rule infers    "+stmt);
      addModel.addStatement(stmt);
    }
    it.close();

    DiffReader diff = new DiffImpl(addModel.iterator(), removeModel.iterator());
    addModel.close();
    removeModel.close();
    model.update(diff);
  }
View Full Code Here

    Model remove = RDF2Go.getModelFactory().createModel();
    remove.open();
    Model add = RDF2Go.getModelFactory().createModel();
    add.open();
    add.addStatement(a, b, c);
    DiffReader diff = new DiffImpl(add.iterator(), remove.iterator());
    add.close();
    remove.close();
   
    this.model.update(diff);
   
View Full Code Here

    this.modelset.addStatement(stmt);
    assertTrue(this.modelset.containsStatements(a, blankNode, RDF.type, RDF.Statement));
    this.modelset.removeStatement(stmt);
    assertFalse(this.modelset.containsStatements(a, blankNode, RDF.type, RDF.Statement));
   
    Diff diff = new DiffImpl();
    diff.addStatement(stmt);
    this.modelset.update(diff);
    assertTrue(this.modelset.containsStatements(a, blankNode, RDF.type, RDF.Statement));
    diff = new DiffImpl();
    diff.removeStatement(stmt);
    this.modelset.update(diff);
    assertFalse(this.modelset.containsStatements(a, blankNode, RDF.type, RDF.Statement));
  }
View Full Code Here

    Model remove = RDF2Go.getModelFactory().createModel();
    remove.open();
    Model add = RDF2Go.getModelFactory().createModel();
    add.open();
    add.addStatement(a, b, c);
    DiffReader diff = new DiffImpl(add.iterator(), remove.iterator());
    add.close();
    remove.close();
   
    this.modelset.update(diff);
  }
View Full Code Here

                add.addStatement(subj, pred, obj);
            }
        }
        ClosableIterator<Statement> addIt = add.iterator();
        ClosableIterator<Statement> removeIt = remove.iterator();
        model.update(new DiffImpl(addIt, removeIt));
        addIt.close();
        removeIt.close();
        add.close();
        remove.close();
    }
View Full Code Here

TOP

Related Classes of org.ontoware.rdf2go.model.impl.DiffImpl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.