From 2b661f3ac6fdb5156168b6775ede24e4c7b53758 Mon Sep 17 00:00:00 2001 From: Federico Igne Date: Mon, 7 Sep 2020 13:08:31 +0200 Subject: Add setup code to compute the RSA filtering program Not all rules of the filtering program have been implemented, but the code for the generation and reification of the rules seems to work. --- src/main/scala/rsacomb/RDFoxClassExprConverter.scala | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/main/scala/rsacomb/RDFoxClassExprConverter.scala') diff --git a/src/main/scala/rsacomb/RDFoxClassExprConverter.scala b/src/main/scala/rsacomb/RDFoxClassExprConverter.scala index b9d3ea2..467b3f1 100644 --- a/src/main/scala/rsacomb/RDFoxClassExprConverter.scala +++ b/src/main/scala/rsacomb/RDFoxClassExprConverter.scala @@ -61,7 +61,8 @@ class RDFoxClassExprConverter( // OWLClass override def visit(expr: OWLClass): RDFoxRuleShards = { - val atom = List(Atom.rdf(term, IRI.RDF_TYPE, expr.getIRI())) + val iri: IRI = if (expr.isTopEntity()) IRI.THING else expr.getIRI() + val atom = List(Atom.rdf(term, IRI.RDF_TYPE, iri)) RDFoxRuleShards(atom, List()) } @@ -97,6 +98,7 @@ class RDFoxClassExprConverter( // TODO: variables needs to be handled at visitor level. Hardcoding // the name of the varibles might lead to errors for complex cases. val y = Variable.create("y") + // Here we are assuming a role name val prop = expr.getProperty() // Computes the result of rule skolemization. Depending on the used // technique it might involve the introduction of additional atoms, -- cgit v1.2.3