Class DecisionTreeTemplate

java.lang.Object
com.aquima.interactions.test.templates.AbstractReportingTemplate
com.aquima.interactions.test.templates.tree.DecisionTreeTemplate

public class DecisionTreeTemplate extends AbstractReportingTemplate
Template that can be used to initialize a decision tree.
Since:
6.0
Author:
O. Kerpershoek
  • Constructor Details

    • DecisionTreeTemplate

      public DecisionTreeTemplate(com.aquima.interactions.foundation.report.IInitializationReport report, String name)
      Constructs the template with the required arguments.
      Parameters:
      report - the report to add errors and warnings during initialization.
      name - The name of the decision tree.
    • DecisionTreeTemplate

      public DecisionTreeTemplate(com.aquima.interactions.foundation.report.IInitializationReport report, String name, boolean exposedAsWebservice)
      Constructs the template with the required arguments.
      Parameters:
      report - the report to add errors and warnings during initialization.
      name - The name of the decision tree.
      exposedAsWebservice - will the tree be exposed as a webservice
  • Method Details

    • getName

      protected String getName()
    • isExposedAsWebservice

      protected boolean isExposedAsWebservice()
    • getRoles

      protected String[] getRoles()
    • addRole

      public void addRole(String role)
    • getDisplayText

      protected com.aquima.interactions.foundation.text.IMultilingualText getDisplayText()
    • setDisplayText

      public void setDisplayText(String displayText)
      This method can be used to override the display text of the decision tree.
      Parameters:
      displayText - the display text of the decision tree.
    • setDisplayText

      public void setDisplayText(com.aquima.interactions.foundation.text.IMultilingualText displayText)
      This method can be used to override the display text of the decision tree.
      Parameters:
      displayText - the display text of the decision tree.
      Since:
      8.4
    • addSymptom

      public void addSymptom(String symptomText)
      This method may be used to add a symptom text.
      Parameters:
      symptomText - The symptom text that should be added.
    • addSymptom

      public void addSymptom(com.aquima.interactions.foundation.text.IMultilingualText symptomText)
      This method may be used to add a symptom text.
      Parameters:
      symptomText - The symptom text that should be added.
    • getSymptoms

      protected List<com.aquima.interactions.foundation.text.IMultilingualText> getSymptoms()
    • addCondition

      public ConditionNodeTemplate addCondition(String attribute)
      This method can be used to add a condition node.
      Parameters:
      attribute - The attribute that should be asked.
      Returns:
      Condition template representing the added condition.
    • getNodes

      protected List<DecisionTreeNodeTemplate> getNodes()
    • toDataSource

      public com.aquima.interactions.dtree.ds.IDecisionTreeDS toDataSource()
      This method converts the template to a data source that can be used to initialize a decision tree.
      Returns:
      a data source that can be used to initialize a decision tree.