aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/scala/rsacomb/RSAOntology.scala15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/main/scala/rsacomb/RSAOntology.scala b/src/main/scala/rsacomb/RSAOntology.scala
index 05b6218..aa84308 100644
--- a/src/main/scala/rsacomb/RSAOntology.scala
+++ b/src/main/scala/rsacomb/RSAOntology.scala
@@ -12,6 +12,8 @@ import org.semanticweb.owlapi.model.{
12} 12}
13import org.semanticweb.owlapi.model.parameters.Imports 13import org.semanticweb.owlapi.model.parameters.Imports
14import org.semanticweb.owlapi.reasoner.structural.StructuralReasonerFactory 14import org.semanticweb.owlapi.reasoner.structural.StructuralReasonerFactory
15import org.semanticweb.owlapi.model.{IRI => OWLIRI}
16import uk.ac.manchester.cs.owl.owlapi.OWLObjectPropertyImpl
15 17
16import tech.oxfordsemantic.jrdfox.client.{UpdateType, DataStoreConnection} 18import tech.oxfordsemantic.jrdfox.client.{UpdateType, DataStoreConnection}
17import tech.oxfordsemantic.jrdfox.logic.{Resource, Rule, Atom, Variable, IRI} 19import tech.oxfordsemantic.jrdfox.logic.{Resource, Rule, Atom, Variable, IRI}
@@ -261,14 +263,11 @@ trait RSAOntology {
261 .addOne(role) 263 .addOne(role)
262 .map(_.getInverseProperty) 264 .map(_.getInverseProperty)
263 265
264 roles.filter( 266 invSuperRoles
265 reasoner 267 .flatMap(
266 .superObjectProperties(_) 268 reasoner.subObjectProperties(_).collect(Collectors.toSet()).asScala
267 .collect(Collectors.toSet()) 269 )
268 .asScala 270 .filterNot(_.isOWLBottomObjectProperty())
269 .intersect(invSuperRoles)
270 .nonEmpty
271 )
272 } 271 }
273 272
274 private def self(axiom: OWLSubClassOfAxiom): Set[Term] = { 273 private def self(axiom: OWLSubClassOfAxiom): Set[Term] = {