Class JustificationTree

java.lang.Object
com.aquima.interactions.rule.JustificationTree
All Implemented Interfaces:
Serializable

public class JustificationTree extends Object implements Serializable
This class holds the justification information for an attribute, and optionally justification information of the attributes that were used to determine the value of the attribute.
Since:
5.1
Author:
O. Kerpershoek
See Also:
  • Constructor Details

    • JustificationTree

      public JustificationTree(ValueReference reference, SourceType sourceType, String ruleName, String justificationTextId)
      Constructs a justification tree for the specified value.
      Parameters:
      reference - The value for which the justification tree is constructed.
      sourceType - The source type of this value
      ruleName - The name of the rule that was used to source this value
      justificationTextId - The justification text id of the specified value
  • Method Details

    • getValueReference

      public ValueReference getValueReference()
      This method returns the value reference for which the justification tree was created.
      Returns:
      the value reference for which the justification tree was created.
    • getSourceType

      public SourceType getSourceType()
      Returns the source type of the value.
      Returns:
      The sourcetype, never null.
    • getRuleName

      public String getRuleName()
      This method returns the name of the rule that was used to source the value
      Returns:
      the name of the rule which source the value
    • getJustificationTextId

      public String getJustificationTextId()
      This method returns the justification text id of the inferenced value. The text id may be used to expand/lookup a text element (usually an asset or content item).
      Returns:
      the justification text of the inferenced value.
    • setUsedValues

      public void setUsedValues(JustificationTree[] resultArray)
      This method may be used to set the justification trees of the values that were used to inference the value of this tree.
      Parameters:
      resultArray - The array of justification trees that were used to inference the value of this tree.
    • getUsedValues

      public JustificationTree[] getUsedValues()
      This method returns an array with justification information for the values that were used to determine the value belonging to this justification tree.
      Returns:
      an array with justification information for the values that were used to determine the value belonging to this justification tree.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object