@Override public boolean isTop() { return property.isTop(); } }
@Override public boolean isTop() { return property.isTop(); } }
/** * Creates a data property assertion * <p> * DataPropertyAssertion := 'DataPropertyAssertion' '(' axiomAnnotations * DataPropertyExpression sourceIndividual targetValue ')' * <p> * Implements rule [D4]: * - ignore (return null) if the property is top * - inconsistency if the property is bot */ public static DataPropertyAssertion createDataPropertyAssertion(DataPropertyExpression dpe, ObjectConstant o1, ValueConstant o2) throws InconsistentOntologyException { if (dpe.isTop()) return null; if (dpe.isBottom()) throw new InconsistentOntologyException(); return new DataPropertyAssertionImpl(dpe, o1, o2); }
/** * Creates a data property assertion * <p> * DataPropertyAssertion := 'DataPropertyAssertion' '(' axiomAnnotations * DataPropertyExpression sourceIndividual targetValue ')' * <p> * Implements rule [D4]: * - ignore (return null) if the property is top * - inconsistency if the property is bot */ public static DataPropertyAssertion createDataPropertyAssertion(DataPropertyExpression dpe, ObjectConstant o1, ValueConstant o2) throws InconsistentOntologyException { if (dpe.isTop()) return null; if (dpe.isBottom()) throw new InconsistentOntologyException(); return new DataPropertyAssertionImpl(dpe, o1, o2); }
if (!next.isTop() && !next.isBottom()) { if (nextEmptyEntity(next.getIRI(), 2)) { nEmptyRoles++;
/** * Normalizes and adds a data property range axiom * <p> * DataPropertyRange := 'DataPropertyRange' '(' axiomAnnotations DataPropertyExpression DataRange ')' * <p> * Implements rule [D3]: * - ignore if the property is bot or the range is rdfs:Literal (top datatype) * - inconsistency if the property is top but the range is not rdfs:Literal * * @throws InconsistentOntologyException */ @Override public void addDataPropertyRangeAxiom(DataPropertyRangeExpression range, Datatype datatype) throws InconsistentOntologyException { checkSignature(range); checkSignature(datatype); if (datatype.equals(DatatypeImpl.rdfsLiteral)) return; // otherwise the datatype is not top if (range.getProperty().isBottom()) return; if (range.getProperty().isTop()) throw new InconsistentOntologyException(); BinaryAxiom<DataRangeExpression> ax = new BinaryAxiomImpl<>(range, datatype); subDataRangeAxioms.add(ax); }
/** * Normalizes and adds a data property range axiom * <p> * DataPropertyRange := 'DataPropertyRange' '(' axiomAnnotations DataPropertyExpression DataRange ')' * <p> * Implements rule [D3]: * - ignore if the property is bot or the range is rdfs:Literal (top datatype) * - inconsistency if the property is top but the range is not rdfs:Literal * * @throws InconsistentOntologyException */ @Override public void addDataPropertyRangeAxiom(DataPropertyRangeExpression range, Datatype datatype) throws InconsistentOntologyException { checkSignature(range); checkSignature(datatype); if (datatype.equals(DatatypeImpl.rdfsLiteral)) return; // otherwise the datatype is not top if (range.getProperty().isBottom()) return; if (range.getProperty().isTop()) throw new InconsistentOntologyException(); BinaryAxiom<DataRangeExpression> ax = new BinaryAxiomImpl<>(range, datatype); subDataRangeAxioms.add(ax); }
if (!role.isBottom() && !role.isTop()) graph.addVertex(role); 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); 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);