diff options
| author | Federico Igne <federico.igne@cs.ox.ac.uk> | 2022-05-18 15:14:34 +0100 |
|---|---|---|
| committer | Federico Igne <federico.igne@cs.ox.ac.uk> | 2022-05-18 15:41:21 +0100 |
| commit | bbb4d3cdab63dec778ffed93825a81f335b9f4b3 (patch) | |
| tree | b7f4566756527a131dc5c312c319bef4ecc72a04 /src/main/java/org/semanticweb/karma2/profile | |
| parent | a533362a8fab42a385f3f40a20503b7b59b567da (diff) | |
| download | ACQuA-bbb4d3cdab63dec778ffed93825a81f335b9f4b3.tar.gz ACQuA-bbb4d3cdab63dec778ffed93825a81f335b9f4b3.zip | |
fix(elho-reasoner): correct handling of Optional value
This bug was introduced with the recent update of the OWLAPI to 5.1.20.
Diffstat (limited to 'src/main/java/org/semanticweb/karma2/profile')
| -rw-r--r-- | src/main/java/org/semanticweb/karma2/profile/ELHOProfile.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/org/semanticweb/karma2/profile/ELHOProfile.java b/src/main/java/org/semanticweb/karma2/profile/ELHOProfile.java index 23761f0..b6dc59a 100644 --- a/src/main/java/org/semanticweb/karma2/profile/ELHOProfile.java +++ b/src/main/java/org/semanticweb/karma2/profile/ELHOProfile.java | |||
| @@ -52,7 +52,7 @@ public class ELHOProfile implements OWLProfile { | |||
| 52 | try { | 52 | try { |
| 53 | Utility.logDebug("OntologyID: " + ontology.getOntologyID()); | 53 | Utility.logDebug("OntologyID: " + ontology.getOntologyID()); |
| 54 | try { | 54 | try { |
| 55 | String ontologyIRI = ontology.getOntologyID().getOntologyIRI().toString(); | 55 | String ontologyIRI = ontology.getOntologyID().getOntologyIRI().map(iri -> iri.toString()).orElse("NOID"); |
| 56 | if (ontologyIRI.contains(".owl")) | 56 | if (ontologyIRI.contains(".owl")) |
| 57 | ontologyIRI = ontologyIRI.replace(".owl", "-elho.owl"); | 57 | ontologyIRI = ontologyIRI.replace(".owl", "-elho.owl"); |
| 58 | else | 58 | else |
| @@ -75,7 +75,7 @@ public class ELHOProfile implements OWLProfile { | |||
| 75 | OWLProfileReport report = checkOntology(elhoOntology); | 75 | OWLProfileReport report = checkOntology(elhoOntology); |
| 76 | 76 | ||
| 77 | for (OWLProfileViolation violation: report.getViolations()) { | 77 | for (OWLProfileViolation violation: report.getViolations()) { |
| 78 | OWLAxiom axiom = violation.getAxiom(); | 78 | OWLAxiom axiom = violation.getAxiom(); |
| 79 | manager.removeAxiom(elhoOntology, axiom); | 79 | manager.removeAxiom(elhoOntology, axiom); |
| 80 | } | 80 | } |
| 81 | Utility.logDebug("ELHO fragment extracted ... "); | 81 | Utility.logDebug("ELHO fragment extracted ... "); |
