From 604105c08d1e5337fa955e74c9d5c978b7f25f93 Mon Sep 17 00:00:00 2001 From: Federico Igne Date: Tue, 1 Dec 2020 22:26:59 +0000 Subject: Cleanup converters code --- .../uk/ac/ox/cs/rsacomb/converter/RDFoxClassExprConverter.scala | 2 -- .../ac/ox/cs/rsacomb/converter/RDFoxPropertyExprConverter.scala | 8 ++++---- src/main/scala/uk/ac/ox/cs/rsacomb/sparql/ConjunctiveQuery.scala | 1 + 3 files changed, 5 insertions(+), 6 deletions(-) (limited to 'src/main/scala/uk/ac') 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( // OWLObjectOneOf override def visit(expr: OWLObjectOneOf): RDFoxRuleShards = { - val visitor = RDFoxClassExprConverter(term, unsafe, skolem, suffix) // TODO: review nominal handling. Here we are taking "just" one val ind = expr.individuals .collect(Collectors.toList()) @@ -176,7 +175,6 @@ class RDFoxClassExprConverter( // OWLObjectMaxCardinality override def visit(expr: OWLObjectMaxCardinality): RDFoxRuleShards = { - // TODO: again, no hardcoded variables val vars = List(RSAOntology.genFreshVariable(), RSAOntology.genFreshVariable()) 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 @@ package uk.ac.ox.cs.rsacomb.converter import org.semanticweb.owlapi.model.{ - OWLPropertyExpression, + OWLAnnotationProperty, + OWLDataProperty, + OWLObjectInverseOf, OWLObjectProperty, - OWLDataProperty + OWLPropertyExpression } import org.semanticweb.owlapi.model.OWLPropertyExpressionVisitorEx import tech.oxfordsemantic.jrdfox.logic.datalog.TupleTableAtom import tech.oxfordsemantic.jrdfox.logic.expression.{Term, IRI, Literal} -import org.semanticweb.owlapi.model.OWLObjectInverseOf - import uk.ac.ox.cs.rsacomb.suffix.{RSASuffix, Inverse} class 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( val prefixes: Prefixes = new Prefixes() ) { + /** Simplify conversion between Java and Scala collections */ import uk.ac.ox.cs.rsacomb.implicits.JavaCollections._ /** SELECT section of the SPARQL query. -- cgit v1.2.3