/** * @return edges that were newly added */ public Iterator<Edge> getRemovedEdgeIterator() { return _abox.getIncrementalChangeTracker().deletedEdges(); }
/** * @return the unpruned indivdiuals */ public Iterator<Node> getUnPrunedIterator() { return _abox.getIncrementalChangeTracker().unprunedNodes(); }
/** * @return edges that were newly added */ public Iterator<Edge> getNewEdgeIterator() { return _abox.getIncrementalChangeTracker().newEdges(); }
/** * @return individuals to which we need to apply the initialization rules */ @Override public Iterator<Individual> getInitializeIterator() { return _abox.getIncrementalChangeTracker().updatedIndividuals(); }
/** * @return individuals to which we need to apply the initialization rules */ @Override public Iterator<Individual> getInitializeIterator() { return _abox.getIncrementalChangeTracker().updatedIndividuals(); }
/** * @return the unpruned indivdiuals */ public Iterator<Node> getUnPrunedIterator() { return _abox.getIncrementalChangeTracker().unprunedNodes(); }
/** * @return edges that were newly added */ public Iterator<Edge> getRemovedEdgeIterator() { return _abox.getIncrementalChangeTracker().deletedEdges(); }
/** * @return types that were deleted */ public Iterator<Map.Entry<Node, Set<ATermAppl>>> getRemovedTypeIterator() { return _abox.getIncrementalChangeTracker().deletedTypes(); }
/** * @return individuals that were newly added */ public Iterator<Individual> getNewIterator() { return _abox.getIncrementalChangeTracker().newIndividuals(); }
/** * @return individuals that were newly added */ public Iterator<Individual> getNewIterator() { return _abox.getIncrementalChangeTracker().newIndividuals(); }
/** * @return types that were deleted */ public Iterator<Map.Entry<Node, Set<ATermAppl>>> getRemovedTypeIterator() { return _abox.getIncrementalChangeTracker().deletedTypes(); }
/** * @return edges that were newly added */ public Iterator<Edge> getNewEdgeIterator() { return _abox.getIncrementalChangeTracker().newEdges(); }
@Override public void addSame(final ATermAppl i1, final ATermAppl i2) { if (null == i1 || null == i2) return; // set addition flag _changes.add(ChangeType.ABOX_ADD); if (canUseIncConsistency()) { // TODO: refactor the access to the updatedIndividuals and // newIndividuals - add get method _abox.getIncrementalChangeTracker().addUpdatedIndividual(_abox.getIndividual(i1)); _abox.getIncrementalChangeTracker().addUpdatedIndividual(_abox.getIndividual(i2)); // add to pseudomodel - note _branch is not set to zero - this is // done in SHOIQIncStrategy, prior // to merging _nodes _abox.addSame(i1, i2); } _abox.addSame(i1, i2); _logger.finer(() -> "same " + i1 + " " + i2); }
@Override public void addSame(final ATermAppl i1, final ATermAppl i2) { if (null == i1 || null == i2) return; // set addition flag _changes.add(ChangeType.ABOX_ADD); if (canUseIncConsistency()) { // TODO: refactor the access to the updatedIndividuals and // newIndividuals - add get method _abox.getIncrementalChangeTracker().addUpdatedIndividual(_abox.getIndividual(i1)); _abox.getIncrementalChangeTracker().addUpdatedIndividual(_abox.getIndividual(i2)); // add to pseudomodel - note _branch is not set to zero - this is // done in SHOIQIncStrategy, prior // to merging _nodes _abox.addSame(i1, i2); } _abox.addSame(i1, i2); _logger.finer(() -> "same " + i1 + " " + i2); }
@Override public void addDifferent(final ATermAppl i1, final ATermAppl i2) { if (null == i1 || null == i2) return; // set addition flag _changes.add(ChangeType.ABOX_ADD); // if we can use incremental consistency checking then add to // pseudomodel if (canUseIncConsistency()) { // TODO: refactor the access to the updatedIndividuals and // newIndividuals - add get method _abox.getIncrementalChangeTracker().addUpdatedIndividual(_abox.getIndividual(i1)); _abox.getIncrementalChangeTracker().addUpdatedIndividual(_abox.getIndividual(i2)); // add to pseudomodel - note _branch must be temporarily set to 0 to // ensure that asssertion // will not be restored during backtracking final int branch = _abox.getBranchIndex(); _abox.setBranchIndex(0); _abox.addDifferent(i1, i2); _abox.setBranchIndex(branch); } _abox.addDifferent(i1, i2); _logger.finer(() -> "diff " + i1 + " " + i2); }
@Override public void addDifferent(final ATermAppl i1, final ATermAppl i2) { if (null == i1 || null == i2) return; // set addition flag _changes.add(ChangeType.ABOX_ADD); // if we can use incremental consistency checking then add to // pseudomodel if (canUseIncConsistency()) { // TODO: refactor the access to the updatedIndividuals and // newIndividuals - add get method _abox.getIncrementalChangeTracker().addUpdatedIndividual(_abox.getIndividual(i1)); _abox.getIncrementalChangeTracker().addUpdatedIndividual(_abox.getIndividual(i2)); // add to pseudomodel - note _branch must be temporarily set to 0 to // ensure that asssertion // will not be restored during backtracking final int branch = _abox.getBranchIndex(); _abox.setBranchIndex(0); _abox.addDifferent(i1, i2); _abox.setBranchIndex(branch); } _abox.addDifferent(i1, i2); _logger.finer(() -> "diff " + i1 + " " + i2); }
@Override public void addType(final ATermAppl i, final ATermAppl c, final DependencySet ds) { if (null == i || null == c || null == ds) return; // set addition flag _changes.add(ChangeType.ABOX_ADD); // if use incremental reasoning then update the cached pseudo model as // well if (canUseIncConsistency()) // TODO: refactor the access to the updatedIndividuals and // newIndividuals - add get method // add this _individuals to the affected list - used for inc. // consistency checking _abox.getIncrementalChangeTracker().addUpdatedIndividual(_abox.getIndividual(i)); synchronized (_abox) { _abox.setSyntacticUpdate(true); // TODO : find another way to alter behavior of abox _abox.addType(i, c, ds); _abox.setSyntacticUpdate(false); } if (canUseIncConsistency()) // incrementally update the expressivity of the KB, so that we do // not have to reperform if from scratch! updateExpressivity(i, c); _logger.finer(() -> "type " + i + " " + c); }
@Override public void addType(final ATermAppl i, final ATermAppl c, final DependencySet ds) { if (null == i || null == c || null == ds) return; // set addition flag _changes.add(ChangeType.ABOX_ADD); // if use incremental reasoning then update the cached pseudo model as // well if (canUseIncConsistency()) // TODO: refactor the access to the updatedIndividuals and // newIndividuals - add get method // add this _individuals to the affected list - used for inc. // consistency checking _abox.getIncrementalChangeTracker().addUpdatedIndividual(_abox.getIndividual(i)); synchronized (_abox) { _abox.setSyntacticUpdate(true); // TODO : find another way to alter behavior of abox _abox.addType(i, c, ds); _abox.setSyntacticUpdate(false); } if (canUseIncConsistency()) // incrementally update the expressivity of the KB, so that we do // not have to reperform if from scratch! updateExpressivity(i, c); _logger.finer(() -> "type " + i + " " + c); }
_abox.getIncrementalChangeTracker().addUpdatedIndividual(_abox.getIndividual(outer.getFirst())); _abox.getIncrementalChangeTracker().addUpdatedIndividual(_abox.getIndividual(inner.getFirst())); inner = inner.getNext();
final IncrementalChangeTracker tracker = _kb.getABox().getIncrementalChangeTracker();