Class MergeIntent

java.lang.Object
org.iam.intent.MergeIntent

public class MergeIntent extends Object
MergeIntent is used to merge and manipulate sets of domain values for intent mining.

Supports merging compatible intents, checking mergeability, and converting to MCPIntent.

Since:
2025-02-28
Author:
  • Constructor Details

    • MergeIntent

      public MergeIntent(MergeIntent intent)
      Copy constructor.
      Parameters:
      intent - the MergeIntent to copy
    • MergeIntent

      public MergeIntent(MCPIntent finding)
      Constructs a MergeIntent from an MCPIntent.
      Parameters:
      finding - the MCPIntent to convert
  • Method Details

    • getDomainValues

      public HashMap<String,Set<String>> getDomainValues()
      Returns the domain values for this intent.
      Returns:
      the domain values map
    • setDomainValues

      public void setDomainValues(String domain, Set<String> values)
      Sets the values for a specific domain.
      Parameters:
      domain - the domain name
      values - the set of values to set
    • isMerged

      public Boolean isMerged(MergeIntent intent)
      Checks if this intent can be merged with another (differs in exactly one domain).
      Parameters:
      intent - the other MergeIntent
      Returns:
      true if mergeable, false otherwise
    • merge

      public MergeIntent merge(MergeIntent intent)
      Merges this intent with another, combining values in the differing domain.
      Parameters:
      intent - the other MergeIntent
      Returns:
      the merged MergeIntent
    • getFinding

      public MCPIntent getFinding()
      Converts this MergeIntent to an MCPIntent.
      Returns:
      the corresponding MCPIntent
    • getFinding

      public MCPIntent getFinding(String domain)
      Converts this MergeIntent to an MCPIntent for a specific domain.
      Parameters:
      domain - the domain name
      Returns:
      the corresponding MCPIntent
    • 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