Commit 589e589e authored by Maxime Lefrançois's avatar Maxime Lefrançois
Browse files

solved exception when even the OWL reasoner doesn't want to read a certain ontology

parent c18780a6
Loading
Loading
Loading
Loading
+24 −20
Original line number Diff line number Diff line
@@ -52,7 +52,7 @@ import fr.emse.gitlab.saref.managers.RepositoryManager;
public class Clause_9_6_4_Checker extends AbstractClauseChecker {

	private static enum MESSAGE {
		profile, consistent, satisfiable;
		profile, consistent, satisfiable, exception;
	}

	private final SAREFExample example;
@@ -89,6 +89,7 @@ public class Clause_9_6_4_Checker extends AbstractClauseChecker {
		
		OntologyManager ontologyManager = pipeline.getOntologyManager();

		try {
			Set<Explanation<OWLAxiom>> incExplanation = ontologyManager.getInconsistenceExplanations(ontology, errorLogger);
			if (incExplanation != null && !incExplanation.isEmpty()) {
				String explanation = incExplanation.stream().map(e -> e.getAxioms().toString())
@@ -109,6 +110,9 @@ public class Clause_9_6_4_Checker extends AbstractClauseChecker {
					}
				});
			}
		} catch (Exception ex) {
			logError(getMessage(MESSAGE.exception), ex);
		}
			
	}

+1 −0
Original line number Diff line number Diff line
profile=The dataset in the example document shall satisfy the OWL2 DL profile. Violations are: %s
consistent=The dataset in the example document shall be Consistent. Violations are: %s
satisfiable=OWL Class %s declared in the example document should be satisfiable. Violations are: %s
exception=An exception occurred while trying to reason with the ontology.