public InconsistentOntologyException convert( ElkInconsistentOntologyException e) { return new InconsistentOntologyException(); }
public InconsistentOntologyException convert( ElkInconsistentOntologyException e) { return new InconsistentOntologyException(); }
public InconsistentOntologyException convert( ElkInconsistentOntologyException e) { return new InconsistentOntologyException(); }
protected void throwInconsistentOntologyExceptionIfNecessary() { if (!isConsistent() && m_configuration.throwInconsistentOntologyException) throw new InconsistentOntologyException(); } protected void throwFreshEntityExceptionIfNecessary(OWLObject... objects) {
protected void throwInconsistentOntologyExceptionIfNecessary() { if (!isConsistent() && m_configuration.throwInconsistentOntologyException) throw new InconsistentOntologyException(); }
private void checkConsistency() { if (interrupted.get()) { throw new ReasonerInterruptedException(); } if (!isConsistent()) { throw new InconsistentOntologyException(); } }
private static PelletRuntimeException convert(final PelletRuntimeException e) throws InconsistentOntologyException, ReasonerInterruptedException, TimeOutException, FreshEntitiesException { if (e instanceof openllet.core.exceptions.TimeoutException) throw new TimeOutException(); if (e instanceof openllet.core.exceptions.TimerInterruptedException) throw new ReasonerInterruptedException(e); if (e instanceof openllet.core.exceptions.InconsistentOntologyException) throw new InconsistentOntologyException(); if (e instanceof openllet.core.exceptions.UndefinedEntityException) { final Set<OWLEntity> unknown = Collections.emptySet(); throw new FreshEntitiesException(unknown); } return e; }
private static PelletRuntimeException convert(final PelletRuntimeException e) throws InconsistentOntologyException, ReasonerInterruptedException, TimeOutException, FreshEntitiesException { if (e instanceof openllet.core.exceptions.TimeoutException) throw new TimeOutException(); if (e instanceof openllet.core.exceptions.TimerInterruptedException) throw new ReasonerInterruptedException(e); if (e instanceof openllet.core.exceptions.InconsistentOntologyException) throw new InconsistentOntologyException(); if (e instanceof openllet.core.exceptions.UndefinedEntityException) { final Set<OWLEntity> unknown = Collections.emptySet(); throw new FreshEntitiesException(unknown); } return e; }
private static PelletRuntimeException convert(final PelletRuntimeException e) throws InconsistentOntologyException, ReasonerInterruptedException, TimeOutException, FreshEntitiesException { if (e instanceof openllet.core.exceptions.TimeoutException) // throw e; throw new TimeOutException(); if (e instanceof openllet.core.exceptions.TimerInterruptedException) throw new ReasonerInterruptedException(e); if (e instanceof openllet.core.exceptions.InconsistentOntologyException) throw new InconsistentOntologyException(e); if (e instanceof openllet.core.exceptions.UndefinedEntityException) { final Set<OWLEntity> unknown = Collections.emptySet(); throw new FreshEntitiesException(unknown); } return e; }
private static PelletRuntimeException convert(final PelletRuntimeException e) throws InconsistentOntologyException, ReasonerInterruptedException, TimeOutException, FreshEntitiesException { if (e instanceof openllet.core.exceptions.TimeoutException) // throw e; throw new TimeOutException(); if (e instanceof openllet.core.exceptions.TimerInterruptedException) throw new ReasonerInterruptedException(e); if (e instanceof openllet.core.exceptions.InconsistentOntologyException) throw new InconsistentOntologyException(e); if (e instanceof openllet.core.exceptions.UndefinedEntityException) { final Set<OWLEntity> unknown = Collections.emptySet(); throw new FreshEntitiesException(unknown); } return e; }
/** ensure that KB is realised */ @PortedFrom(file = "Kernel.h", name = "realiseKB") public void realiseKB() { if (!isKBRealised()) { processKB(KBREALISED); } if (!isKBConsistent()) { throw new InconsistentOntologyException("Ontology is inconsistent"); } }
@Override public void visit(AxiomRoleReflexive axiom) { ensureNames(axiom.getRole()); Role role = getRole(axiom.getRole(), "Role expression expected in Role Reflexivity axiom"); if (role.isBottom()) { throw new InconsistentOntologyException("Top role used in reflexivity axiom " + axiom); } if (!role.isTop()) { role.setReflexive(true); } }
@Override public void visit(AxiomDRoleFunctional axiom) { ensureNames(axiom.getRole()); Role role = getRole(axiom.getRole(), "Role expression expected in Data Role Functionality axiom"); if (role.isTop()) { throw new InconsistentOntologyException("Top role used in role functionality axiom " + axiom); } if (!role.isBottom()) { role.setFunctional(); } }
@Override public void visit(AxiomORoleFunctional axiom) { ensureNames(axiom.getRole()); Role role = getRole(axiom.getRole(), "Role expression expected in Object Role Functionality axiom"); if (role.isTop()) { throw new InconsistentOntologyException("Top role used in role functionality axiom " + axiom); } if (!role.isBottom()) { role.setFunctional(); } }
@Override public void visit(AxiomRoleInverseFunctional axiom) { ensureNames(axiom.getRole()); Role role = getRole(axiom.getRole(), "Role expression expected in Role Inverse Functionality axiom"); if (role.isTop()) { throw new InconsistentOntologyException("Top role used in inverse functional axiom " + axiom); } if (!role.isBottom()) { role.inverse().setFunctional(); } }
@Override public void visit(AxiomRoleAsymmetric axiom) { ensureNames(axiom.getRole()); Role r = getRole(axiom.getRole(), "Role expression expected in Role Asymmetry axiom"); if (r.isTop()) { throw new InconsistentOntologyException("Top role used in asymmetry axiom " + axiom); } if (!r.isBottom()) { r.setAsymmetric(true); tbox.getORM().addDisjointRoles(r, r.inverse()); } }
@Override public void visit(AxiomRelatedTo axiom) { ensureNames(axiom.getIndividual()); ensureNames(axiom.getRelation()); ensureNames(axiom.getRelatedIndividual()); Role r = getRole(axiom.getRelation(), "Role expression expected in Related To axiom"); if (r.isBottom()) { throw new InconsistentOntologyException("Top role used in assertion axiom " + axiom); } if (!r.isTop()) { Individual i = getIndividual(axiom.getIndividual(), "Individual expected in Related To axiom"); Individual j = getIndividual(axiom.getRelatedIndividual(), "Individual expected in Related To axiom"); tbox.registerIndividualRelation(i, r, j); } }
@Override public void visit(AxiomRoleIrreflexive axiom) { ensureNames(axiom.getRole()); Role r = getRole(axiom.getRole(), "Role expression expected in Role Irreflexivity axiom"); if (r.isTop()) { throw new InconsistentOntologyException("Top role used in irreflexivity axiom " + axiom); } if (!r.isBottom()) { r.setDomain(createSNFNot(DLTreeFactory.createSNFSelf(axiom.getRole().accept(expressionTranslator)))); r.setDomain(createSNFNot(buildTree(new Lexeme(Token.SELF), axiom.getRole().accept(expressionTranslator)))); r.setIrreflexive(true); } }
@Override public void visit(AxiomValueOf axiom) { ensureNames(axiom.getIndividual()); ensureNames(axiom.getAttribute()); getIndividual(axiom.getIndividual(), "Individual expected in Value Of axiom"); Role r = getRole(axiom.getAttribute(), "Role expression expected in Value Of axiom"); if (r.isBottom()) { throw new InconsistentOntologyException("Top role used in property assertion axiom " + axiom); } if (!r.isTop()) { // nothing to do for universal role // make an axiom i:EA.V tbox.addSubsumeAxiom(axiom.getIndividual().accept(expressionTranslator), createSNFExists(axiom .getAttribute().accept(expressionTranslator), axiom.getValue().accept(expressionTranslator))); } }
@Override public void visit(AxiomValueOfNot axiom) { ensureNames(axiom.getIndividual()); ensureNames(axiom.getAttribute()); getIndividual(axiom.getIndividual(), "Individual expected in Value Of Not axiom"); Role r = getRole(axiom.getAttribute(), "Role expression expected in Value Of Not axiom"); if (r.isTop()) { throw new InconsistentOntologyException("Top role used in negative property assertion axiom " + axiom); } if (!r.isBottom()) { // make an axiom i:AA.\neg V tbox.addSubsumeAxiom(axiom.getIndividual().accept(expressionTranslator), createSNFForall(axiom .getAttribute().accept(expressionTranslator), createSNFNot(axiom.getValue().accept( expressionTranslator)))); } }