From 5479b8c7876894b9b9fa8c33242d23fb1db498aa Mon Sep 17 00:00:00 2001 From: Federico Igne Date: Wed, 21 Oct 2020 11:41:21 +0200 Subject: Fix issue with introduction of new version of OWLAPI --- src/test/scala/rsacomb/OWLAxiomSpec.scala | 24 +++++++++++++----------- src/test/scala/rsacomb/OWLClassSpec.scala | 16 ++++++++++------ 2 files changed, 23 insertions(+), 17 deletions(-) (limited to 'src') 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 @@ package rsacomb -import java.util.ArrayList +import java.util.{ArrayList => JList} import org.scalatest.LoneElement import org.scalatest.flatspec.AnyFlatSpec import org.scalatest.matchers.should.Matchers +import org.semanticweb.owlapi.model.OWLClassExpression import uk.ac.manchester.cs.owl.owlapi.{OWLSubClassOfAxiomImpl} import uk.ac.manchester.cs.owl.owlapi.{ OWLClassImpl, @@ -72,11 +73,12 @@ object OWLAxiomSpec { // // Student ∧ Worker // - val class_OWLObjectIntersectionOf = - new OWLObjectIntersectionOfImpl( - class_Student, - class_Worker - ) + val class_OWLObjectIntersectionOf = { + val conjuncts = new JList[OWLClassExpression]() + conjuncts.add(class_Student) + conjuncts.add(class_Worker) + new OWLObjectIntersectionOfImpl(conjuncts) + } // Singleton Class corresponding to // // { alice } @@ -113,7 +115,7 @@ object OWLAxiomSpec { new OWLSubClassOfAxiomImpl( class_OWLObjectIntersectionOf, class_PartTimeStudent, - new ArrayList() + new JList() ) // Axiom SubClassOf corresponding to @@ -124,7 +126,7 @@ object OWLAxiomSpec { new OWLSubClassOfAxiomImpl( class_Student, class_OWLObjectSomeValuesFrom, - new ArrayList() + new JList() ) // Axiom SubClassOf corresponding to @@ -135,7 +137,7 @@ object OWLAxiomSpec { new OWLSubClassOfAxiomImpl( class_OWLObjectSomeValuesFrom, class_Student, - new ArrayList() + new JList() ) // Axiom SubClassOf corresponding to @@ -146,7 +148,7 @@ object OWLAxiomSpec { new OWLSubClassOfAxiomImpl( class_Student, class_OWLObjectOneOf, - new ArrayList() + new JList() ) // Axiom SubClassOf corresponding to @@ -157,7 +159,7 @@ object OWLAxiomSpec { new OWLSubClassOfAxiomImpl( class_Student, class_OWLObjectMaxCardinality, - new ArrayList() + new JList() ) 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 @@ package rsacomb +import java.util.{ArrayList => JList} + import org.scalatest.LoneElement import org.scalatest.flatspec.AnyFlatSpec import org.scalatest.matchers.should.Matchers +import org.semanticweb.owlapi.model.OWLClassExpression import uk.ac.manchester.cs.owl.owlapi.{ OWLClassImpl, OWLObjectSomeValuesFromImpl, @@ -67,12 +70,13 @@ object OWLClassSpec { // // Female ∧ Student ∧ Worker // - val class_OWLObjectIntersectionOf = - new OWLObjectIntersectionOfImpl( - class_Female, - class_Student, - class_Worker - ) + val class_OWLObjectIntersectionOf = { + val conjuncts = new JList[OWLClassExpression]() + conjuncts.add(class_Female) + conjuncts.add(class_Student) + conjuncts.add(class_Worker) + new OWLObjectIntersectionOfImpl(conjuncts) + } // Singleton Class corresponding to // // { alice } -- cgit v1.2.3