@Override public boolean isDifferent(final Node node) { if (super.isDifferent(node)) return true; final Literal literal = (Literal) node; if (_hasValue && literal._hasValue) { final Class<? extends Object> thisvalueClass = _value.getClass(); final Class<? extends Object> thatValueClass = literal._value.getClass(); // XXX due to simplification of numeric types in openllet a special case is needed to compare values of numeric literals if (isAcceptableNumber(thisvalueClass) && isAcceptableNumber(thatValueClass)) return OWLRealUtils.compare((Number) _value, (Number) literal._value) != 0; else return thisvalueClass.equals(thatValueClass) && !_value.equals(literal._value); } return false; }
@Override public boolean isDifferent(final Node node) { if (super.isDifferent(node)) return true; final Literal literal = (Literal) node; if (_hasValue && literal._hasValue) { final Class<? extends Object> thisvalueClass = _value.getClass(); final Class<? extends Object> thatValueClass = literal._value.getClass(); // XXX due to simplification of numeric types in openllet a special case is needed to compare values of numeric literals if (isAcceptableNumber(thisvalueClass) && isAcceptableNumber(thatValueClass)) return OWLRealUtils.compare((Number) _value, (Number) literal._value) != 0; else return thisvalueClass.equals(thatValueClass) && !_value.equals(literal._value); } return false; }
if (!y.isDifferent(z))
if (!y.isDifferent(z))
if (y.isDifferent(x))
if (y.isDifferent(x))
if (!y.isDifferent(z)) break;
if (!y.isDifferent(z)) break;
public boolean setSame(final Node node, final DependencySet ds) { if (isSame(node)) return false; if (isDifferent(node)) { //CHW - added for incremental reasoning support - this is needed as we will need to backjump if possible if (OpenlletOptions.USE_INCREMENTAL_CONSISTENCY) _abox.setClash(Clash.nominal(this, ds.union(_mergeDepends, _abox.doExplanation()).union(node._mergeDepends, _abox.doExplanation()), node.getName())); else _abox.setClash(Clash.nominal(this, ds, node.getName())); return false; } _mergedTo = node; _mergeDepends = ds.copy(_abox.getBranchIndex()); node.addMerged(this); return true; }
public boolean setSame(final Node node, final DependencySet ds) { if (isSame(node)) return false; if (isDifferent(node)) { //CHW - added for incremental reasoning support - this is needed as we will need to backjump if possible if (OpenlletOptions.USE_INCREMENTAL_CONSISTENCY) _abox.setClash(Clash.nominal(this, ds.union(_mergeDepends, _abox.doExplanation()).union(node._mergeDepends, _abox.doExplanation()), node.getName())); else _abox.setClash(Clash.nominal(this, ds, node.getName())); return false; } _mergedTo = node; _mergeDepends = ds.copy(_abox.getBranchIndex()); node.addMerged(this); return true; }
public boolean setDifferent(final Node node, final DependencySet dsParam) { DependencySet ds = dsParam; // add to effected list if (_abox.getBranchIndex() >= 0 && OpenlletOptions.TRACK_BRANCH_EFFECTS) _abox.getBranchEffectTracker().add(_abox.getBranchIndex(), node.getName()); if (isDifferent(node)) return false; if (isSame(node)) { ds = ds.union(getMergeDependency(true), _abox.doExplanation()); ds = ds.union(node.getMergeDependency(true), _abox.doExplanation()); _abox.setClash(Clash.nominal(this, ds, node.getName())); if (!ds.isIndependent()) return false; } ds = ds.copy(_abox.getBranchIndex()); _differents.put(node, ds); node.setDifferent(this, ds); _abox.setChanged(true); return true; }
public boolean setDifferent(final Node node, final DependencySet dsParam) { DependencySet ds = dsParam; // add to effected list if (_abox.getBranchIndex() >= 0 && OpenlletOptions.TRACK_BRANCH_EFFECTS) _abox.getBranchEffectTracker().add(_abox.getBranchIndex(), node.getName()); if (isDifferent(node)) return false; if (isSame(node)) { ds = ds.union(getMergeDependency(true), _abox.doExplanation()); ds = ds.union(node.getMergeDependency(true), _abox.doExplanation()); _abox.setClash(Clash.nominal(this, ds, node.getName())); if (!ds.isIndependent()) return false; } ds = ds.copy(_abox.getBranchIndex()); _differents.put(node, ds); node.setDifferent(this, ds); _abox.setChanged(true); return true; }
_abox.getKB().getDependencyIndex().addMergeDependency(y.getName(), z.getName(), ds); if (y.isDifferent(z))
_abox.getKB().getDependencyIndex().addMergeDependency(y.getName(), z.getName(), ds); if (y.isDifferent(z))
ds = ds.union(r.getExplainSubOrInv(edge.getRole()), _strategy.getABox().doExplanation()); if (next.isDifferent(head))
ds = ds.union(r.getExplainSubOrInv(edge.getRole()), _strategy.getABox().doExplanation()); if (next.isDifferent(head))