Skip to content
Permalink
Browse files

Refactoring configuration into separate KB and Log configurations

  • Loading branch information
IanEmmons committed Mar 6, 2019
1 parent f5cb7b5 commit 8fc067b7a39352080745baf7e7bd4f73cf7ccacc
Showing with 1,961 additions and 1,745 deletions.
  1. +1 −0 .gitignore
  2. +11 −6 Parliament/AdminClient/KbAdmin.cpp
  3. +31 −383 Parliament/KbCore/Config.cpp
  4. +2 −2 Parliament/KbCore/Exceptions.cpp
  5. +3 −3 Parliament/KbCore/FileHandle.cpp
  6. +6 −6 Parliament/KbCore/FileMapping.cpp
  7. +7 −0 Parliament/KbCore/JNIHelper.cpp
  8. +3 −3 Parliament/KbCore/Jamfile
  9. +314 −0 Parliament/KbCore/KbConfig.cpp
  10. +12 −42 Parliament/KbCore/KbConfigJNI.cpp
  11. +20 −14 Parliament/KbCore/KbInstance.cpp
  12. +9 −37 Parliament/KbCore/KbInstanceJNI.cpp
  13. +3 −3 Parliament/KbCore/LiteralUtils.cpp
  14. +92 −103 Parliament/KbCore/Log.cpp
  15. +83 −0 Parliament/KbCore/LogConfig.cpp
  16. +4 −48 Parliament/KbCore/ParliamentConfig.txt
  17. +39 −0 Parliament/KbCore/ParliamentLogConfig.txt
  18. +31 −31 Parliament/KbCore/RuleEngine.cpp
  19. +1 −1 Parliament/KbCore/SWRLBuiltins.cpp
  20. +2 −2 Parliament/KbCore/SWRLRuleBuilder.cpp
  21. +4 −4 Parliament/KbCore/StringToId.cpp
  22. +1 −1 Parliament/KbCore/SubclassRule.cpp
  23. +20 −369 Parliament/KbCore/parliament/Config.h
  24. +8 −0 Parliament/KbCore/parliament/JNIHelper.h
  25. +309 −0 Parliament/KbCore/parliament/KbConfig.h
  26. +6 −6 Parliament/KbCore/parliament/KbInstance.h
  27. +3 −8 Parliament/KbCore/parliament/KbInstanceImpl.h
  28. +8 −29 Parliament/KbCore/parliament/Log.h
  29. +143 −0 Parliament/KbCore/parliament/LogConfig.h
  30. +4 −4 Parliament/KbCore/parliament/Types.h
  31. +14 −335 Parliament/Test/ConfigTest.cpp
  32. +2 −2 Parliament/Test/DeftLoadTest.cpp
  33. +5 −5 Parliament/Test/FixRecordTableTest.cpp
  34. +2 −2 Parliament/Test/InferenceStressTest.cpp
  35. +17 −8 Parliament/Test/Jamfile
  36. +287 −0 Parliament/Test/KbConfigTest.cpp
  37. +9 −9 Parliament/Test/KbInstanceTest.cpp
  38. +161 −0 Parliament/Test/LogConfigTest.cpp
  39. +30 −16 Parliament/Test/RuleEngineTest.cpp
  40. +1 −1 Parliament/Test/TestLaunch.bat
  41. +3 −38 Parliament/Test/TestMain.cpp
  42. +49 −21 Parliament/Test/TestUtils.cpp
  43. +26 −7 Parliament/Test/TestUtils.h
  44. +5 −3 Parliament/build.xml
  45. +22 −84 Parliament/java/com/bbn/parliament/jni/KbConfig.java
  46. +9 −9 Parliament/java/com/bbn/parliament/jni/KbInstance.java
  47. +3 −2 Parliament/java/com/bbn/parliament/utilities/DumpDeletedStatements.java
  48. +3 −2 Parliament/java/com/bbn/parliament/utilities/RdfLoader.java
  49. +5 −4 Parliament/javaTest/com/bbn/parliament/jni/JniTest.java
  50. +4 −3 Parliament/javaTest/com/bbn/parliament/queryoptimization/ReificationTest.java
  51. +5 −4 Sesame/ParliamentSail/src/com/bbn/parliament/sesame/sail/KbRdfSource.java
  52. +24 −16 build-common.xml
  53. +1 −0 build.xml
  54. +4 −2 jena/JenaGraph/build.xml
  55. +5 −5 jena/JenaGraph/src/com/bbn/parliament/jena/graph/KbGraph.java
  56. +10 −6 jena/JenaGraph/src/com/bbn/parliament/jena/graph/KbGraphFactory.java
  57. +17 −4 jena/JenaGraph/src/com/bbn/parliament/jena/graph/KbGraphStore.java
  58. +4 −3 jena/JenaGraph/test/com/bbn/parliament/jena/graph/DumpKbAsNTriplesTest.java
  59. +6 −4 jena/JenaGraph/test/com/bbn/parliament/jena/graph/KbGraphTest.java
  60. +3 −2 jena/JenaGraph/test/com/bbn/parliament/jena/graph/union/UnionGraphTestNotJUnit.java
  61. +2 −1 jena/JosekiExtensions/build.xml
  62. +0 −2 jena/JosekiExtensions/resources/conf/unix/StartParliament.sh
  63. +9 −3 jena/JosekiExtensions/resources/conf/unix/StartParliamentDaemon.sh
  64. +0 −2 jena/JosekiExtensions/resources/conf/windows/StartParliament.bat
  65. +7 −20 jena/JosekiExtensions/src/com/bbn/parliament/jena/joseki/bridge/tracker/TrackableQuery.java
  66. +6 −0 jena/JosekiExtensions/src/com/bbn/parliament/jena/joseki/graph/ModelManager.java
  67. +2 −1 jena/NumericIndex/build.xml
  68. +2 −1 jena/SpatialIndexProcessor/build.xml
  69. +2 −1 jena/TemporalIndexProcessor/build.xml
  70. +3 −0 ...lIndexProcessor/test/com/bbn/parliament/jena/graph/index/temporal/query/DuplicateEntriesTest.java
  71. +7 −2 ...oralIndexProcessor/test/com/bbn/parliament/jena/graph/index/temporal/query/QueryEdgeCaseTest.java
  72. +1 −1 jena/TemporalIndexProcessor_old/.project
  73. +2 −1 jena/TemporalIndexProcessor_old/build.xml
  74. +2 −2 ...dexProcessor_old/test/com/bbn/parliament/jena/graph/index/temporal/AbstractTemporalTestClass.java
  75. +0 −6 ...exProcessor_old/test/com/bbn/parliament/jena/graph/index/temporal/index/DuplicateEntriesTest.java
@@ -31,4 +31,5 @@ log/
/Parliament/Test/Debug_with_Linux GCC/
/Parliament/Test/Debug_with_MacOSX GCC/
/Parliament/Test/ParliamentConfig.txt
/Parliament/Test/ParliamentLogConfig.txt
/target/
@@ -6,7 +6,7 @@

#include "KbAdmin.h"
#include "parliament/CharacterLiteral.h"
#include "parliament/Config.h"
#include "parliament/KbConfig.h"
#include "parliament/Version.h"
#include "parliament/KbInstance.h"
#include "parliament/Exceptions.h"
@@ -364,7 +364,8 @@ void pmnt::KbAdmin::run()
{
HiResTimer timer;

Config config = Config::readFromFile();
KbConfig config;
config.readFromFile();
config.kbDirectoryPath(k_kbDir);
config.readOnly(false);
KbInstance kb(config);
@@ -384,7 +385,8 @@ void pmnt::KbAdmin::run()
{
HiResTimer timer;

Config config = Config::readFromFile();
KbConfig config;
config.readFromFile();
config.kbDirectoryPath(k_kbDir);
config.readOnly(false);
KbInstance kb(config);
@@ -406,7 +408,8 @@ void pmnt::KbAdmin::run()
{
HiResTimer timer;

Config config = Config::readFromFile();
KbConfig config;
config.readFromFile();
config.kbDirectoryPath(k_kbDir);
config.readOnly(false);
config.runAllRulesAtStartup(true);
@@ -427,7 +430,8 @@ void pmnt::KbAdmin::run()
}
else
{
Config config = Config::readFromFile();
KbConfig config;
config.readFromFile();
config.kbDirectoryPath(k_kbDir);
config.readOnly(true);
KbInstance kb(config);
@@ -591,7 +595,8 @@ void pmnt::KbAdmin::exportKB(KbInstance& kb)

pmnt::KbDisposition pmnt::KbAdmin::determineDisposition()
{
Config config = Config::readFromFile();
KbConfig config;
config.readFromFile();
config.kbDirectoryPath(k_kbDir);
return KbInstance::determineDisposition(config);
}

0 comments on commit 8fc067b

Please sign in to comment.
You can’t perform that action at this time.