Class MappingRuleAdapter

    • Constructor Detail

      • MappingRuleAdapter

        public MappingRuleAdapter​(org.eclipse.emf.henshin.interpreter.Engine engine,
                                  ModelGraphMapping mapping)
        Creates an adapter wrapping a rule implementing the given mapping. Mapped elements are represented by preserved elements in the rule. Unmapped nodes and edges only appearing in the image graph are represented as created elements. However, unmapped attributes attributes of the image graph will not be considered if their containing element is mapped, i.e, an attribute may not be created in a preserved element. Unmapped elements of the origin graph are completely ignored for now.

        Note: The rule implementing the mapping is created during initialization. Later changes to the mapping are not reflected by the adapter.

        Parameters:
        engine - engine used to apply the wrapped rule
        mapping - mapping to create the rule from
    • Method Detail

      • getOriginToRuleMap

        public Map<ModelNode,​org.eclipse.emf.henshin.model.Node> getOriginToRuleMap()
        Returns a map between the nodes of the origin graph of the ModelGraphMapping used to create the rule represented by this adapter and their counterpart nodes in the rule.
        Returns:
        mapping of nodes of the origin graph of the used mapping to rule nodes
      • getImageToRuleMap

        public Map<ModelNode,​org.eclipse.emf.henshin.model.Node> getImageToRuleMap()
        Returns a map between the nodes of the image graph of the ModelGraphMapping used to create the rule represented by this adapter and their counterpart nodes in the rule.
        Returns:
        mapping of nodes of the image graph of the used mapping to rule nodes