diff options
author | Federico Igne <federico.igne@cs.ox.ac.uk> | 2020-07-16 17:47:32 +0100 |
---|---|---|
committer | Federico Igne <federico.igne@cs.ox.ac.uk> | 2020-07-16 17:47:32 +0100 |
commit | 633529ca7a911646048886b7e2e0d1d98c94fdf3 (patch) | |
tree | 3137cdb01f023f5d345e32a07f1b60c165a519b5 /src/test/scala/rsacomb/OWLClassSpec.scala | |
parent | 95fa2a0090110a90d9a0f4948a4ced252d8ec111 (diff) | |
download | RSAComb-633529ca7a911646048886b7e2e0d1d98c94fdf3.tar.gz RSAComb-633529ca7a911646048886b7e2e0d1d98c94fdf3.zip |
Update to JRDFox v3.1.0
Diffstat (limited to 'src/test/scala/rsacomb/OWLClassSpec.scala')
-rw-r--r-- | src/test/scala/rsacomb/OWLClassSpec.scala | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/test/scala/rsacomb/OWLClassSpec.scala b/src/test/scala/rsacomb/OWLClassSpec.scala index df10e19..98e14cf 100644 --- a/src/test/scala/rsacomb/OWLClassSpec.scala +++ b/src/test/scala/rsacomb/OWLClassSpec.scala | |||
@@ -6,8 +6,8 @@ import uk.ac.manchester.cs.owl.owlapi.{OWLClassImpl, OWLObjectSomeValuesFromImpl | |||
6 | import uk.ac.manchester.cs.owl.owlapi.{OWLObjectPropertyImpl} | 6 | import uk.ac.manchester.cs.owl.owlapi.{OWLObjectPropertyImpl} |
7 | import org.semanticweb.owlapi.model.IRI | 7 | import org.semanticweb.owlapi.model.IRI |
8 | 8 | ||
9 | import tech.oxfordsemantic.jrdfox.logic.{Bind,BuiltinFunctionCall} | 9 | import tech.oxfordsemantic.jrdfox.logic.{BindAtom,BuiltinFunctionCall} |
10 | import tech.oxfordsemantic.jrdfox.logic.{Atom, Predicate, Term, Variable, Individual} | 10 | import tech.oxfordsemantic.jrdfox.logic.{Atom, TupleTableName, Term, Variable, Literal, Datatype} |
11 | 11 | ||
12 | import rsacomb.RDFoxRuleShards | 12 | import rsacomb.RDFoxRuleShards |
13 | 13 | ||
@@ -25,14 +25,14 @@ object OWLClassSpec { | |||
25 | // RDFox Terms | 25 | // RDFox Terms |
26 | val term_x = Variable.create("x") | 26 | val term_x = Variable.create("x") |
27 | val term_y = Variable.create("y") | 27 | val term_y = Variable.create("y") |
28 | val term_c1 = Individual.create("internal:c_1") | 28 | val term_c1 = Literal.create("internal:c_1", Datatype.IRI_REFERENCE) |
29 | val term_c2 = Individual.create("internal:c_2") | 29 | val term_c2 = Literal.create("internal:c_2", Datatype.IRI_REFERENCE) |
30 | val term_alice = Individual.create("univ:alice") | 30 | val term_alice = Literal.create("univ:alice", Datatype.IRI_REFERENCE) |
31 | 31 | ||
32 | // RDFox Predicates | 32 | // RDFox Predicates |
33 | val pred_sameAs = Predicate.create("owl:sameAs") | 33 | val pred_sameAs = TupleTableName.create("owl:sameAs") |
34 | val pred_Professor = Predicate.create(iri_Professor.getIRIString) | 34 | val pred_Professor = TupleTableName.create(iri_Professor.getIRIString) |
35 | val pred_hasSupervisor = Predicate.create(iri_hasSupervisor.getIRIString) | 35 | val pred_hasSupervisor = TupleTableName.create(iri_hasSupervisor.getIRIString) |
36 | 36 | ||
37 | // OWL Classes | 37 | // OWL Classes |
38 | // Name Class corresponding to | 38 | // Name Class corresponding to |
@@ -135,7 +135,7 @@ class OWLClassSpec | |||
135 | it should "be converted into a single <owl:sameAs> Atom" in { | 135 | it should "be converted into a single <owl:sameAs> Atom" in { |
136 | val visitor = RDFoxClassExprConverter(term_x) | 136 | val visitor = RDFoxClassExprConverter(term_x) |
137 | val result = class_OWLObjectOneOf.accept(visitor) | 137 | val result = class_OWLObjectOneOf.accept(visitor) |
138 | result.res.loneElement should (be (a [Atom]) and have ('predicate (pred_sameAs))) | 138 | result.res.loneElement should (be (a [Atom]) and have ('tupleTableName (pred_sameAs))) |
139 | } | 139 | } |
140 | 140 | ||
141 | it should "have an empty extension list" in { | 141 | it should "have an empty extension list" in { |
@@ -196,8 +196,8 @@ class OWLClassSpec | |||
196 | val skolem = SkolemStrategy.Standard(class_OWLObjectSomeValuesFrom.toString) | 196 | val skolem = SkolemStrategy.Standard(class_OWLObjectSomeValuesFrom.toString) |
197 | val visitor = RDFoxClassExprConverter(term_x,skolem) | 197 | val visitor = RDFoxClassExprConverter(term_x,skolem) |
198 | val result = class_OWLObjectSomeValuesFrom.accept(visitor) | 198 | val result = class_OWLObjectSomeValuesFrom.accept(visitor) |
199 | result.ext.loneElement shouldBe a [Bind] | 199 | result.ext.loneElement shouldBe a [BindAtom] |
200 | val builtin = result.ext.head.asInstanceOf[Bind].getBuiltinExpression | 200 | val builtin = result.ext.head.asInstanceOf[BindAtom].getBuiltinExpression |
201 | builtin should (be (a [BuiltinFunctionCall]) and have ('functionName ("SKOLEM"))) | 201 | builtin should (be (a [BuiltinFunctionCall]) and have ('functionName ("SKOLEM"))) |
202 | } | 202 | } |
203 | 203 | ||
@@ -241,7 +241,7 @@ class OWLClassSpec | |||
241 | it should "have a single <owl:sameAs> Atom in the result list" in { | 241 | it should "have a single <owl:sameAs> Atom in the result list" in { |
242 | val visitor = RDFoxClassExprConverter(term_x) | 242 | val visitor = RDFoxClassExprConverter(term_x) |
243 | val result = class_OWLObjectMaxCardinality.accept(visitor) | 243 | val result = class_OWLObjectMaxCardinality.accept(visitor) |
244 | result.res.loneElement should (be (an [Atom]) and have ('predicate (pred_sameAs))) | 244 | result.res.loneElement should (be (an [Atom]) and have ('tupleTableName (pred_sameAs))) |
245 | } | 245 | } |
246 | 246 | ||
247 | it should "have two unary Atoms in its extension list" in { | 247 | it should "have two unary Atoms in its extension list" in { |