/** * @param newBranch * @return a new DependencySet object with a new _branch number where the IntSet is openllet.shared.hash (changing one will change the other). */ public DependencySet copy(final int newBranch) { return new DependencySet(newBranch, _depends, _explain); }
/** * @param newBranch * @return a new DependencySet object with a new _branch number where the IntSet is openllet.shared.hash (changing one will change the other). */ public DependencySet copy(final int newBranch) { return new DependencySet(newBranch, _depends, _explain); }
/** * @param explain * @param doExplanation * @return the union as dependencySet */ public DependencySet union(final Set<ATermAppl> explain, final boolean doExplanation) { if (!doExplanation || explain.isEmpty()) return this; return new DependencySet(_branch, _depends.copy(), SetUtils.union(_explain, explain)); }
default boolean addSubRole(final ATerm sub, final ATerm sup) { final DependencySet ds = OpenlletOptions.USE_TRACING ? new DependencySet(ATermUtils.makeSubProp(sub, sup)) : DependencySet.INDEPENDENT; return addSubRole(sub, sup, ds); }
@Override public void setTransitive(final boolean b) { final DependencySet ds = OpenlletOptions.USE_TRACING ? new DependencySet(ATermUtils.makeTransitive(_name)) : DependencySet.INDEPENDENT; setTransitive(b, ds); }
default void addDisjointProperty(final ATermAppl p1, final ATermAppl p2) { final DependencySet ds = OpenlletOptions.USE_TRACING ? new DependencySet(ATermUtils.makeDisjointProperty(p1, p2)) : DependencySet.INDEPENDENT; addDisjointProperty(p1, p2, ds); }
@Override public void setTransitive(final boolean b) { final DependencySet ds = OpenlletOptions.USE_TRACING ? new DependencySet(ATermUtils.makeTransitive(_name)) : DependencySet.INDEPENDENT; setTransitive(b, ds); }
default boolean addEquivalentRole(final ATerm s, final ATerm r) { final DependencySet ds = OpenlletOptions.USE_TRACING ? new DependencySet(ATermUtils.makeEqProp(s, r)) : DependencySet.INDEPENDENT; return addEquivalentRole(r, s, ds); }
@Override public void addType(final ATermAppl x, final ATermAppl c) { final DependencySet ds = OpenlletOptions.USE_TRACING ? new DependencySet(ATermUtils.makeTypeAtom(x, c)) : DependencySet.INDEPENDENT; addType(x, c, ds); }
/** * r is superrole of this role * * @param r */ @Override public void addSuperRole(final Role r) { final DependencySet ds = OpenlletOptions.USE_TRACING ? new DependencySet(ATermUtils.makeSubProp(_name, r.getName())) : DependencySet.INDEPENDENT; addSuperRole(r, ds); }
default void addSymmetricProperty(final ATermAppl p) { if (OpenlletOptions.IGNORE_INVERSES) { getLogger().warning("Ignoring SymmetricProperty(" + p + ") axiom due to the IGNORE_INVERSES option"); return; } getChanges().add(ChangeType.RBOX_ADD); final DependencySet ds = OpenlletOptions.USE_TRACING ? new DependencySet(ATermUtils.makeSymmetric(p)) : DependencySet.INDEPENDENT; getRBox().addInverseRole(p, p, ds); getLogger().finer(() -> "sym-prop " + p); }
default void addAsymmetricProperty(final ATermAppl p) { if (null == p) return; getChanges().add(ChangeType.RBOX_ADD); final Role r = getRBox().getDefinedRole(p); final DependencySet ds = OpenlletOptions.USE_TRACING ? new DependencySet(ATermUtils.makeAsymmetric(p)) : DependencySet.INDEPENDENT; r.setAsymmetric(true, ds); getLogger().finer(() -> "anti-sym-prop " + p); }
default void addIrreflexiveProperty(final ATermAppl p) { getChanges().add(ChangeType.RBOX_ADD); final Role r = getRBox().getDefinedRole(p); final DependencySet ds = OpenlletOptions.USE_TRACING ? new DependencySet(ATermUtils.makeIrreflexive(p)) : DependencySet.INDEPENDENT; r.setIrreflexive(true, ds); getLogger().finer(() -> "irreflexive-prop " + p); }
default void addFunctionalProperty(final ATermAppl p) { getChanges().add(ChangeType.RBOX_ADD); final Role r = getRBox().getDefinedRole(p); final DependencySet ds = OpenlletOptions.USE_TRACING ? new DependencySet(ATermUtils.makeFunctional(p)) : DependencySet.INDEPENDENT; r.setFunctional(true, ds); getLogger().finer(() -> "func-prop " + p); }
default void addAsymmetricProperty(final ATermAppl p) { if (null == p) return; getChanges().add(ChangeType.RBOX_ADD); final Role r = getRBox().getDefinedRole(p); final DependencySet ds = OpenlletOptions.USE_TRACING ? new DependencySet(ATermUtils.makeAsymmetric(p)) : DependencySet.INDEPENDENT; r.setAsymmetric(true, ds); getLogger().finer(() -> "anti-sym-prop " + p); }
default void addReflexiveProperty(final ATermAppl p) { if (null == p) return; getChanges().add(ChangeType.RBOX_ADD); final Role r = getRBox().getDefinedRole(p); final DependencySet ds = OpenlletOptions.USE_TRACING ? new DependencySet(ATermUtils.makeReflexive(p)) : DependencySet.INDEPENDENT; r.setReflexive(true, ds); getLogger().finer(() -> "reflexive-prop " + p); }
default void addIrreflexiveProperty(final ATermAppl p) { getChanges().add(ChangeType.RBOX_ADD); final Role r = getRBox().getDefinedRole(p); final DependencySet ds = OpenlletOptions.USE_TRACING ? new DependencySet(ATermUtils.makeIrreflexive(p)) : DependencySet.INDEPENDENT; r.setIrreflexive(true, ds); getLogger().finer(() -> "irreflexive-prop " + p); }
/** * r is subrole of this role * * @param r */ @Override public void addSubRole(final Role r) { final DependencySet ds = OpenlletOptions.USE_TRACING ? new DependencySet(ATermUtils.makeSubProp(r.getName(), getName())) : DependencySet.INDEPENDENT; addSubRole(r, ds); }
default void addTransitiveProperty(final ATermAppl p) { if (null == p) return; getChanges().add(ChangeType.RBOX_ADD); final Role r = getRBox().getDefinedRole(p); final DependencySet ds = OpenlletOptions.USE_TRACING ? new DependencySet(ATermUtils.makeTransitive(p)) : DependencySet.INDEPENDENT; // r.setTransitive(true); r.addSubRoleChain(ATermUtils.makeList(new ATerm[] { p, p }), ds); getLogger().finer(() -> "trans-prop " + p); }
/** * r is subrole of this role * * @param r */ @Override public void addSubRole(final Role r) { final DependencySet ds = OpenlletOptions.USE_TRACING ? new DependencySet(ATermUtils.makeSubProp(r.getName(), getName())) : DependencySet.INDEPENDENT; addSubRole(r, ds); }