aboutsummaryrefslogtreecommitdiff
path: root/src/main/scala
diff options
context:
space:
mode:
authorFederico Igne <federico.igne@cs.ox.ac.uk>2020-12-01 22:26:59 +0000
committerFederico Igne <federico.igne@cs.ox.ac.uk>2020-12-01 22:26:59 +0000
commit604105c08d1e5337fa955e74c9d5c978b7f25f93 (patch)
treea13ce68b151c983a24f05bb58bd266e8a14f38af /src/main/scala
parent7a22188cc0ad8fb49237a85e39039054844f2961 (diff)
downloadRSAComb-604105c08d1e5337fa955e74c9d5c978b7f25f93.tar.gz
RSAComb-604105c08d1e5337fa955e74c9d5c978b7f25f93.zip
Cleanup converters code
Diffstat (limited to 'src/main/scala')
-rw-r--r--src/main/scala/uk/ac/ox/cs/rsacomb/converter/RDFoxClassExprConverter.scala2
-rw-r--r--src/main/scala/uk/ac/ox/cs/rsacomb/converter/RDFoxPropertyExprConverter.scala8
-rw-r--r--src/main/scala/uk/ac/ox/cs/rsacomb/sparql/ConjunctiveQuery.scala1
3 files changed, 5 insertions, 6 deletions
diff --git a/src/main/scala/uk/ac/ox/cs/rsacomb/converter/RDFoxClassExprConverter.scala b/src/main/scala/uk/ac/ox/cs/rsacomb/converter/RDFoxClassExprConverter.scala
index 9b7a004..4ededf9 100644
--- a/src/main/scala/uk/ac/ox/cs/rsacomb/converter/RDFoxClassExprConverter.scala
+++ b/src/main/scala/uk/ac/ox/cs/rsacomb/converter/RDFoxClassExprConverter.scala
@@ -83,7 +83,6 @@ class RDFoxClassExprConverter(
83 83
84 // OWLObjectOneOf 84 // OWLObjectOneOf
85 override def visit(expr: OWLObjectOneOf): RDFoxRuleShards = { 85 override def visit(expr: OWLObjectOneOf): RDFoxRuleShards = {
86 val visitor = RDFoxClassExprConverter(term, unsafe, skolem, suffix)
87 // TODO: review nominal handling. Here we are taking "just" one 86 // TODO: review nominal handling. Here we are taking "just" one
88 val ind = expr.individuals 87 val ind = expr.individuals
89 .collect(Collectors.toList()) 88 .collect(Collectors.toList())
@@ -176,7 +175,6 @@ class RDFoxClassExprConverter(
176 175
177 // OWLObjectMaxCardinality 176 // OWLObjectMaxCardinality
178 override def visit(expr: OWLObjectMaxCardinality): RDFoxRuleShards = { 177 override def visit(expr: OWLObjectMaxCardinality): RDFoxRuleShards = {
179 // TODO: again, no hardcoded variables
180 val vars = 178 val vars =
181 List(RSAOntology.genFreshVariable(), RSAOntology.genFreshVariable()) 179 List(RSAOntology.genFreshVariable(), RSAOntology.genFreshVariable())
182 val classResult = RDFoxClassExprConverter.merge( 180 val classResult = RDFoxClassExprConverter.merge(
diff --git a/src/main/scala/uk/ac/ox/cs/rsacomb/converter/RDFoxPropertyExprConverter.scala b/src/main/scala/uk/ac/ox/cs/rsacomb/converter/RDFoxPropertyExprConverter.scala
index d5a7384..46a70fa 100644
--- a/src/main/scala/uk/ac/ox/cs/rsacomb/converter/RDFoxPropertyExprConverter.scala
+++ b/src/main/scala/uk/ac/ox/cs/rsacomb/converter/RDFoxPropertyExprConverter.scala
@@ -1,17 +1,17 @@
1package uk.ac.ox.cs.rsacomb.converter 1package uk.ac.ox.cs.rsacomb.converter
2 2
3import org.semanticweb.owlapi.model.{ 3import org.semanticweb.owlapi.model.{
4 OWLPropertyExpression, 4 OWLAnnotationProperty,
5 OWLDataProperty,
6 OWLObjectInverseOf,
5 OWLObjectProperty, 7 OWLObjectProperty,
6 OWLDataProperty 8 OWLPropertyExpression
7} 9}
8import org.semanticweb.owlapi.model.OWLPropertyExpressionVisitorEx 10import org.semanticweb.owlapi.model.OWLPropertyExpressionVisitorEx
9 11
10import tech.oxfordsemantic.jrdfox.logic.datalog.TupleTableAtom 12import tech.oxfordsemantic.jrdfox.logic.datalog.TupleTableAtom
11import tech.oxfordsemantic.jrdfox.logic.expression.{Term, IRI, Literal} 13import tech.oxfordsemantic.jrdfox.logic.expression.{Term, IRI, Literal}
12 14
13import org.semanticweb.owlapi.model.OWLObjectInverseOf
14
15import uk.ac.ox.cs.rsacomb.suffix.{RSASuffix, Inverse} 15import uk.ac.ox.cs.rsacomb.suffix.{RSASuffix, Inverse}
16 16
17class RDFoxPropertyExprConverter( 17class RDFoxPropertyExprConverter(
diff --git a/src/main/scala/uk/ac/ox/cs/rsacomb/sparql/ConjunctiveQuery.scala b/src/main/scala/uk/ac/ox/cs/rsacomb/sparql/ConjunctiveQuery.scala
index bc90c86..451d1f4 100644
--- a/src/main/scala/uk/ac/ox/cs/rsacomb/sparql/ConjunctiveQuery.scala
+++ b/src/main/scala/uk/ac/ox/cs/rsacomb/sparql/ConjunctiveQuery.scala
@@ -54,6 +54,7 @@ class ConjunctiveQuery(
54 val prefixes: Prefixes = new Prefixes() 54 val prefixes: Prefixes = new Prefixes()
55) { 55) {
56 56
57 /** Simplify conversion between Java and Scala collections */
57 import uk.ac.ox.cs.rsacomb.implicits.JavaCollections._ 58 import uk.ac.ox.cs.rsacomb.implicits.JavaCollections._
58 59
59 /** SELECT section of the SPARQL query. 60 /** SELECT section of the SPARQL query.