Class BuildUtils


  • public class BuildUtils
    extends Object
    Utility functions for reteoo build
    • Constructor Detail

      • BuildUtils

        public BuildUtils()
    • Method Detail

      • addBuilder

        public void addBuilder​(Class<?> target,
                               ReteooComponentBuilder builder)
        Adds the given builder for the given target to the builders map
      • attachNode

        public <T extends BaseNode> T attachNode​(BuildContext context,
                                                 T candidate)
        Attaches a node into the network. If a node already exists that could substitute, it is used instead.
        Parameters:
        context - The current build context
        candidate - The node to attach.
        Returns:
        the actual attached node that may be the one given as parameter or eventually one that was already in the cache if sharing is enabled
      • createBetaNodeConstraint

        public BetaConstraints createBetaNodeConstraint​(BuildContext context,
                                                        List<BetaNodeFieldConstraint> list,
                                                        boolean disableIndexing)
        Creates and returns a BetaConstraints object for the given list of constraints
        Parameters:
        context - the current build context
        list - the list of constraints
      • calculateTemporalDistance

        public TemporalDependencyMatrix calculateTemporalDistance​(GroupElement groupElement)
        Calculates the temporal distance between all event patterns in the given subrule.
        Parameters:
        groupElement - the root element of a subrule being added to the rulebase