/** * Equals method */ @Override public boolean equals(final Object other) { if (other instanceof ClashDependency) return _assertion.equals(((ClashDependency) other)._assertion) && _clash.getNode().equals(((ClashDependency) other)._clash.getNode()) && _clash.getType() == ((ClashDependency) other)._clash.getType() && _clash.getDepends().equals(((ClashDependency) other)._clash.getDepends()); else return false; }
public static Clash maxCardinality(final Node node, final DependencySet depends) { return new Clash(node, ClashType.MAX_CARD, depends); }
public String maxCardinalityExplanation() { return describeNode(getNode()) + " has more than " + _args[1] + " values for property " + _args[0] + " violating the cardinality restriction"; }
str = _clashExplanation; else if (getType() == ClashType.UNEXPLAINED) str = "No _explanation was generated."; else if (_args == null) str = "No specific _explanation was generated. Generic _explanation: " + getType().getExplanation(); else if (getType() == ClashType.ATOMIC) str = atomicExplanation(); else if (getType() == ClashType.BOTTOM_PROP) str = bottomExplanation(); else if (getType() == ClashType.MAX_CARD) str = maxCardinalityExplanation(); else if (getType() == ClashType.FUNC_MAX_CARD) str = functionalCardinalityExplanation(); else if (getType() == ClashType.NOMINAL) str = nominalExplanation(); else if (getType() == ClashType.MISSING_DATATYPE) str = missingDatatypeExplanation(); else if (getType() == ClashType.VALUE_DATATYPE) str = valueDatatypeExplanation(); else
public Clash copyTo(final ABoxImpl abox) { return new Clash(abox.getNode(getNode().getName()), getType(), getDepends(), _clashExplanation); }
clashDepends = _abox.getClash().getDepends(); final Clash clash = _abox.isClosed() ? _abox.getClash() : Clash.atomic(node, clashDepends, d); _logger.fine("CLASH: Branch " + getBranchIndexInABox() + " " + clash + "!" + " " + clashDepends.getExplain()); _abox.setClash(Clash.atomic(node, clashDepends.union(ds, _abox.doExplanation()), positive)); _abox.setClash(Clash.atomic(node, clashDepends.union(ds, _abox.doExplanation()))); _abox.getKB().getDependencyIndex().addCloseBranchDependency(this, _abox.getClash().getDepends());
clashDepends = clashDepends.union(ds, _abox.doExplanation()); clashDepends = clashDepends.copy(_abox.getBranchIndex()); _abox.setClash(Clash.atomic(this, clashDepends, positive)); _abox.setClash(Clash.unexplained(this, selfEdges.getDepends(_abox.doExplanation())));
public ClashType getClashType() { return getType(); }
@Override public String getExplanation() { if (_lastClash == null) return "No inconsistency was found! There is no clashExplanation generated."; else return _lastClash.detailedString(); }
protected void addOutEdge(final Edge edge) { setChanged(ALL); setChanged(MAX); _applyNext[MAX] = 0; if (edge.getRole().isBottom()) _abox.setClash(Clash.bottomProperty(edge.getFrom(), edge.getDepends(), edge.getRole().getName())); else _outEdges.add(edge); }
final ATermAppl positive = ATermUtils.isNot(notC) ? c : notC; clashDepends = clashDepends.union(ds, _abox.doExplanation()); _abox.setClash(Clash.atomic(this, clashDepends, positive));
private void applyDisjointness(final Individual subj, final Role pred, final Node obj, final DependencySet dsParam) { DependencySet ds = dsParam; // TODO what about inv edges? // TODO improve this check final Set<Role> disjoints = pred.getDisjointRoles(); if (disjoints.isEmpty()) return; final EdgeList edges = subj.getEdgesTo(obj); for (int i = 0, n = edges.size(); i < n; i++) { final Edge otherEdge = edges.get(i); if (disjoints.contains(otherEdge.getRole())) { ds = ds.union(otherEdge.getDepends(), _abox.doExplanation()); ds = ds.union(pred.getExplainDisjointRole(otherEdge.getRole()), _abox.doExplanation()); _abox.setClash(Clash.disjointProps(subj, ds, pred.getName(), otherEdge.getRole().getName())); return; } } }
_assertedClashes.add(clash.copyTo(this));
str = _clashExplanation; else if (getType() == ClashType.UNEXPLAINED) str = "No _explanation was generated."; else if (_args == null) str = "No specific _explanation was generated. Generic _explanation: " + getType().getExplanation(); else if (getType() == ClashType.ATOMIC) str = atomicExplanation(); else if (getType() == ClashType.BOTTOM_PROP) str = bottomExplanation(); else if (getType() == ClashType.MAX_CARD) str = maxCardinalityExplanation(); else if (getType() == ClashType.FUNC_MAX_CARD) str = functionalCardinalityExplanation(); else if (getType() == ClashType.NOMINAL) str = nominalExplanation(); else if (getType() == ClashType.MISSING_DATATYPE) str = missingDatatypeExplanation(); else if (getType() == ClashType.VALUE_DATATYPE) str = valueDatatypeExplanation(); else
public Clash copyTo(final ABoxImpl abox) { return new Clash(abox.getNode(getNode().getName()), getType(), getDepends(), _clashExplanation); }
clashDepends = _abox.getClash().getDepends(); final Clash clash = _abox.isClosed() ? _abox.getClash() : Clash.atomic(node, clashDepends, d); _logger.fine("CLASH: Branch " + getBranchIndexInABox() + " " + clash + "!" + " " + clashDepends.getExplain()); _abox.setClash(Clash.atomic(node, clashDepends.union(ds, _abox.doExplanation()), positive)); _abox.setClash(Clash.atomic(node, clashDepends.union(ds, _abox.doExplanation()))); _abox.getKB().getDependencyIndex().addCloseBranchDependency(this, _abox.getClash().getDepends());
clashDepends = clashDepends.union(ds, _abox.doExplanation()); clashDepends = clashDepends.copy(_abox.getBranchIndex()); _abox.setClash(Clash.atomic(this, clashDepends, positive)); _abox.setClash(Clash.unexplained(this, selfEdges.getDepends(_abox.doExplanation())));
public ClashType getClashType() { return getType(); }
@Override public String getExplanation() { if (_lastClash == null) return "No inconsistency was found! There is no clashExplanation generated."; else return _lastClash.detailedString(); }
protected void addOutEdge(final Edge edge) { setChanged(ALL); setChanged(MAX); _applyNext[MAX] = 0; if (edge.getRole().isBottom()) _abox.setClash(Clash.bottomProperty(edge.getFrom(), edge.getDepends(), edge.getRole().getName())); else _outEdges.add(edge); }