some refactoring of SimpleReasoner

This commit is contained in:
stellamit 2012-06-16 23:41:13 +00:00
parent f327e91a3c
commit 491c4f6d9a
4 changed files with 516 additions and 404 deletions

View file

@ -28,6 +28,7 @@ public class SimpleReasonerInversePropertyTest extends AbstractTestClass {
//Turn off log messages to console
setLoggerLevel(SimpleReasoner.class, Level.OFF);
setLoggerLevel(SimpleReasonerTBoxListener.class, Level.OFF);
setLoggerLevel(ABoxRecomputer.class, Level.OFF);
}
/*
@ -447,6 +448,12 @@ public class SimpleReasonerInversePropertyTest extends AbstractTestClass {
aBox.add(a,P,b);
aBox.add(c,X,d);
Assert.assertTrue(inf.contains(b,Q,a));
Assert.assertTrue(inf.contains(d,Y,c));
inf.remove(b,Q,a);
inf.remove(d,Y,c);
//recompute whole abox
simpleReasoner.recompute();

View file

@ -35,6 +35,7 @@ public class SimpleReasonerSameAsTest extends AbstractTestClass {
//Turn off log messages to console
setLoggerLevel(SimpleReasoner.class, Level.OFF);
setLoggerLevel(SimpleReasonerTBoxListener.class, Level.OFF);
setLoggerLevel(ABoxRecomputer.class, Level.OFF);
}
/*
@ -674,7 +675,19 @@ public class SimpleReasonerSameAsTest extends AbstractTestClass {
aBox.add(b,Q,d);
aBox.add(b,T,literal2);
aBox.add(a,OWL.sameAs,b);
Assert.assertTrue(inf.contains(b,OWL.sameAs,a));
Assert.assertTrue(inf.contains(b,P,c));
Assert.assertTrue(inf.contains(b,S,literal1));
Assert.assertTrue(inf.contains(a,Q,d));
Assert.assertTrue(inf.contains(a,T,literal2));
inf.remove(b,OWL.sameAs,a);
inf.remove(b,P,c);
inf.remove(b,S,literal1);
inf.remove(a,Q,d);
inf.remove(a,T,literal2);
simpleReasoner.recompute();
while (simpleReasoner.isRecomputing()) {