diff options
author | Federico Igne <federico.igne@cs.ox.ac.uk> | 2020-10-21 11:41:21 +0200 |
---|---|---|
committer | Federico Igne <federico.igne@cs.ox.ac.uk> | 2020-10-21 11:41:21 +0200 |
commit | 5479b8c7876894b9b9fa8c33242d23fb1db498aa (patch) | |
tree | 47656887d0c4c677a97b3c759cb734e9091dd7e2 | |
parent | b4f19557e648d96fc1a87677ea3c02143a525cbd (diff) | |
download | RSAComb-5479b8c7876894b9b9fa8c33242d23fb1db498aa.tar.gz RSAComb-5479b8c7876894b9b9fa8c33242d23fb1db498aa.zip |
Fix issue with introduction of new version of OWLAPI
-rw-r--r-- | src/test/scala/rsacomb/OWLAxiomSpec.scala | 24 | ||||
-rw-r--r-- | src/test/scala/rsacomb/OWLClassSpec.scala | 16 |
2 files changed, 23 insertions, 17 deletions
diff --git a/src/test/scala/rsacomb/OWLAxiomSpec.scala b/src/test/scala/rsacomb/OWLAxiomSpec.scala index a389242..c685987 100644 --- a/src/test/scala/rsacomb/OWLAxiomSpec.scala +++ b/src/test/scala/rsacomb/OWLAxiomSpec.scala | |||
@@ -1,10 +1,11 @@ | |||
1 | package rsacomb | 1 | package rsacomb |
2 | 2 | ||
3 | import java.util.ArrayList | 3 | import java.util.{ArrayList => JList} |
4 | import org.scalatest.LoneElement | 4 | import org.scalatest.LoneElement |
5 | import org.scalatest.flatspec.AnyFlatSpec | 5 | import org.scalatest.flatspec.AnyFlatSpec |
6 | import org.scalatest.matchers.should.Matchers | 6 | import org.scalatest.matchers.should.Matchers |
7 | 7 | ||
8 | import org.semanticweb.owlapi.model.OWLClassExpression | ||
8 | import uk.ac.manchester.cs.owl.owlapi.{OWLSubClassOfAxiomImpl} | 9 | import uk.ac.manchester.cs.owl.owlapi.{OWLSubClassOfAxiomImpl} |
9 | import uk.ac.manchester.cs.owl.owlapi.{ | 10 | import uk.ac.manchester.cs.owl.owlapi.{ |
10 | OWLClassImpl, | 11 | OWLClassImpl, |
@@ -72,11 +73,12 @@ object OWLAxiomSpec { | |||
72 | // | 73 | // |
73 | // Student ∧ Worker | 74 | // Student ∧ Worker |
74 | // | 75 | // |
75 | val class_OWLObjectIntersectionOf = | 76 | val class_OWLObjectIntersectionOf = { |
76 | new OWLObjectIntersectionOfImpl( | 77 | val conjuncts = new JList[OWLClassExpression]() |
77 | class_Student, | 78 | conjuncts.add(class_Student) |
78 | class_Worker | 79 | conjuncts.add(class_Worker) |
79 | ) | 80 | new OWLObjectIntersectionOfImpl(conjuncts) |
81 | } | ||
80 | // Singleton Class corresponding to | 82 | // Singleton Class corresponding to |
81 | // | 83 | // |
82 | // { alice } | 84 | // { alice } |
@@ -113,7 +115,7 @@ object OWLAxiomSpec { | |||
113 | new OWLSubClassOfAxiomImpl( | 115 | new OWLSubClassOfAxiomImpl( |
114 | class_OWLObjectIntersectionOf, | 116 | class_OWLObjectIntersectionOf, |
115 | class_PartTimeStudent, | 117 | class_PartTimeStudent, |
116 | new ArrayList() | 118 | new JList() |
117 | ) | 119 | ) |
118 | 120 | ||
119 | // Axiom SubClassOf corresponding to | 121 | // Axiom SubClassOf corresponding to |
@@ -124,7 +126,7 @@ object OWLAxiomSpec { | |||
124 | new OWLSubClassOfAxiomImpl( | 126 | new OWLSubClassOfAxiomImpl( |
125 | class_Student, | 127 | class_Student, |
126 | class_OWLObjectSomeValuesFrom, | 128 | class_OWLObjectSomeValuesFrom, |
127 | new ArrayList() | 129 | new JList() |
128 | ) | 130 | ) |
129 | 131 | ||
130 | // Axiom SubClassOf corresponding to | 132 | // Axiom SubClassOf corresponding to |
@@ -135,7 +137,7 @@ object OWLAxiomSpec { | |||
135 | new OWLSubClassOfAxiomImpl( | 137 | new OWLSubClassOfAxiomImpl( |
136 | class_OWLObjectSomeValuesFrom, | 138 | class_OWLObjectSomeValuesFrom, |
137 | class_Student, | 139 | class_Student, |
138 | new ArrayList() | 140 | new JList() |
139 | ) | 141 | ) |
140 | 142 | ||
141 | // Axiom SubClassOf corresponding to | 143 | // Axiom SubClassOf corresponding to |
@@ -146,7 +148,7 @@ object OWLAxiomSpec { | |||
146 | new OWLSubClassOfAxiomImpl( | 148 | new OWLSubClassOfAxiomImpl( |
147 | class_Student, | 149 | class_Student, |
148 | class_OWLObjectOneOf, | 150 | class_OWLObjectOneOf, |
149 | new ArrayList() | 151 | new JList() |
150 | ) | 152 | ) |
151 | 153 | ||
152 | // Axiom SubClassOf corresponding to | 154 | // Axiom SubClassOf corresponding to |
@@ -157,7 +159,7 @@ object OWLAxiomSpec { | |||
157 | new OWLSubClassOfAxiomImpl( | 159 | new OWLSubClassOfAxiomImpl( |
158 | class_Student, | 160 | class_Student, |
159 | class_OWLObjectMaxCardinality, | 161 | class_OWLObjectMaxCardinality, |
160 | new ArrayList() | 162 | new JList() |
161 | ) | 163 | ) |
162 | 164 | ||
163 | def convertAxiom( | 165 | def convertAxiom( |
diff --git a/src/test/scala/rsacomb/OWLClassSpec.scala b/src/test/scala/rsacomb/OWLClassSpec.scala index 74c641e..ed91ba7 100644 --- a/src/test/scala/rsacomb/OWLClassSpec.scala +++ b/src/test/scala/rsacomb/OWLClassSpec.scala | |||
@@ -1,9 +1,12 @@ | |||
1 | package rsacomb | 1 | package rsacomb |
2 | 2 | ||
3 | import java.util.{ArrayList => JList} | ||
4 | |||
3 | import org.scalatest.LoneElement | 5 | import org.scalatest.LoneElement |
4 | import org.scalatest.flatspec.AnyFlatSpec | 6 | import org.scalatest.flatspec.AnyFlatSpec |
5 | import org.scalatest.matchers.should.Matchers | 7 | import org.scalatest.matchers.should.Matchers |
6 | 8 | ||
9 | import org.semanticweb.owlapi.model.OWLClassExpression | ||
7 | import uk.ac.manchester.cs.owl.owlapi.{ | 10 | import uk.ac.manchester.cs.owl.owlapi.{ |
8 | OWLClassImpl, | 11 | OWLClassImpl, |
9 | OWLObjectSomeValuesFromImpl, | 12 | OWLObjectSomeValuesFromImpl, |
@@ -67,12 +70,13 @@ object OWLClassSpec { | |||
67 | // | 70 | // |
68 | // Female ∧ Student ∧ Worker | 71 | // Female ∧ Student ∧ Worker |
69 | // | 72 | // |
70 | val class_OWLObjectIntersectionOf = | 73 | val class_OWLObjectIntersectionOf = { |
71 | new OWLObjectIntersectionOfImpl( | 74 | val conjuncts = new JList[OWLClassExpression]() |
72 | class_Female, | 75 | conjuncts.add(class_Female) |
73 | class_Student, | 76 | conjuncts.add(class_Student) |
74 | class_Worker | 77 | conjuncts.add(class_Worker) |
75 | ) | 78 | new OWLObjectIntersectionOfImpl(conjuncts) |
79 | } | ||
76 | // Singleton Class corresponding to | 80 | // Singleton Class corresponding to |
77 | // | 81 | // |
78 | // { alice } | 82 | // { alice } |