diff options
author | Federico Igne <federico.igne@cs.ox.ac.uk> | 2020-09-07 13:08:31 +0200 |
---|---|---|
committer | Federico Igne <federico.igne@cs.ox.ac.uk> | 2020-09-07 13:08:31 +0200 |
commit | 2b661f3ac6fdb5156168b6775ede24e4c7b53758 (patch) | |
tree | 0e3514c38fedf41febff82e9bf93aea2ab4d7a7f /src/main/scala/rsacomb/RDFoxClassExprConverter.scala | |
parent | 7e126824e9a6cb456295d2f1535aef975bb63237 (diff) | |
download | RSAComb-2b661f3ac6fdb5156168b6775ede24e4c7b53758.tar.gz RSAComb-2b661f3ac6fdb5156168b6775ede24e4c7b53758.zip |
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.
Diffstat (limited to 'src/main/scala/rsacomb/RDFoxClassExprConverter.scala')
-rw-r--r-- | src/main/scala/rsacomb/RDFoxClassExprConverter.scala | 4 |
1 files changed, 3 insertions, 1 deletions
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( | |||
61 | 61 | ||
62 | // OWLClass | 62 | // OWLClass |
63 | override def visit(expr: OWLClass): RDFoxRuleShards = { | 63 | override def visit(expr: OWLClass): RDFoxRuleShards = { |
64 | val atom = List(Atom.rdf(term, IRI.RDF_TYPE, expr.getIRI())) | 64 | val iri: IRI = if (expr.isTopEntity()) IRI.THING else expr.getIRI() |
65 | val atom = List(Atom.rdf(term, IRI.RDF_TYPE, iri)) | ||
65 | RDFoxRuleShards(atom, List()) | 66 | RDFoxRuleShards(atom, List()) |
66 | } | 67 | } |
67 | 68 | ||
@@ -97,6 +98,7 @@ class RDFoxClassExprConverter( | |||
97 | // TODO: variables needs to be handled at visitor level. Hardcoding | 98 | // TODO: variables needs to be handled at visitor level. Hardcoding |
98 | // the name of the varibles might lead to errors for complex cases. | 99 | // the name of the varibles might lead to errors for complex cases. |
99 | val y = Variable.create("y") | 100 | val y = Variable.create("y") |
101 | // Here we are assuming a role name | ||
100 | val prop = expr.getProperty() | 102 | val prop = expr.getProperty() |
101 | // Computes the result of rule skolemization. Depending on the used | 103 | // Computes the result of rule skolemization. Depending on the used |
102 | // technique it might involve the introduction of additional atoms, | 104 | // technique it might involve the introduction of additional atoms, |