Class MappingRuleAdapter
- java.lang.Object
-
- de.uni_marburg.mdo_over.graphtools.emf.HenshinRuleAdapter
-
- de.uni_marburg.mdo_over.graphtools.emf.MappingRuleAdapter
-
public class MappingRuleAdapter extends HenshinRuleAdapter
-
-
Field Summary
-
Fields inherited from class de.uni_marburg.mdo_over.graphtools.emf.HenshinRuleAdapter
match, resultMatch, rule
-
-
Constructor Summary
Constructors Constructor Description MappingRuleAdapter(org.eclipse.emf.henshin.interpreter.Engine engine, ModelGraphMapping mapping)
Creates an adapter wrapping a rule implementing the givenmapping
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<ModelNode,org.eclipse.emf.henshin.model.Node>
getImageToRuleMap()
Returns a map between the nodes of the image graph of theModelGraphMapping
used to create the rule represented by this adapter and their counterpartnodes
in the rule.Map<ModelNode,org.eclipse.emf.henshin.model.Node>
getOriginToRuleMap()
Returns a map between the nodes of the origin graph of theModelGraphMapping
used to create the rule represented by this adapter and their counterpartnodes
in the rule.-
Methods inherited from class de.uni_marburg.mdo_over.graphtools.emf.HenshinRuleAdapter
addModelEdgeToRule, addModelNodeToRuleIfAbsent, applyRule, findMatch, getLastMatch, getResultMatch, getRule
-
-
-
-
Constructor Detail
-
MappingRuleAdapter
public MappingRuleAdapter(org.eclipse.emf.henshin.interpreter.Engine engine, ModelGraphMapping mapping)
Creates an adapter wrapping a rule implementing the givenmapping
. 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 attributesattributes
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 rulemapping
- 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 theModelGraphMapping
used to create the rule represented by this adapter and their counterpartnodes
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 theModelGraphMapping
used to create the rule represented by this adapter and their counterpartnodes
in the rule.- Returns:
- mapping of nodes of the image graph of the used mapping to rule nodes
-
-