@Override public boolean isTop() { return property.isTop(); } }
@Override public boolean isTop() { return property.isTop(); } }
/** * Normalizes and adds a reflexive object property axiom * <p> * ReflexiveObjectProperty := 'ReflexiveObjectProperty' '(' axiomAnnotations ObjectPropertyExpression ')' * <p> * Implements rule [O3]:<br> * - ignores if top (which is reflexive by definition)<br> * - inconsistency if bot (which is not reflexive)<br> * - otherwise, removes the inverse if required * * @throws InconsistentOntologyException */ @Override public void addReflexiveObjectPropertyAxiom(ObjectPropertyExpression ope) throws InconsistentOntologyException { if (ope.isTop()) return; if (ope.isBottom()) throw new InconsistentOntologyException(); reflexiveObjectPropertyAxioms.add(ope.isInverse() ? ope.getInverse() : ope); }
/** * Normalizes and adds an irreflexive object property axiom * <p> * ReflexiveObjectProperty := 'ReflexiveObjectProperty' '(' axiomAnnotations ObjectPropertyExpression ')' * <p> * Implements rule [O3]:<br> * - ignores if bot (which is irreflexive by definition)<br> * - inconsistency if top (which is reflexive)<br> * - otherwise, removes the inverse if required * * @throws InconsistentOntologyException */ @Override public void addIrreflexiveObjectPropertyAxiom(ObjectPropertyExpression ope) throws InconsistentOntologyException { if (ope.isTop()) throw new InconsistentOntologyException(); if (ope.isBottom()) return; irreflexiveObjectPropertyAxioms.add(ope.isInverse() ? ope.getInverse() : ope); }
/** * Normalizes and adds a reflexive object property axiom * <p> * ReflexiveObjectProperty := 'ReflexiveObjectProperty' '(' axiomAnnotations ObjectPropertyExpression ')' * <p> * Implements rule [O3]:<br> * - ignores if top (which is reflexive by definition)<br> * - inconsistency if bot (which is not reflexive)<br> * - otherwise, removes the inverse if required * * @throws InconsistentOntologyException */ @Override public void addReflexiveObjectPropertyAxiom(ObjectPropertyExpression ope) throws InconsistentOntologyException { if (ope.isTop()) return; if (ope.isBottom()) throw new InconsistentOntologyException(); reflexiveObjectPropertyAxioms.add(ope.isInverse() ? ope.getInverse() : ope); }
/** * Normalizes and adds an irreflexive object property axiom * <p> * ReflexiveObjectProperty := 'ReflexiveObjectProperty' '(' axiomAnnotations ObjectPropertyExpression ')' * <p> * Implements rule [O3]:<br> * - ignores if bot (which is irreflexive by definition)<br> * - inconsistency if top (which is reflexive)<br> * - otherwise, removes the inverse if required * * @throws InconsistentOntologyException */ @Override public void addIrreflexiveObjectPropertyAxiom(ObjectPropertyExpression ope) throws InconsistentOntologyException { if (ope.isTop()) throw new InconsistentOntologyException(); if (ope.isBottom()) return; irreflexiveObjectPropertyAxioms.add(ope.isInverse() ? ope.getInverse() : ope); }
if (!next.isTop() && !next.isBottom()) { if (nextEmptyEntity(next.getIRI(), 2)) { nEmptyRoles++;
/** * Creates an object property assertion * <p> * ObjectPropertyAssertion := 'ObjectPropertyAssertion' '(' axiomAnnotations * ObjectPropertyExpression sourceIndividual targetIndividual ')' * <p> * Implements rule [O4]: * - ignore (return null) if the property is top * - inconsistency if the property is bot * - swap the arguments to eliminate inverses */ public static ObjectPropertyAssertion createObjectPropertyAssertion(ObjectPropertyExpression ope, ObjectConstant o1, ObjectConstant o2) throws InconsistentOntologyException { if (ope.isTop()) return null; if (ope.isBottom()) throw new InconsistentOntologyException(); if (ope.isInverse()) return new ObjectPropertyAssertionImpl(ope.getInverse(), o2, o1); else return new ObjectPropertyAssertionImpl(ope, o1, o2); }
/** * Creates an object property assertion * <p> * ObjectPropertyAssertion := 'ObjectPropertyAssertion' '(' axiomAnnotations * ObjectPropertyExpression sourceIndividual targetIndividual ')' * <p> * Implements rule [O4]: * - ignore (return null) if the property is top * - inconsistency if the property is bot * - swap the arguments to eliminate inverses */ public static ObjectPropertyAssertion createObjectPropertyAssertion(ObjectPropertyExpression ope, ObjectConstant o1, ObjectConstant o2) throws InconsistentOntologyException { if (ope.isTop()) return null; if (ope.isBottom()) throw new InconsistentOntologyException(); if (ope.isInverse()) return new ObjectPropertyAssertionImpl(ope.getInverse(), o2, o1); else return new ObjectPropertyAssertionImpl(ope, o1, o2); }
if (!role.isBottom() && !role.isTop()) { graph.addVertex(role); graph.addVertex(role.getInverse()); if (roleIncl.getSub().isBottom() || roleIncl.getSuper().isTop()) continue; if (roleIncl.getSuper().isBottom()) { throw new RuntimeException("BOT cannot occur on the LHS - replaced by DISJ"); if (roleIncl.getSub().isTop()) { top = roleIncl.getSub(); graph.addVertex(top);
if (!role.isBottom() && !role.isTop()) { graph.addVertex(role); graph.addVertex(role.getInverse()); if (roleIncl.getSub().isBottom() || roleIncl.getSuper().isTop()) continue; if (roleIncl.getSuper().isBottom()) { throw new RuntimeException("BOT cannot occur on the LHS - replaced by DISJ"); if (roleIncl.getSub().isTop()) { top = roleIncl.getSub(); graph.addVertex(top);