aboutsummaryrefslogtreecommitdiff
path: root/src/main/scala/rsacomb/RDFoxPropertyExprConverter.scala
diff options
context:
space:
mode:
authorFederico Igne <federico.igne@cs.ox.ac.uk>2020-09-30 19:45:25 +0200
committerFederico Igne <federico.igne@cs.ox.ac.uk>2020-09-30 19:45:25 +0200
commit6a29b16dee0592fdeb03b26ff87fd00d57555f78 (patch)
treef50800aa56a2f1b03a538c0a82eaa739ac671466 /src/main/scala/rsacomb/RDFoxPropertyExprConverter.scala
parent7fd4023ab6d3b8cd379f4119c7bfbeaedca0b7b4 (diff)
downloadRSAComb-6a29b16dee0592fdeb03b26ff87fd00d57555f78.tar.gz
RSAComb-6a29b16dee0592fdeb03b26ff87fd00d57555f78.zip
Add rule generation for unsafe T5 axioms for canonical model
Diffstat (limited to 'src/main/scala/rsacomb/RDFoxPropertyExprConverter.scala')
-rw-r--r--src/main/scala/rsacomb/RDFoxPropertyExprConverter.scala15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/main/scala/rsacomb/RDFoxPropertyExprConverter.scala b/src/main/scala/rsacomb/RDFoxPropertyExprConverter.scala
index 6eecdbf..ba151d0 100644
--- a/src/main/scala/rsacomb/RDFoxPropertyExprConverter.scala
+++ b/src/main/scala/rsacomb/RDFoxPropertyExprConverter.scala
@@ -5,24 +5,27 @@ import org.semanticweb.owlapi.model.OWLPropertyExpressionVisitorEx
5 5
6import tech.oxfordsemantic.jrdfox.logic.{Atom, Term, IRI, Literal} 6import tech.oxfordsemantic.jrdfox.logic.{Atom, Term, IRI, Literal}
7 7
8import rsacomb.SkolemStrategy
9import org.semanticweb.owlapi.model.OWLObjectInverseOf 8import org.semanticweb.owlapi.model.OWLObjectInverseOf
10 9
11class RDFoxPropertyExprConverter( 10class RDFoxPropertyExprConverter(
12 term1: Term, 11 term1: Term,
13 term2: Term, 12 term2: Term,
14 skolem: SkolemStrategy 13 suffix: RSASuffix
15) extends OWLPropertyExpressionVisitorEx[List[Atom]] { 14) extends OWLPropertyExpressionVisitorEx[List[Atom]] {
16 15
17 // Automatically converts OWLAPI types into RDFox equivalent types. 16 // Automatically converts OWLAPI types into RDFox equivalent types.
18 import RDFoxUtil.owlapi2rdfox; 17 import RDFoxUtil.owlapi2rdfox;
19 18
20 override def visit(expr: OWLObjectProperty): List[Atom] = 19 override def visit(expr: OWLObjectProperty): List[Atom] = {
21 List(Atom.rdf(term1, expr.getIRI, term2)) 20 val pred = IRI.create(expr.getIRI.getIRIString ++ suffix.getSuffix)
21 List(Atom.rdf(term1, pred, term2))
22 }
22 23
23 override def visit(expr: OWLObjectInverseOf): List[Atom] = { 24 override def visit(expr: OWLObjectInverseOf): List[Atom] = {
24 val name = expr.getInverse.getNamedProperty.getIRI.getIRIString; 25 val pred = IRI.create(
25 List(Atom.rdf(term1, IRI.create(name ++ "_inv"), term2)) 26 expr.getInverse.getNamedProperty.getIRI.getIRIString ++ suffix.getSuffix ++ "_inv"
27 )
28 List(Atom.rdf(term1, pred, term2))
26 } 29 }
27 30
28 def doDefault(expr: OWLPropertyExpression): List[Atom] = List() 31 def doDefault(expr: OWLPropertyExpression): List[Atom] = List()