aboutsummaryrefslogtreecommitdiff
path: root/src/main/scala/uk/ac/ox/cs/rsacomb/RSAOntology.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/scala/uk/ac/ox/cs/rsacomb/RSAOntology.scala')
-rw-r--r--src/main/scala/uk/ac/ox/cs/rsacomb/RSAOntology.scala15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/main/scala/uk/ac/ox/cs/rsacomb/RSAOntology.scala b/src/main/scala/uk/ac/ox/cs/rsacomb/RSAOntology.scala
index a965ef9..8fae4c8 100644
--- a/src/main/scala/uk/ac/ox/cs/rsacomb/RSAOntology.scala
+++ b/src/main/scala/uk/ac/ox/cs/rsacomb/RSAOntology.scala
@@ -50,7 +50,7 @@ import org.semanticweb.owlapi.dlsyntax.renderer.DLSyntaxObjectRenderer
50import tech.oxfordsemantic.jrdfox.logic._ 50import tech.oxfordsemantic.jrdfox.logic._
51import org.semanticweb.owlapi.model.OWLObjectInverseOf 51import org.semanticweb.owlapi.model.OWLObjectInverseOf
52 52
53import uk.ac.ox.cs.rsacomb.converter.{RDFoxConverter, SkolemStrategy} 53import uk.ac.ox.cs.rsacomb.converter._
54import uk.ac.ox.cs.rsacomb.suffix._ 54import uk.ac.ox.cs.rsacomb.suffix._
55import uk.ac.ox.cs.rsacomb.sparql._ 55import uk.ac.ox.cs.rsacomb.sparql._
56import uk.ac.ox.cs.rsacomb.util.{RDFoxUtil, RSA} 56import uk.ac.ox.cs.rsacomb.util.{RDFoxUtil, RSA}
@@ -163,16 +163,16 @@ class RSAOntology(val ontology: OWLOntology) {
163 ): Shards = 163 ): Shards =
164 (expr, skolem) match { 164 (expr, skolem) match {
165 165
166 case (e: OWLObjectSomeValuesFrom, SkolemStrategy.Constant(c)) 166 case (e: OWLObjectSomeValuesFrom, c: Constant)
167 if unsafe contains e.getProperty => { 167 if unsafe contains e.getProperty => {
168 val (res, ext) = super.convert(e, term, unsafe, skolem, suffix) 168 val (res, ext) = super.convert(e, term, unsafe, skolem, suffix)
169 (RSA.PE(term, c) :: RSA.U(c) :: res, ext) 169 (RSA.PE(term, c.iri) :: RSA.U(c.iri) :: res, ext)
170 } 170 }
171 171
172 case (e: OWLDataSomeValuesFrom, SkolemStrategy.Constant(c)) 172 case (e: OWLDataSomeValuesFrom, c: Constant)
173 if unsafe contains e.getProperty => { 173 if unsafe contains e.getProperty => {
174 val (res, ext) = super.convert(e, term, unsafe, skolem, suffix) 174 val (res, ext) = super.convert(e, term, unsafe, skolem, suffix)
175 (RSA.PE(term, c) :: RSA.U(c) :: res, ext) 175 (RSA.PE(term, c.iri) :: RSA.U(c.iri) :: res, ext)
176 } 176 }
177 177
178 case _ => super.convert(expr, term, unsafe, skolem, suffix) 178 case _ => super.convert(expr, term, unsafe, skolem, suffix)
@@ -183,10 +183,7 @@ class RSAOntology(val ontology: OWLOntology) {
183 /* Ontology convertion into LP rules */ 183 /* Ontology convertion into LP rules */
184 val term = RSAOntology.genFreshVariable() 184 val term = RSAOntology.genFreshVariable()
185 val datalog = axioms 185 val datalog = axioms
186 .map(a => { 186 .map(a => RSAConverter.convert(a, term, unsafe, new Constant(a), Empty))
187 val skolem = SkolemStrategy.Constant(a.toString)
188 RSAConverter.convert(a, term, unsafe, skolem, Empty)
189 })
190 .unzip 187 .unzip
191 val facts = datalog._1.flatten 188 val facts = datalog._1.flatten
192 val rules = datalog._2.flatten 189 val rules = datalog._2.flatten