aboutsummaryrefslogtreecommitdiff
path: root/src/main/scala
diff options
context:
space:
mode:
authorFederico Igne <federico.igne@cs.ox.ac.uk>2020-10-10 12:59:32 +0200
committerFederico Igne <federico.igne@cs.ox.ac.uk>2020-10-10 12:59:32 +0200
commitdbc4499bbf1ee21441158f4028fba330f18e0b3d (patch)
tree6095326adbb695448244ae8c50ac3f0b8b1d756b /src/main/scala
parent34d18836c5a59c73a672328e65c842fc75ddb5e1 (diff)
downloadRSAComb-dbc4499bbf1ee21441158f4028fba330f18e0b3d.tar.gz
RSAComb-dbc4499bbf1ee21441158f4028fba330f18e0b3d.zip
Fix bug with conflict set computation
Conflicting roles w.r.t. to an input role where initially searched among the roles named in the ontology. This excludes all those roles that are only implicitly part of an ontology (e.g., inverse of named roles).
Diffstat (limited to 'src/main/scala')
-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] = {