public class DefaultKnowledgeBaseManager extends BaseEngineModule implements KnowledgeBaseManager
| Modifier and Type | Field and Description |
|---|---|
protected KnowledgeBase |
defaultKnowledgeBase |
protected Map<String,KnowledgeBaseInterpreterFactory> |
knowledgeBaseInterpreterFactories
Knowledge base interpreter factories.
|
protected Map<String,KnowledgeBase> |
knowledgeBases
Knowledge bases in a map (name, KnowledgeBase).
|
protected KnowledgeBaseScriptProviderMapping |
knowledgeBaseScriptProviderMapping
Knowledge base script provider mapping.
|
| Constructor and Description |
|---|
DefaultKnowledgeBaseManager(SpongeEngine engine)
Creates a new knowledge base manager.
|
getDescription, getEngine, getInternalService, getLabel, getName, getState, isFailed, isNew, isNewOrStartingOrRunning, isRunning, isStarting, isStopping, isTerminated, setDescription, setEngine, setLabel, setName, shutdown, startup, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitisFailed, isNew, isRunning, isStarting, isStopping, isTerminated, shutdown, startupgetDescription, getLabel, getName, setDescription, setLabel, setNameprotected Map<String,KnowledgeBaseInterpreterFactory> knowledgeBaseInterpreterFactories
protected Map<String,KnowledgeBase> knowledgeBases
protected KnowledgeBase defaultKnowledgeBase
protected KnowledgeBaseScriptProviderMapping knowledgeBaseScriptProviderMapping
public DefaultKnowledgeBaseManager(SpongeEngine engine)
engine - the engine.public void configure(Configuration configuration)
configure in interface Configurableconfiguration - configuration.protected KnowledgeBase createKnowledgeBaseFromConfiguration(Configuration configuration)
protected DefaultScriptKnowledgeBase createScriptKnowledgeBaseFromConfiguration(String name, String typeCode, List<Configuration> fileNodes)
protected KnowledgeBase createNonScriptKnowledgeBaseFromConfiguration(String name, String typeCode, String kbClass, List<Configuration> fileNodes)
public void reload()
reload in interface KnowledgeBaseManagerpublic void clearKnowledgeBaseOnReload(ScriptKnowledgeBase knowledgeBase)
public void disableProcessors(ScriptKnowledgeBase knowledgeBase)
public void doStartup()
doStartup in class BaseEngineModulepublic void doShutdown()
doShutdown in class BaseEngineModulepublic void onInit()
onInit in interface KnowledgeBaseOperationspublic void onBeforeLoad()
onBeforeLoad in interface KnowledgeBaseOperationspublic void onLoad()
onLoad in interface KnowledgeBaseOperationspublic void onAfterLoad()
onAfterLoad in interface KnowledgeBaseOperationspublic void onClear()
onClear in interface KnowledgeBaseOperationspublic void onStartup()
onStartup in interface KnowledgeBaseOperationspublic boolean onRun()
onRun in interface KnowledgeBaseOperationspublic void onShutdown()
onShutdown in interface KnowledgeBaseOperationspublic void onBeforeReload()
onBeforeReload in interface KnowledgeBaseOperationspublic void onAfterReload()
onAfterReload in interface KnowledgeBaseOperationsprotected void onInitializeKnowledgeBases()
public void addKnowledgeBase(KnowledgeBase knowledgeBase)
addKnowledgeBase in interface KnowledgeBaseManagerpublic Throwable unwrapKnowledgeBaseException(Throwable exception)
unwrapKnowledgeBaseException in interface KnowledgeBaseManagerpublic void setKnowledgeBaseInterpreterFactoryProviders(List<KnowledgeBaseInterpreterFactoryProvider> providers)
setKnowledgeBaseInterpreterFactoryProviders in interface KnowledgeBaseManagerprotected KnowledgeBaseInterpreterFactory getKnowledgeBaseInterpreterFactory(String typeCode)
public KnowledgeBaseInterpreter createKnowledgeBaseInterpreter(String typeCode, KnowledgeBase knowledgeBase)
public KnowledgeBase getKnowledgeBase(String name)
getKnowledgeBase in interface KnowledgeBaseManagerpublic ScriptKnowledgeBase getScriptKnowledgeBase(String name)
getScriptKnowledgeBase in interface KnowledgeBaseManagerpublic KnowledgeBase getMainKnowledgeBase()
getMainKnowledgeBase in interface KnowledgeBaseManagerpublic List<KnowledgeBase> getKnowledgeBases()
getKnowledgeBases in interface KnowledgeBaseManagerpublic KnowledgeBase getDefaultKnowledgeBase()
getDefaultKnowledgeBase in interface KnowledgeBaseManagerpublic void setInterpreterGlobalVariable(String name, Object value)
setInterpreterGlobalVariable in interface KnowledgeBaseManagerpublic KnowledgeBaseScriptProvider<KnowledgeBaseScript> getKnowledgeBaseScriptProvider(KnowledgeBaseScript script)
getKnowledgeBaseScriptProvider in interface KnowledgeBaseManagerpublic KnowledgeBaseType inferKnowledgeBaseType(String knowledgeBaseName, List<KnowledgeBaseScript> scripts)
public void verifyKnowledgeBaseFileTypes(ScriptKnowledgeBase scriptKnowledgeBase)
Copyright © 2016–2021 Softelnet. All rights reserved.