Class CompositionOperator

java.lang.Object
ca.mcscert.jpipe.operators.CompositionOperator
Direct Known Subclasses:
AssembleOperator, RefineOperator

public abstract class CompositionOperator extends Object
Base class for all composition operators. Owns the partition + two-phase (create-then-link) algorithm via the Template Method pattern.

Subclasses provide three hooks:

  1. equivalenceRelation(List, Map) — decides which elements belong to the same group
  2. mergeFunction(List, Map) — creates the merged element for each group and populates the AliasRegistry
  3. createResultModel(String, SourceLocation, List, Map) — emits the command that declares the result model

Operators are stateless: the same instance can be reused for multiple apply(String, List, Map) calls with different arguments.