Class TreeEngineFactory

  • All Implemented Interfaces:
    ITreeEngineFactory

    public class TreeEngineFactory
    extends Object
    implements ITreeEngineFactory
    Factory class that may be used to create an instance of ITreeEngine.
    Since:
    5.0
    Author:
    Jon van Leuven
    • Constructor Detail

      • TreeEngineFactory

        public TreeEngineFactory()
    • Method Detail

      • getInstance

        public static ITreeEngineFactory getInstance()
        Get an instance of ITreeEngineFactory. If there is an implementation register via the ClassFactory (with key 'treeengine-factory'), an instance of this class is returned. Note: keep in mind that the instance returned is kept in a static member, so once this class is loaded always the same instance is returned.
        Returns:
        ITreeEngineFactory implementation
      • create

        public ITreeEngine create​(IMetaModel metamodel,
                                  IParserFactory parserFactory,
                                  IComposer composer,
                                  ITreeEngineDS datasource)
                           throws InitializationException
        Description copied from interface: ITreeEngineFactory
        Constructs the tree engine with the required arguments.
        Specified by:
        create in interface ITreeEngineFactory
        Parameters:
        metamodel - The meta model definitions.
        parserFactory - Parser factory that should be used to create expression parsers.
        composer - The composer containing asset and container definitions.
        datasource - The data-source containing the information of the decision trees that need to be added.
        Returns:
        Implementation of the tree engine interface.
        Throws:
        InitializationException - This exception is thrown when the tree engine could not be initialized due to a fatal exception.