Interface ISourceVisitor

All Superinterfaces:
IRuleVisitor
All Known Implementing Classes:
InferenceRuleVisitor, ReportingSourceVisitor, SourceDelegateVisitor

public interface ISourceVisitor extends IRuleVisitor
An implementation of this visitor is provided by the rule engine during initialization to allow the data layer to add inference rules.
Since:
5.0
Author:
O. Kerpershoek
  • Method Details

    • addSource

      void addSource(IInferenceRule source)
      This method may be used to add a custom inference rule to the rule engine.
      Parameters:
      source - The custom implementation of the inference rule interface.
      Throws:
      InitializationException - This exception is raised when the rule could not be added due to errors.
    • addExternalSource

      void addExternalSource(IExternalRuleDS ruleDS)
      The data layer may invoke this method to add an external inference rule. The rule factory will be used to locate the implementation for the inference rule.
      Parameters:
      ruleDS - Data source providing information about the external inference rule.
      Throws:
      InitializationException - This exception is raised when the rule could not be added due to errors.
    • addTable

      void addTable(IDecisionTableDS source)
      This method may be used to add a decision table to the rule engine.
      Parameters:
      source - Data source capable of providing the data needed to initialize a decision table.
      Throws:
      InitializationException - This exception is raised when the rule could not be added due to errors.
    • addRule

      void addRule(IBusinessRuleDS businessRule)
      This method may be used to add a business rule (IF-THEN rule) to the rule engine.
      Parameters:
      businessRule - Data source capable of providing the data needed to initialize a business rule.
      Throws:
      InitializationException - This exception is raised when the rule could not be added due to errors.
    • addDefaultRule

      void addDefaultRule(IDefaultRuleDS defaultDS)
      This method may be used to add a default rule to the rule graph. Default rules are different from normal inference rules as they may source a value for only a single attribute, and will be executed after all the other rules have been evaluated.
      Parameters:
      defaultDS - Data source providing the information for the default rule.
      Throws:
      InitializationException - This exception is raised when the rule could not be added due to errors.
    • addDataRule

      void addDataRule(IDataRuleDS dataRule)
      This method may be used to add a data rule to the rule engine.
      Parameters:
      dataRule - Data source capable of providing the data needed to initialize a data rule.
      Throws:
      InitializationException - This exception is raised when the rule could not be added due to errors.