Changes for page Transformation Mapping (KTM)
Last modified by Richard Kreissig on 2023/09/14 11:14
<
>
edited by Alexander Schulz-Rosengarten
on 2023/07/06 14:37
on 2023/07/06 14:37
edited by Alexander Schulz-Rosengarten
on 2013/12/27 14:06
on 2013/12/27 14:06
Change comment:
Fixed some explanations and updated JavaDoc attachement due to API changes
Summary
-
Page properties (3 modified, 0 added, 0 removed)
-
Attachments (0 modified, 0 added, 13 removed)
- TransformationMapping.html
- TransformationTreeExtensions.html
- abstract_example_tree.png
- als-ktm-splitTriggerEffect-detail.jpg
- als-ktmt-metamodel.png
- example_abo.jpeg
- example_abo_norm.jpeg
- example_abo_resolved.jpeg
- example_abo_resolved_elements.jpeg
- example_abo_scg.jpeg
- example_abo_splitTE.jpeg
- example_tree.jpeg
- example_tree_transformation.jpeg
-
Objects (1 modified, 0 added, 1 removed)
Details
- Page properties
-
- Parent
-
... ... @@ -1,1 +1,0 @@ 1 -KIELER.Home.SCCharts.Previous Versions (Deprecated Documentation).WebHome - Tags
-
... ... @@ -1,1 +1,0 @@ 1 -favourite - Content
-
... ... @@ -1,13 +1,7 @@ 1 1 = KTM - KIELER Transformation Mapping = 2 2 3 -{{panel bgColor="orange" title="Deprecated since 0.12"}} 4 -This article is deprecated. The described features are no longer available in current releases. 3 + 5 5 6 -KTM was redesigned is now available as KiTT included in KiCool. 7 -{{/panel}} 8 - 9 -\\ 10 - 11 11 === Topics === 12 12 13 13 ... ... @@ -22,7 +22,7 @@ 22 22 23 23 == Transformation Tree Model == 24 24 25 - \\19 + 26 26 27 27 To offer a mapping between model-elements during multiple transformations KTM introduces a model called TransformationTree to represent these relations. 28 28 ... ... @@ -32,11 +32,11 @@ 32 32 33 33 The structure of the model can be separated into two parts. 34 34 35 -**First part** (upper half) is a tree of transformations. Each Model Wrapper-class is a representation of a model which is transformed. SoModelWrapperare nodes and ModelTransformations are edges. Thus theWrapperrepresenting theinitial-source-model of alltransformationis also the root of a TransformationTree-model.29 +**First part** (upper half) is a tree of transformations. Each Model-class is a representation of a concrete model which is transformed. So models are nodes and ModelTransformations are edges. Thus the Model representing the root-model of a tree is also the root of a concrete TransformationTree-model. 36 36 37 -**Second part** (lower half) is object-mapping. Instances of models contain EObjects as their elements, which are represented by E ObjectWrapper-class in thismetamodel. TheObjectWrapperof two models are connected with EObjectTransformations-class to expresstheir origination relationship in corresponding model transformation.31 +**Second part** (lower half) is object-mapping. Instances of models contain EObjects as their elements, which are represented by Element-class in TransformationTree metamodel. The Elements of two models are connected with ElementTransformations-class to model their origination relationship in corresponding model transformation. 38 38 39 - \\33 + 40 40 41 41 An abstract example of an instance of this model: 42 42 ... ... @@ -68,215 +68,11 @@ 68 68 69 69 == Implementation Details == 70 70 71 -* All references to EObjects in EObjectWrapper are references to a copy of the original EObject. This allows to represent immutable mapping. To reidentify corresponding EObjects TransformationTreeExtensions provides search functions which will check for structural matching models. 72 -* Models in TransformationTrees may be transient. This indicates that all references to EObjects in all Elements of the transient model are removed. Thus these models can't be source of a new appended transformation and can not be associated with it's original model. The main propose of this feature is to improve scalability of TransformationTrees by removing unnecessary references to internal model, but preserve traversing functionality of the object-mapping. 73 -* Mappings can be incomplete causing resulting transfromation tree to be incomplete. A incomplete tree does not represent every object in a model with a corresponding Element. This may break some paths of element transformations, but allows to omit model-immanent objects like annotations from mapping. TranformationMapping extension provies a function to check completeness of mapping against its models. 65 +* All references to EObjects are references to a copy of the original EObject. This allows to represent immutable mapping. To reidentify corresponding EObjects TransformationTreeExtensions provides search functions which will check for structural matching models. 66 +* Models in TransformationTrees may be transient. This indicates that all references to EObjects in all Elements of the transient model are removed. Thus these models can't be source of a new appended transformation and can not be associated with it's original model. The main propose of this feature is to improve scalability of TransformationTrees by removing unnecessary references to internal model, but preserve traversing functionality of the ObjectMapping. 74 74 75 75 ---- 76 76 77 77 == Example == 78 78 79 -In this example we will perform some transformations on SCCharts. 80 - 81 -The source chart is a ABO, the "Hello World" of SCCharts. 82 - 83 -ABO is already a CoreSCChart, so we will perform normalization and a transformation to SCG. 84 - 85 -=== Creating Mapping during Transformation === 86 - 87 -In order to note every single element transformation of a model transformation, we use the TransformationMapping extension. 88 - 89 -After each creation of new Objects for transformed model the mapping must be updated with it's origin information. 90 - 91 -The codeblock blow show a snipped of SCChartCoreTransformation with additional mapping registration. 92 - 93 -\\ 94 - 95 -{{code language="java" theme="Eclipse" firstline="1" title="transformTriggerEffect CodeSnipped" linenumbers="true" collapse="true"}} 96 -... 97 - @Inject 98 - extension TransformationMapping 99 - 100 -... 101 - 102 - // NEW - Mapping access delegation 103 - def extractMapping() { 104 - extractMappingData; 105 - } 106 - 107 -... 108 - 109 - //------------------------------------------------------------------------- 110 - //-- S P L I T T R A N S I T I O N -- 111 - //------------------------------------------------------------------------- 112 - // For every transition T that has both, a trigger and an effect do the following: 113 - // For every effect: 114 - // Create a conditional C and add it to the parent of T's source state S_src. 115 - // create a new true triggered immediate effect transition T_eff and move all effects of T to T_eff. 116 - // Set the T_eff to have T's target state. Set T to have the target C. 117 - // Add T_eff to C's outgoing transitions. 118 - def Region transformTriggerEffect(Region rootRegion) { 119 - clearMapping; //NEW - clear previous mapping information to assure a single consistent mapping 120 - // Clone the complete SCCharts region 121 - var targetRootRegion = rootRegion.mappedCopy; //NEW - mapping information (changed copy to mappedCopy) 122 - // Traverse all transitions 123 - for (targetTransition : targetRootRegion.getAllContainedTransitions) { 124 - targetTransition.transformTriggerEffect(targetRootRegion); 125 - } 126 - val completeness = checkMappingCompleteness(rootRegion, targetRootRegion); //NEW - DEBUG 127 - targetRootRegion; 128 - } 129 - def void transformTriggerEffect(Transition transition, Region targetRootRegion) { 130 - // Only apply this to transition that have both, a trigger (or is a termination) and one or more effects 131 - if (((transition.trigger != null || !transition.immediate || transition.typeTermination) && !transition.effects.nullOrEmpty) || 132 - transition.effects.size > 1) { 133 - val targetState = transition.targetState 134 - val parentRegion = targetState.parentRegion 135 - val transitionOriginalTarget = transition.targetState 136 - var Transition lastTransition = transition 137 - val firstEffect = transition.effects.head 138 - for (effect : transition.effects.immutableCopy) { 139 - // Optimization: Prevent transitions without a trigger 140 - if(transition.immediate && transition.trigger == null && firstEffect == effect) { 141 - // skip 142 - } else { 143 - val effectState = parentRegion.createState(GENERATED_PREFIX + "S") 144 - effectState.mapParents(transition.mappedParents); //NEW - mapping information 145 - effectState.uniqueName 146 - val effectTransition = createImmediateTransition.addEffect(effect) 147 - effectTransition.mapParents(transition.mappedParents); //NEW - mapping information 148 - 149 - effectTransition.setSourceState(effectState) 150 - lastTransition.setTargetState(effectState) 151 - lastTransition = effectTransition 152 - } 153 - } 154 - lastTransition.setTargetState(transitionOriginalTarget) 155 - } 156 - } 157 -{{/code}} 158 - 159 -=== Create TransformationTree === 160 - 161 -The following code will now perform each transformation stepwise and updates a transformation tree each step. 162 - 163 -\\ 164 - 165 -{{code language="java" theme="Eclipse" firstline="1" title="Transform and create TranformationTree" linenumbers="true" collapse="true"}} 166 -aboSplitTE = SCCtransformation.transformTriggerEffect(abo); 167 - 168 -ModelWrapper aboSplitTEModel = 169 - transformationTree.initializeTransformationTree(SCCtransformation.extractMapping(), "TriggerEffect", abo, "coreSCChart", aboSplitTE, "coreSCChart-splitTriggerEffect"); 170 - 171 -aboNormalized = SCCtransformation.transformSurfaceDepth(aboSplitTE); 172 - 173 -ModelWrapper aboNormalizedModel = 174 - transformationTree.addTransformationToTree(SCCtransformation.extractMapping(), aboSplitTEModel, "SurfaceDepth", aboSplitTE, aboNormalized, "normalizedCoreSCChart"); 175 - 176 -aboSCG = SCGtransformation.transformSCG(aboNormalized); 177 - 178 -ModelWrapper aboSCGModel = 179 - transformationTree.addTransformationToTree(SCGtransformation.extractMapping(), aboNormalizedModel, "SCC2SCG", aboNormalized, aboSCG,"SCG"); 180 - 181 -tree = transformationTree.root(aboSCGModel); 182 -{{/code}} 183 - 184 -\\ 185 - 186 -The resulting TransformationTree has following structure and representing each step and model of the transformation. 187 - 188 -\\ 189 - 190 -(% class="wrapped" %) 191 -|=(% style="text-align: center;" colspan="4" %)(% style="text-align: center;" colspan="4" %) 192 -((( 193 -(% class="content-wrapper" %) 194 -((( 195 -[[image:attach:example_tree.jpeg]] 196 -))) 197 -))) 198 -|(% style="text-align: center;" colspan="1" %)(% style="text-align: center;" colspan="1" %) 199 -((( 200 -(% class="content-wrapper" %) 201 -((( 202 -[[image:attach:example_abo.jpeg]] 203 -))) 204 -)))|(% style="text-align: center;" colspan="1" %)(% style="text-align: center;" colspan="1" %) 205 -((( 206 -(% class="content-wrapper" %) 207 -((( 208 -[[image:attach:example_abo_splitTE.jpeg]] 209 -))) 210 -)))|(% style="text-align: center;" colspan="1" %)(% style="text-align: center;" colspan="1" %) 211 -((( 212 -(% class="content-wrapper" %) 213 -((( 214 -[[image:attach:example_abo_norm.jpeg]] 215 -))) 216 -)))|(% style="text-align: center;" colspan="1" %)(% style="text-align: center;" colspan="1" %) 217 -((( 218 -(% class="content-wrapper" %) 219 -((( 220 -[[image:attach:example_abo_scg.jpeg]] 221 -))) 222 -))) 223 - 224 -\\ 225 - 226 -Furthermore the TransformationTree now contains mapping information for the whole transformation chain. 227 - 228 -Now we can use an additional feature of KTM, the resolving of mappings between arbitary models. 229 - 230 -The following code has starts with an instance of the initial ABO SCChart and SCG, along with the TranformationTree above. 231 - 232 -\\ 233 - 234 -{{code language="java" theme="Eclipse" firstline="1" title="resolveMapping" linenumbers="true" collapse="true"}} 235 -@Inject 236 -extension TransformationTreeExtensions 237 - 238 -//Find nodes of model instances in tree 239 -val aboSCCModelWrapper = transformationTree.findModel(aboSCC,"coreSCChart"); 240 -val aboSCGModelWrapper = transformationTree.findModel(aboSCG,"SCG"); 241 - 242 -//resolve 243 -val mapping = resolvemapping(aboSCCModelWrapper, aboSCC, aboSCGModelWrapper, aboSCG); 244 -{{/code}} 245 - 246 -\\ 247 - 248 -The returned mapping is a multi mapping between all object in aboSCC and their resulting objects in aboSCG. 249 - 250 -This mapping can now displayed in models or used for various information propagation between elements of the models. 251 - 252 -[[image:attach:example_abo_resolved.jpeg]] 253 - 254 -\\ 255 - 256 -Also a more detailed view is available, showing all EObjects relation. 257 - 258 -\\ 259 - 260 -[[image:attach:example_abo_resolved_elements.jpeg]] 261 - 262 -== Visualisation == 263 - 264 -If you have a TransformationTree file (.ktmt) you can open a KLighD visualisation by right-clicking on file in project-tree and selecting //'Open Transformation Tree//'. 265 - 266 -=== Diagram Options === 267 - 268 -//Model Visualisation//: If enabled tries to visaulize selected models with KLighD else a EObject-represenation is created. 269 - 270 -//EObject Attributes//: If enabled shows Attributes of EObject in EObject-represenation. 271 - 272 -//Selective mapping edges//: If enabled shows only selected mapping edges. 273 - 274 -=== Interaction === 275 - 276 -//CTRL+CLICK//: Selects a Node in TransformationTree as source and displays its represented model. 277 - 278 -//SHIFT+CLICK//: Selects a Node in TransformationTree as target, displays both models and the resolved mapping as edges (currenly only between States/Regions). 279 - 280 -If Selective selective mapping edge is enabled no mapping edges are displayed. If you select (//CLICK//) an element in one of the two model its relation to corresponding element is displayed. You can multi-select with //CTRL+CLICK// or deselect by clicking on an edge. 281 - 282 -\\ 72 +coming soon
- TransformationMapping.html
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.XWikiGuest - Size
-
... ... @@ -1,1 +1,0 @@ 1 -16.6 KB - Content
-
... ... @@ -1,368 +1,0 @@ 1 -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 2 -<!-- NewPage --> 3 -<html lang="de"> 4 -<head> 5 -<!-- Generated by javadoc (version 1.6.0_27) on Fri Jan 10 10:58:36 CET 2014 --> 6 -<title>TransformationMapping</title> 7 -<meta name="date" content="2014-01-10"> 8 -<link rel="stylesheet" type="text/css" href="https://guava-libraries.googlecode.com/git-history/release/javadoc-stylesheet.css" title="Style"> 9 -</head> 10 -<body> 11 -<!-- ======== START OF CLASS DATA ======== --> 12 -<div class="header"> 13 -<p class="subTitle">de.cau.cs.kieler.ktm.extensions</p> 14 -<h2 title="Class TransformationMapping" class="title">Class TransformationMapping</h2> 15 -</div> 16 -<div class="contentContainer"> 17 -<ul class="inheritance"> 18 -<li>java.lang.Object</li> 19 -<li> 20 -<ul class="inheritance"> 21 -<li>de.cau.cs.kieler.ktm.extensions.TransformationMapping</li> 22 -</ul> 23 -</li> 24 -</ul> 25 -<div class="description"> 26 -<ul class="blockList"> 27 -<li class="blockList"> 28 -<hr> 29 -<br> 30 -<pre>public class <strong>TransformationMapping</strong> 31 -extends java.lang.Object</pre> 32 -<div class="block">Extension for creating mappings during transformation.</div> 33 -<dl><dt><span class="strong">Author:</span></dt> 34 - <dd>als</dd></dl> 35 -</li> 36 -</ul> 37 -</div> 38 -<div class="summary"> 39 -<ul class="blockList"> 40 -<li class="blockList"> 41 -<!-- ======== CONSTRUCTOR SUMMARY ======== --> 42 -<ul class="blockList"> 43 -<li class="blockList"><a name="constructor_summary"> 44 -<!-- --> 45 -</a> 46 -<h3>Constructor Summary</h3> 47 -<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> 48 -<caption><span>Constructors</span><span class="tabEnd"> </span></caption> 49 -<tr> 50 -<th class="colOne" scope="col">Constructor and Description</th> 51 -</tr> 52 -<tr class="altColor"> 53 -<td class="colOne"><code><strong><a href="TransformationMapping.html#TransformationMapping()">TransformationMapping</a></strong>()</code> </td> 54 -</tr> 55 -</table> 56 -</li> 57 -</ul> 58 -<!-- ========== METHOD SUMMARY =========== --> 59 -<ul class="blockList"> 60 -<li class="blockList"><a name="method_summary"> 61 -<!-- --> 62 -</a> 63 -<h3>Method Summary</h3> 64 -<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> 65 -<caption><span>Methods</span><span class="tabEnd"> </span></caption> 66 -<tr> 67 -<th class="colFirst" scope="col">Modifier and Type</th> 68 -<th class="colLast" scope="col">Method and Description</th> 69 -</tr> 70 -<tr class="altColor"> 71 -<td class="colFirst"><code>org.eclipse.xtext.xbase.lib.Pair<com.google.common.collect.ImmutableSet<org.eclipse.emf.ecore.EObject>,com.google.common.collect.ImmutableSet<org.eclipse.emf.ecore.EObject>></code></td> 72 -<td class="colLast"><code><strong><a href="TransformationMapping.html#checkMappingCompleteness(org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.EObject)">checkMappingCompleteness</a></strong>(org.eclipse.emf.ecore.EObject sourceModel, 73 - org.eclipse.emf.ecore.EObject targetModel)</code> 74 -<div class="block">Checks if mapping is complete 75 - 76 - All objects in sourceModel are compared with parents and all targetModel objects are compared to children, both includes given source/target-model objects.</div> 77 -</td> 78 -</tr> 79 -<tr class="rowColor"> 80 -<td class="colFirst"><code>void</code></td> 81 -<td class="colLast"><code><strong><a href="TransformationMapping.html#clearMapping()">clearMapping</a></strong>()</code> 82 -<div class="block">Drops all current mapping information</div> 83 -</td> 84 -</tr> 85 -<tr class="altColor"> 86 -<td class="colFirst"><code>com.google.common.collect.ImmutableMultimap<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EObject></code></td> 87 -<td class="colLast"><code><strong><a href="TransformationMapping.html#extractMappingData()">extractMappingData</a></strong>()</code> 88 -<div class="block">This will extract mapping data as an immutable copy and clears local mapping afterwards</div> 89 -</td> 90 -</tr> 91 -<tr class="rowColor"> 92 -<td class="colFirst"><code>boolean</code></td> 93 -<td class="colLast"><code><strong><a href="TransformationMapping.html#mapChild(org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.EObject)">mapChild</a></strong>(org.eclipse.emf.ecore.EObject parent, 94 - org.eclipse.emf.ecore.EObject child)</code> 95 -<div class="block">Maps given child as result of this transformation for given parent.</div> 96 -</td> 97 -</tr> 98 -<tr class="altColor"> 99 -<td class="colFirst"><code>boolean</code></td> 100 -<td class="colLast"><code><strong><a href="TransformationMapping.html#mapChildren(org.eclipse.emf.ecore.EObject, java.util.List)">mapChildren</a></strong>(org.eclipse.emf.ecore.EObject parent, 101 - java.util.List<org.eclipse.emf.ecore.EObject> children)</code> 102 -<div class="block">Maps given children as results of this transformation for given parent.</div> 103 -</td> 104 -</tr> 105 -<tr class="rowColor"> 106 -<td class="colFirst"><code>boolean</code></td> 107 -<td class="colLast"><code><strong><a href="TransformationMapping.html#mapParent(org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.EObject)">mapParent</a></strong>(org.eclipse.emf.ecore.EObject child, 108 - org.eclipse.emf.ecore.EObject parent)</code> 109 -<div class="block">Maps given parent as source of given child in this transformation.</div> 110 -</td> 111 -</tr> 112 -<tr class="altColor"> 113 -<td class="colFirst"><code>boolean</code></td> 114 -<td class="colLast"><code><strong><a href="TransformationMapping.html#mapParents(org.eclipse.emf.ecore.EObject, java.util.List)">mapParents</a></strong>(org.eclipse.emf.ecore.EObject child, 115 - java.util.List<org.eclipse.emf.ecore.EObject> parents)</code> 116 -<div class="block">Maps given parents as source of given child in this transformation.</div> 117 -</td> 118 -</tr> 119 -<tr class="rowColor"> 120 -<td class="colFirst"><code>java.util.List<org.eclipse.emf.ecore.EObject></code></td> 121 -<td class="colLast"><code><strong><a href="TransformationMapping.html#mappedChildren(org.eclipse.emf.ecore.EObject)">mappedChildren</a></strong>(org.eclipse.emf.ecore.EObject parent)</code> 122 -<div class="block">Returns all Children mapped to given parent</div> 123 -</td> 124 -</tr> 125 -<tr class="altColor"> 126 -<td class="colFirst"><code><T extends org.eclipse.emf.ecore.EObject> <br>T</code></td> 127 -<td class="colLast"><code><strong><a href="TransformationMapping.html#mappedCopy(T)">mappedCopy</a></strong>(T original)</code> 128 -<div class="block">Creates direct mapping between two identical models.</div> 129 -</td> 130 -</tr> 131 -<tr class="rowColor"> 132 -<td class="colFirst"><code>java.util.List<org.eclipse.emf.ecore.EObject></code></td> 133 -<td class="colLast"><code><strong><a href="TransformationMapping.html#mappedParents(org.eclipse.emf.ecore.EObject)">mappedParents</a></strong>(org.eclipse.emf.ecore.EObject child)</code> 134 -<div class="block">Returns all Parents mapped to given child</div> 135 -</td> 136 -</tr> 137 -<tr class="altColor"> 138 -<td class="colFirst"><code>boolean</code></td> 139 -<td class="colLast"><code><strong><a href="TransformationMapping.html#unmap(org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.EObject)">unmap</a></strong>(org.eclipse.emf.ecore.EObject first, 140 - org.eclipse.emf.ecore.EObject second)</code> 141 -<div class="block">Removes mapping between given objects.</div> 142 -</td> 143 -</tr> 144 -<tr class="rowColor"> 145 -<td class="colFirst"><code>boolean</code></td> 146 -<td class="colLast"><code><strong><a href="TransformationMapping.html#unmapAll(org.eclipse.emf.ecore.EObject)">unmapAll</a></strong>(org.eclipse.emf.ecore.EObject obj)</code> 147 -<div class="block">Removes all mappings for given objects.</div> 148 -</td> 149 -</tr> 150 -</table> 151 -<ul class="blockList"> 152 -<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object"> 153 -<!-- --> 154 -</a> 155 -<h3>Methods inherited from class java.lang.Object</h3> 156 -<code>equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li> 157 -</ul> 158 -</li> 159 -</ul> 160 -</li> 161 -</ul> 162 -</div> 163 -<div class="details"> 164 -<ul class="blockList"> 165 -<li class="blockList"> 166 -<!-- ========= CONSTRUCTOR DETAIL ======== --> 167 -<ul class="blockList"> 168 -<li class="blockList"><a name="constructor_detail"> 169 -<!-- --> 170 -</a> 171 -<h3>Constructor Detail</h3> 172 -<a name="TransformationMapping()"> 173 -<!-- --> 174 -</a> 175 -<ul class="blockListLast"> 176 -<li class="blockList"> 177 -<h4>TransformationMapping</h4> 178 -<pre>public TransformationMapping()</pre> 179 -</li> 180 -</ul> 181 -</li> 182 -</ul> 183 -<!-- ============ METHOD DETAIL ========== --> 184 -<ul class="blockList"> 185 -<li class="blockList"><a name="method_detail"> 186 -<!-- --> 187 -</a> 188 -<h3>Method Detail</h3> 189 -<a name="checkMappingCompleteness(org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.EObject)"> 190 -<!-- --> 191 -</a> 192 -<ul class="blockList"> 193 -<li class="blockList"> 194 -<h4>checkMappingCompleteness</h4> 195 -<pre>public org.eclipse.xtext.xbase.lib.Pair<com.google.common.collect.ImmutableSet<org.eclipse.emf.ecore.EObject>,com.google.common.collect.ImmutableSet<org.eclipse.emf.ecore.EObject>> checkMappingCompleteness(org.eclipse.emf.ecore.EObject sourceModel, 196 - org.eclipse.emf.ecore.EObject targetModel)</pre> 197 -<div class="block">Checks if mapping is complete 198 - <p> 199 - All objects in sourceModel are compared with parents and all targetModel objects are compared to children, both includes given source/target-model objects. 200 - <p> 201 - Returns Pair of two sets where were key-element is symmetric difference between source model objects and all parents and value-element is symmetric difference between target and children. 202 - All elements are mapped correctly if both sets are empty.</div> 203 -<dl><dt><span class="strong">Returns:</span></dt><dd>Pair of two Sets with symmetric differences.</dd> 204 -<dt><span class="strong">Throws:</span></dt> 205 -<dd><code>java.lang.NullPointerException</code> - if sourceModel or targetMode is null.</dd></dl> 206 -</li> 207 -</ul> 208 -<a name="clearMapping()"> 209 -<!-- --> 210 -</a> 211 -<ul class="blockList"> 212 -<li class="blockList"> 213 -<h4>clearMapping</h4> 214 -<pre>public void clearMapping()</pre> 215 -<div class="block">Drops all current mapping information</div> 216 -</li> 217 -</ul> 218 -<a name="extractMappingData()"> 219 -<!-- --> 220 -</a> 221 -<ul class="blockList"> 222 -<li class="blockList"> 223 -<h4>extractMappingData</h4> 224 -<pre>public com.google.common.collect.ImmutableMultimap<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EObject> extractMappingData()</pre> 225 -<div class="block">This will extract mapping data as an immutable copy and clears local mapping afterwards</div> 226 -<dl><dt><span class="strong">Returns:</span></dt><dd>mapping</dd></dl> 227 -</li> 228 -</ul> 229 -<a name="mapChild(org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.EObject)"> 230 -<!-- --> 231 -</a> 232 -<ul class="blockList"> 233 -<li class="blockList"> 234 -<h4>mapChild</h4> 235 -<pre>public boolean mapChild(org.eclipse.emf.ecore.EObject parent, 236 - org.eclipse.emf.ecore.EObject child)</pre> 237 -<div class="block">Maps given child as result of this transformation for given parent.</div> 238 -<dl><dt><span class="strong">Returns:</span></dt><dd>true if the mapping changed.</dd> 239 -<dt><span class="strong">Throws:</span></dt> 240 -<dd><code>de.cau.cs.kieler.ktm.exceptions.MappingException</code> - when child parent relations were mixed (i.e. when one object is will be mapped as parent when it is already mapped as child).</dd> 241 -<dd><code>java.lang.NullPointerException</code> - if parent or child is null.</dd></dl> 242 -</li> 243 -</ul> 244 -<a name="mapChildren(org.eclipse.emf.ecore.EObject, java.util.List)"> 245 -<!-- --> 246 -</a> 247 -<ul class="blockList"> 248 -<li class="blockList"> 249 -<h4>mapChildren</h4> 250 -<pre>public boolean mapChildren(org.eclipse.emf.ecore.EObject parent, 251 - java.util.List<org.eclipse.emf.ecore.EObject> children)</pre> 252 -<div class="block">Maps given children as results of this transformation for given parent.</div> 253 -<dl><dt><span class="strong">Returns:</span></dt><dd>true if the mapping changed.</dd> 254 -<dt><span class="strong">Throws:</span></dt> 255 -<dd><code>de.cau.cs.kieler.ktm.exceptions.MappingException</code> - when child parent relations were mixed (i.e. when one object is will be mapped as parent when it is already mapped as child).</dd> 256 -<dd><code>java.lang.NullPointerException</code> - if parent or children list is null.</dd> 257 -<dd><code>java.lang.IllegalArgumentException</code> - if children list contains null element.</dd></dl> 258 -</li> 259 -</ul> 260 -<a name="mapParent(org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.EObject)"> 261 -<!-- --> 262 -</a> 263 -<ul class="blockList"> 264 -<li class="blockList"> 265 -<h4>mapParent</h4> 266 -<pre>public boolean mapParent(org.eclipse.emf.ecore.EObject child, 267 - org.eclipse.emf.ecore.EObject parent)</pre> 268 -<div class="block">Maps given parent as source of given child in this transformation.</div> 269 -<dl><dt><span class="strong">Returns:</span></dt><dd>true if the mapping changed.</dd> 270 -<dt><span class="strong">Throws:</span></dt> 271 -<dd><code>de.cau.cs.kieler.ktm.exceptions.MappingException</code> - when child parent relations were mixed (i.e. when one object is will be mapped as parent when it is already mapped as child).</dd> 272 -<dd><code>java.lang.NullPointerException</code> - if parent or child is null.</dd></dl> 273 -</li> 274 -</ul> 275 -<a name="mapParents(org.eclipse.emf.ecore.EObject, java.util.List)"> 276 -<!-- --> 277 -</a> 278 -<ul class="blockList"> 279 -<li class="blockList"> 280 -<h4>mapParents</h4> 281 -<pre>public boolean mapParents(org.eclipse.emf.ecore.EObject child, 282 - java.util.List<org.eclipse.emf.ecore.EObject> parents)</pre> 283 -<div class="block">Maps given parents as source of given child in this transformation.</div> 284 -<dl><dt><span class="strong">Returns:</span></dt><dd>true if the mapping changed.</dd> 285 -<dt><span class="strong">Throws:</span></dt> 286 -<dd><code>de.cau.cs.kieler.ktm.exceptions.MappingException</code> - when child parent relations were mixed (i.e. when one object is will be mapped as parent when it is already mapped as child).</dd> 287 -<dd><code>java.lang.NullPointerException</code> - if parents or child is null.</dd> 288 -<dd><code>java.lang.IllegalArgumentException</code> - if children list contains null element.</dd></dl> 289 -</li> 290 -</ul> 291 -<a name="mappedChildren(org.eclipse.emf.ecore.EObject)"> 292 -<!-- --> 293 -</a> 294 -<ul class="blockList"> 295 -<li class="blockList"> 296 -<h4>mappedChildren</h4> 297 -<pre>public java.util.List<org.eclipse.emf.ecore.EObject> mappedChildren(org.eclipse.emf.ecore.EObject parent)</pre> 298 -<div class="block">Returns all Children mapped to given parent</div> 299 -<dl><dt><span class="strong">Returns:</span></dt><dd>List of children for parent</dd></dl> 300 -</li> 301 -</ul> 302 -<a name="mappedCopy(org.eclipse.emf.ecore.EObject)"> 303 -<!-- --> 304 -</a><a name="mappedCopy(T)"> 305 -<!-- --> 306 -</a> 307 -<ul class="blockList"> 308 -<li class="blockList"> 309 -<h4>mappedCopy</h4> 310 -<pre>public <T extends org.eclipse.emf.ecore.EObject> T mappedCopy(T original)</pre> 311 -<div class="block">Creates direct mapping between two identical models. 312 - <p> 313 - Use for transformations based on copies. 314 - <p> 315 - Mapping will include given root elements.</div> 316 -<dl><dt><span class="strong">Parameters:</span></dt><dd><code>original</code> - model to copy</dd> 317 -<dt><span class="strong">Returns:</span></dt><dd>copy</dd></dl> 318 -</li> 319 -</ul> 320 -<a name="mappedParents(org.eclipse.emf.ecore.EObject)"> 321 -<!-- --> 322 -</a> 323 -<ul class="blockList"> 324 -<li class="blockList"> 325 -<h4>mappedParents</h4> 326 -<pre>public java.util.List<org.eclipse.emf.ecore.EObject> mappedParents(org.eclipse.emf.ecore.EObject child)</pre> 327 -<div class="block">Returns all Parents mapped to given child</div> 328 -<dl><dt><span class="strong">Returns:</span></dt><dd>List of parents for child</dd></dl> 329 -</li> 330 -</ul> 331 -<a name="unmap(org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.EObject)"> 332 -<!-- --> 333 -</a> 334 -<ul class="blockList"> 335 -<li class="blockList"> 336 -<h4>unmap</h4> 337 -<pre>public boolean unmap(org.eclipse.emf.ecore.EObject first, 338 - org.eclipse.emf.ecore.EObject second)</pre> 339 -<div class="block">Removes mapping between given objects. 340 - <p> 341 - Parent child order is arbitrary.</div> 342 -<dl><dt><span class="strong">Parameters:</span></dt><dd><code>first</code> - - parent or child object depending on chosen order</dd><dd><code>second</code> - - parent or child object depending on chosen order</dd> 343 -<dt><span class="strong">Returns:</span></dt><dd>true if the mapping changed</dd></dl> 344 -</li> 345 -</ul> 346 -<a name="unmapAll(org.eclipse.emf.ecore.EObject)"> 347 -<!-- --> 348 -</a> 349 -<ul class="blockListLast"> 350 -<li class="blockList"> 351 -<h4>unmapAll</h4> 352 -<pre>public boolean unmapAll(org.eclipse.emf.ecore.EObject obj)</pre> 353 -<div class="block">Removes all mappings for given objects. 354 - <p> 355 - Object can be parent or child</div> 356 -<dl><dt><span class="strong">Returns:</span></dt><dd>true if the mapping changed</dd></dl> 357 -</li> 358 -</ul> 359 -</li> 360 -</ul> 361 -</li> 362 -</ul> 363 -</div> 364 -</div> 365 -<!-- ========= END OF CLASS DATA ========= --> 366 -</body> 367 -</html> 368 -
- TransformationTreeExtensions.html
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.XWikiGuest - Size
-
... ... @@ -1,1 +1,0 @@ 1 -30.4 KB - Content
-
... ... @@ -1,479 +1,0 @@ 1 -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 2 -<!-- NewPage --> 3 -<html lang="de"> 4 -<head> 5 -<!-- Generated by javadoc (version 1.6.0_27) on Fri Jan 10 10:58:36 CET 2014 --> 6 -<title>TransformationTreeExtensions</title> 7 -<meta name="date" content="2014-01-10"> 8 -<link rel="stylesheet" type="text/css" href="https://guava-libraries.googlecode.com/git-history/release/javadoc-stylesheet.css" title="Style"> 9 -</head> 10 -<body> 11 -<!-- ======== START OF CLASS DATA ======== --> 12 -<div class="header"> 13 -<p class="subTitle">de.cau.cs.kieler.ktm.extensions</p> 14 -<h2 title="Class TransformationTreeExtensions" class="title">Class TransformationTreeExtensions</h2> 15 -</div> 16 -<div class="contentContainer"> 17 -<ul class="inheritance"> 18 -<li>java.lang.Object</li> 19 -<li> 20 -<ul class="inheritance"> 21 -<li>de.cau.cs.kieler.ktm.extensions.TransformationTreeExtensions</li> 22 -</ul> 23 -</li> 24 -</ul> 25 -<div class="description"> 26 -<ul class="blockList"> 27 -<li class="blockList"> 28 -<hr> 29 -<br> 30 -<pre>public class <strong>TransformationTreeExtensions</strong> 31 -extends java.lang.Object</pre> 32 -<div class="block">Extension for easier access and manipulation of TranformationTrees.</div> 33 -<dl><dt><span class="strong">Author:</span></dt> 34 - <dd>als</dd></dl> 35 -</li> 36 -</ul> 37 -</div> 38 -<div class="summary"> 39 -<ul class="blockList"> 40 -<li class="blockList"> 41 -<!-- ======== CONSTRUCTOR SUMMARY ======== --> 42 -<ul class="blockList"> 43 -<li class="blockList"><a name="constructor_summary"> 44 -<!-- --> 45 -</a> 46 -<h3>Constructor Summary</h3> 47 -<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> 48 -<caption><span>Constructors</span><span class="tabEnd"> </span></caption> 49 -<tr> 50 -<th class="colOne" scope="col">Constructor and Description</th> 51 -</tr> 52 -<tr class="altColor"> 53 -<td class="colOne"><code><strong><a href="../../../../../../de/cau/cs/kieler/ktm/extensions/TransformationTreeExtensions.html#TransformationTreeExtensions()">TransformationTreeExtensions</a></strong>()</code> </td> 54 -</tr> 55 -</table> 56 -</li> 57 -</ul> 58 -<!-- ========== METHOD SUMMARY =========== --> 59 -<ul class="blockList"> 60 -<li class="blockList"><a name="method_summary"> 61 -<!-- --> 62 -</a> 63 -<h3>Method Summary</h3> 64 -<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> 65 -<caption><span>Methods</span><span class="tabEnd"> </span></caption> 66 -<tr> 67 -<th class="colFirst" scope="col">Modifier and Type</th> 68 -<th class="colLast" scope="col">Method and Description</th> 69 -</tr> 70 -<tr class="altColor"> 71 -<td class="colFirst"><code>de.cau.cs.kieler.ktm.transformationtree.ModelWrapper</code></td> 72 -<td class="colLast"><code><strong><a href="../../../../../../de/cau/cs/kieler/ktm/extensions/TransformationTreeExtensions.html#addTransformationToTree(com.google.common.collect.ImmutableMultimap, de.cau.cs.kieler.ktm.transformationtree.ModelWrapper, java.lang.String, org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.EObject, java.lang.String)">addTransformationToTree</a></strong>(com.google.common.collect.ImmutableMultimap<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EObject> mapping, 73 - de.cau.cs.kieler.ktm.transformationtree.ModelWrapper modelNode, 74 - java.lang.String transformationID, 75 - org.eclipse.emf.ecore.EObject sourceModelRoot, 76 - org.eclipse.emf.ecore.EObject targetModelRoot, 77 - java.lang.String targetModelTypeID)</code> 78 -<div class="block">Appends transformation mapping information about source- and target-model to given tree.</div> 79 -</td> 80 -</tr> 81 -<tr class="rowColor"> 82 -<td class="colFirst"><code>java.util.List<de.cau.cs.kieler.ktm.transformationtree.EObjectWrapper></code></td> 83 -<td class="colLast"><code><strong><a href="../../../../../../de/cau/cs/kieler/ktm/extensions/TransformationTreeExtensions.html#children(de.cau.cs.kieler.ktm.transformationtree.EObjectWrapper, de.cau.cs.kieler.ktm.transformationtree.ModelTransformation)">children</a></strong>(de.cau.cs.kieler.ktm.transformationtree.EObjectWrapper element, 84 - de.cau.cs.kieler.ktm.transformationtree.ModelTransformation tranformation)</code> 85 -<div class="block">Returns all child objects in target model of given ModelTransformation associated with given element.</div> 86 -</td> 87 -</tr> 88 -<tr class="altColor"> 89 -<td class="colFirst"><code>java.util.List<de.cau.cs.kieler.ktm.transformationtree.ModelWrapper></code></td> 90 -<td class="colLast"><code><strong><a href="../../../../../../de/cau/cs/kieler/ktm/extensions/TransformationTreeExtensions.html#children(de.cau.cs.kieler.ktm.transformationtree.ModelWrapper)">children</a></strong>(de.cau.cs.kieler.ktm.transformationtree.ModelWrapper model)</code> 91 -<div class="block">Returns all child models of this node in tree, where given model is transformed into.</div> 92 -</td> 93 -</tr> 94 -<tr class="rowColor"> 95 -<td class="colFirst"><code>de.cau.cs.kieler.ktm.transformationtree.ModelWrapper</code></td> 96 -<td class="colLast"><code><strong><a href="../../../../../../de/cau/cs/kieler/ktm/extensions/TransformationTreeExtensions.html#findModelInTree(de.cau.cs.kieler.ktm.transformationtree.ModelWrapper, org.eclipse.emf.ecore.EObject, java.lang.String)">findModelInTree</a></strong>(de.cau.cs.kieler.ktm.transformationtree.ModelWrapper tree, 97 - org.eclipse.emf.ecore.EObject modelRoot, 98 - java.lang.String modelTypeID)</code> 99 -<div class="block">Searches given transformation tree for matching model-nodes for given model instance and typeID 100 - 101 - If tree is malformed and there are more than one fully matching model the first one is returned.</div> 102 -</td> 103 -</tr> 104 -<tr class="altColor"> 105 -<td class="colFirst"><code>de.cau.cs.kieler.ktm.transformationtree.ModelWrapper</code></td> 106 -<td class="colLast"><code><strong><a href="../../../../../../de/cau/cs/kieler/ktm/extensions/TransformationTreeExtensions.html#initializeTransformationTree(com.google.common.collect.ImmutableMultimap, java.lang.String, org.eclipse.emf.ecore.EObject, java.lang.String, org.eclipse.emf.ecore.EObject, java.lang.String)">initializeTransformationTree</a></strong>(com.google.common.collect.ImmutableMultimap<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EObject> mapping, 107 - java.lang.String transformationID, 108 - org.eclipse.emf.ecore.EObject sourceModelRoot, 109 - java.lang.String sourceModelTypeID, 110 - org.eclipse.emf.ecore.EObject targetModelRoot, 111 - java.lang.String targetModelTypeID)</code> 112 -<div class="block">Creates a new transformation tree containing given mapping as first transformation.</div> 113 -</td> 114 -</tr> 115 -<tr class="rowColor"> 116 -<td class="colFirst"><code>de.cau.cs.kieler.ktm.transformationtree.ModelWrapper</code></td> 117 -<td class="colLast"><code><strong><a href="../../../../../../de/cau/cs/kieler/ktm/extensions/TransformationTreeExtensions.html#makeTransient(de.cau.cs.kieler.ktm.transformationtree.ModelWrapper)">makeTransient</a></strong>(de.cau.cs.kieler.ktm.transformationtree.ModelWrapper modelNode)</code> 118 -<div class="block">Sets ModelWrapper's transient flag and removes references to concrete Objects in all elements of given model.</div> 119 -</td> 120 -</tr> 121 -<tr class="altColor"> 122 -<td class="colFirst"><code>java.util.Map<de.cau.cs.kieler.ktm.transformationtree.EObjectWrapper,org.eclipse.emf.ecore.EObject></code></td> 123 -<td class="colLast"><code><strong><a href="../../../../../../de/cau/cs/kieler/ktm/extensions/TransformationTreeExtensions.html#objectMapping(de.cau.cs.kieler.ktm.transformationtree.ModelWrapper, org.eclipse.emf.ecore.EObject)">objectMapping</a></strong>(de.cau.cs.kieler.ktm.transformationtree.ModelWrapper modelNode, 124 - org.eclipse.emf.ecore.EObject model)</code> 125 -<div class="block">Returns a mapping from Elements of a model in tree to a model instance.</div> 126 -</td> 127 -</tr> 128 -<tr class="rowColor"> 129 -<td class="colFirst"><code>de.cau.cs.kieler.ktm.transformationtree.ModelWrapper</code></td> 130 -<td class="colLast"><code><strong><a href="../../../../../../de/cau/cs/kieler/ktm/extensions/TransformationTreeExtensions.html#parent(de.cau.cs.kieler.ktm.transformationtree.ModelWrapper)">parent</a></strong>(de.cau.cs.kieler.ktm.transformationtree.ModelWrapper model)</code> 131 -<div class="block">Returns source model-node in tree, where given model is transformed from.</div> 132 -</td> 133 -</tr> 134 -<tr class="altColor"> 135 -<td class="colFirst"><code>java.util.List<de.cau.cs.kieler.ktm.transformationtree.EObjectWrapper></code></td> 136 -<td class="colLast"><code><strong><a href="../../../../../../de/cau/cs/kieler/ktm/extensions/TransformationTreeExtensions.html#parents(de.cau.cs.kieler.ktm.transformationtree.EObjectWrapper, de.cau.cs.kieler.ktm.transformationtree.ModelTransformation)">parents</a></strong>(de.cau.cs.kieler.ktm.transformationtree.EObjectWrapper element, 137 - de.cau.cs.kieler.ktm.transformationtree.ModelTransformation tranformation)</code> 138 -<div class="block">Returns all parent objects in source model of given ModelTransformation associated with given element.</div> 139 -</td> 140 -</tr> 141 -<tr class="rowColor"> 142 -<td class="colFirst"><code>de.cau.cs.kieler.ktm.transformationtree.ModelWrapper</code></td> 143 -<td class="colLast"><code><strong><a href="../../../../../../de/cau/cs/kieler/ktm/extensions/TransformationTreeExtensions.html#removeModelFromTree(de.cau.cs.kieler.ktm.transformationtree.ModelWrapper)">removeModelFromTree</a></strong>(de.cau.cs.kieler.ktm.transformationtree.ModelWrapper modelNode)</code> 144 -<div class="block">Removes given model from tree including all succeeding Models and EObjectWrapper-Mappings 145 - 146 - Returns parent in tree 147 - 148 - Returns null tree does not contain given model or model has no root</div> 149 -</td> 150 -</tr> 151 -<tr class="altColor"> 152 -<td class="colFirst"><code>com.google.common.collect.Multimap<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EObject></code></td> 153 -<td class="colLast"><code><strong><a href="../../../../../../de/cau/cs/kieler/ktm/extensions/TransformationTreeExtensions.html#resolveMapping(de.cau.cs.kieler.ktm.transformationtree.ModelWrapper, org.eclipse.emf.ecore.EObject, de.cau.cs.kieler.ktm.transformationtree.ModelWrapper, org.eclipse.emf.ecore.EObject)">resolveMapping</a></strong>(de.cau.cs.kieler.ktm.transformationtree.ModelWrapper sourceModelNode, 154 - org.eclipse.emf.ecore.EObject sourceModel, 155 - de.cau.cs.kieler.ktm.transformationtree.ModelWrapper targetModelNode, 156 - org.eclipse.emf.ecore.EObject targetModel)</code> 157 -<div class="block">Resolves a mapping between all elements of source and target model instances by their nodes in transformation tree.</div> 158 -</td> 159 -</tr> 160 -<tr class="rowColor"> 161 -<td class="colFirst"><code>de.cau.cs.kieler.ktm.transformationtree.ModelWrapper</code></td> 162 -<td class="colLast"><code><strong><a href="../../../../../../de/cau/cs/kieler/ktm/extensions/TransformationTreeExtensions.html#root(de.cau.cs.kieler.ktm.transformationtree.ModelWrapper)">root</a></strong>(de.cau.cs.kieler.ktm.transformationtree.ModelWrapper model)</code> 163 -<div class="block">Returns root model-node of tree.</div> 164 -</td> 165 -</tr> 166 -<tr class="altColor"> 167 -<td class="colFirst"><code>java.util.List<de.cau.cs.kieler.ktm.transformationtree.ModelWrapper></code></td> 168 -<td class="colLast"><code><strong><a href="../../../../../../de/cau/cs/kieler/ktm/extensions/TransformationTreeExtensions.html#succeedingModels(de.cau.cs.kieler.ktm.transformationtree.ModelWrapper)">succeedingModels</a></strong>(de.cau.cs.kieler.ktm.transformationtree.ModelWrapper model)</code> 169 -<div class="block">Returns all succeeding models for given model.</div> 170 -</td> 171 -</tr> 172 -<tr class="rowColor"> 173 -<td class="colFirst"><code>java.util.List<de.cau.cs.kieler.ktm.transformationtree.ModelTransformation></code></td> 174 -<td class="colLast"><code><strong><a href="../../../../../../de/cau/cs/kieler/ktm/extensions/TransformationTreeExtensions.html#succeedingTransformations(de.cau.cs.kieler.ktm.transformationtree.ModelWrapper)">succeedingTransformations</a></strong>(de.cau.cs.kieler.ktm.transformationtree.ModelWrapper model)</code> 175 -<div class="block">Returns all succeeding ModelTransformations for given model-node.</div> 176 -</td> 177 -</tr> 178 -</table> 179 -<ul class="blockList"> 180 -<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object"> 181 -<!-- --> 182 -</a> 183 -<h3>Methods inherited from class java.lang.Object</h3> 184 -<code>equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li> 185 -</ul> 186 -</li> 187 -</ul> 188 -</li> 189 -</ul> 190 -</div> 191 -<div class="details"> 192 -<ul class="blockList"> 193 -<li class="blockList"> 194 -<!-- ========= CONSTRUCTOR DETAIL ======== --> 195 -<ul class="blockList"> 196 -<li class="blockList"><a name="constructor_detail"> 197 -<!-- --> 198 -</a> 199 -<h3>Constructor Detail</h3> 200 -<a name="TransformationTreeExtensions()"> 201 -<!-- --> 202 -</a> 203 -<ul class="blockListLast"> 204 -<li class="blockList"> 205 -<h4>TransformationTreeExtensions</h4> 206 -<pre>public TransformationTreeExtensions()</pre> 207 -</li> 208 -</ul> 209 -</li> 210 -</ul> 211 -<!-- ============ METHOD DETAIL ========== --> 212 -<ul class="blockList"> 213 -<li class="blockList"><a name="method_detail"> 214 -<!-- --> 215 -</a> 216 -<h3>Method Detail</h3> 217 -<a name="addTransformationToTree(com.google.common.collect.ImmutableMultimap, de.cau.cs.kieler.ktm.transformationtree.ModelWrapper, java.lang.String, org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.EObject, java.lang.String)"> 218 -<!-- --> 219 -</a> 220 -<ul class="blockList"> 221 -<li class="blockList"> 222 -<h4>addTransformationToTree</h4> 223 -<pre>public de.cau.cs.kieler.ktm.transformationtree.ModelWrapper addTransformationToTree(com.google.common.collect.ImmutableMultimap<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EObject> mapping, 224 - de.cau.cs.kieler.ktm.transformationtree.ModelWrapper modelNode, 225 - java.lang.String transformationID, 226 - org.eclipse.emf.ecore.EObject sourceModelRoot, 227 - org.eclipse.emf.ecore.EObject targetModelRoot, 228 - java.lang.String targetModelTypeID)</pre> 229 -<div class="block">Appends transformation mapping information about source- and target-model to given tree. 230 - <p> 231 - If this is the first transformation use 232 - <a href="../../../../../../de/cau/cs/kieler/ktm/extensions/TransformationTreeExtensions.html#initializeTransformationTree(com.google.common.collect.ImmutableMultimap, java.lang.String, org.eclipse.emf.ecore.EObject, java.lang.String, org.eclipse.emf.ecore.EObject, java.lang.String)"><code>initializeTransformationTree</code></a>. 233 - <p> 234 - New transformation will be appended to modelNode representing source model. 235 - <p> 236 - Transformations CANNOT appended to transient models! 237 - <p> 238 - Completeness of mapping will not be checked. 239 - Only objects from mapping are created as Elements of Models in TransformationTree. 240 - If previous transformation mapping of source model was incomplete and current mapping contains 241 - information about missing objects in source model additional Elements of source model model in 242 - transformation tree will be created. 243 - If mapping is incomplete (model contains unmapped elements) later resolved mapping my be incomplete. 244 - If mapping contains entries for objects not contained in given model instances they will omitted. 245 - <p> 246 - <p> 247 - Returns new leaf in tree as ModelWrapper representing target model. 248 - <p> 249 - Return null if sourceModel is not modelNode or model is transient.</div> 250 -<dl><dt><span class="strong">Parameters:</span></dt><dd><code>mapping</code> - object mapping data</dd><dd><code>modelNode</code> - node in tree to append transformation, representing source model</dd><dd><code>transformationID</code> - a unique identifier for initial transformation</dd><dd><code>sourceModelRoot</code> - root element of source model instance</dd><dd><code>targetModelRoot</code> - root element of target model instance</dd><dd><code>targetModelTypeID</code> - unique identifier for this kind of model and its applied transformation</dd> 251 -<dt><span class="strong">Returns:</span></dt><dd>newly created leaf in tree or null</dd> 252 -<dt><span class="strong">Throws:</span></dt> 253 -<dd><code>java.lang.NullPointerException</code> - if any argument is null.</dd></dl> 254 -</li> 255 -</ul> 256 -<a name="children(de.cau.cs.kieler.ktm.transformationtree.EObjectWrapper, de.cau.cs.kieler.ktm.transformationtree.ModelTransformation)"> 257 -<!-- --> 258 -</a> 259 -<ul class="blockList"> 260 -<li class="blockList"> 261 -<h4>children</h4> 262 -<pre>public java.util.List<de.cau.cs.kieler.ktm.transformationtree.EObjectWrapper> children(de.cau.cs.kieler.ktm.transformationtree.EObjectWrapper element, 263 - de.cau.cs.kieler.ktm.transformationtree.ModelTransformation tranformation)</pre> 264 -<div class="block">Returns all child objects in target model of given ModelTransformation associated with given element. 265 - <p> 266 - If source model of given ModelTransformation does not contain given element returned list is empty.</div> 267 -<dl><dt><span class="strong">Parameters:</span></dt><dd><code>element</code> - element of a model in transformation tree.</dd><dd><code>tranformation</code> - model transformation to resolve parent relation.</dd> 268 -<dt><span class="strong">Returns:</span></dt><dd>List of child elements.</dd></dl> 269 -</li> 270 -</ul> 271 -<a name="children(de.cau.cs.kieler.ktm.transformationtree.ModelWrapper)"> 272 -<!-- --> 273 -</a> 274 -<ul class="blockList"> 275 -<li class="blockList"> 276 -<h4>children</h4> 277 -<pre>public java.util.List<de.cau.cs.kieler.ktm.transformationtree.ModelWrapper> children(de.cau.cs.kieler.ktm.transformationtree.ModelWrapper model)</pre> 278 -<div class="block">Returns all child models of this node in tree, where given model is transformed into.</div> 279 -<dl><dt><span class="strong">Parameters:</span></dt><dd><code>model</code> - model in tree</dd> 280 -<dt><span class="strong">Returns:</span></dt><dd>child models</dd></dl> 281 -</li> 282 -</ul> 283 -<a name="findModelInTree(de.cau.cs.kieler.ktm.transformationtree.ModelWrapper, org.eclipse.emf.ecore.EObject, java.lang.String)"> 284 -<!-- --> 285 -</a> 286 -<ul class="blockList"> 287 -<li class="blockList"> 288 -<h4>findModelInTree</h4> 289 -<pre>public de.cau.cs.kieler.ktm.transformationtree.ModelWrapper findModelInTree(de.cau.cs.kieler.ktm.transformationtree.ModelWrapper tree, 290 - org.eclipse.emf.ecore.EObject modelRoot, 291 - java.lang.String modelTypeID)</pre> 292 -<div class="block">Searches given transformation tree for matching model-nodes for given model instance and typeID 293 - <p> 294 - If tree is malformed and there are more than one fully matching model the first one is returned. 295 - <p> 296 - Returns null if no model is found or can not be identified because it is transient.</div> 297 -<dl><dt><span class="strong">Parameters:</span></dt><dd><code>tree</code> - root model of tree</dd><dd><code>modelRoot</code> - root element of a model instance to search for.</dd><dd><code>modelTypeID</code> - unique identifier for searched kind of models.</dd> 298 -<dt><span class="strong">Returns:</span></dt><dd>Pair with matching modelNode in tree and map of model matching or null.</dd></dl> 299 -</li> 300 -</ul> 301 -<a name="initializeTransformationTree(com.google.common.collect.ImmutableMultimap, java.lang.String, org.eclipse.emf.ecore.EObject, java.lang.String, org.eclipse.emf.ecore.EObject, java.lang.String)"> 302 -<!-- --> 303 -</a> 304 -<ul class="blockList"> 305 -<li class="blockList"> 306 -<h4>initializeTransformationTree</h4> 307 -<pre>public de.cau.cs.kieler.ktm.transformationtree.ModelWrapper initializeTransformationTree(com.google.common.collect.ImmutableMultimap<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EObject> mapping, 308 - java.lang.String transformationID, 309 - org.eclipse.emf.ecore.EObject sourceModelRoot, 310 - java.lang.String sourceModelTypeID, 311 - org.eclipse.emf.ecore.EObject targetModelRoot, 312 - java.lang.String targetModelTypeID)</pre> 313 -<div class="block">Creates a new transformation tree containing given mapping as first transformation. 314 - <p> 315 - Completeness of mapping will not be checked. 316 - Only objects from mapping are created as Elements of Models in TransformationTree. 317 - If mapping is incomplete (model contains unmapped elements) later resolved mapping my be incomplete. 318 - If mapping contains entries for objects not contained in given model instances they will omitted. 319 - <p> 320 - Returns leaf of new tree as ModelWrapper representing target model.</div> 321 -<dl><dt><span class="strong">Parameters:</span></dt><dd><code>mapping</code> - object mapping data</dd><dd><code>transformationID</code> - a unique identifier for initial transformation</dd><dd><code>sourceModelRoot</code> - root element of source model instance</dd><dd><code>sourceModelTypeID</code> - unique identifier for this kind of model</dd><dd><code>targetModelRoot</code> - root element of target model instance</dd><dd><code>targetModelTypeID</code> - unique identifier for this kind of model and its applied transformation</dd> 322 -<dt><span class="strong">Returns:</span></dt><dd>leaf of new tree</dd> 323 -<dt><span class="strong">Throws:</span></dt> 324 -<dd><code>java.lang.NullPointerException</code> - if any argument is null.</dd></dl> 325 -</li> 326 -</ul> 327 -<a name="makeTransient(de.cau.cs.kieler.ktm.transformationtree.ModelWrapper)"> 328 -<!-- --> 329 -</a> 330 -<ul class="blockList"> 331 -<li class="blockList"> 332 -<h4>makeTransient</h4> 333 -<pre>public de.cau.cs.kieler.ktm.transformationtree.ModelWrapper makeTransient(de.cau.cs.kieler.ktm.transformationtree.ModelWrapper modelNode)</pre> 334 -<div class="block">Sets ModelWrapper's transient flag and removes references to concrete Objects in all elements of given model. 335 - <p> 336 - Transient model can't be source model of any new transformation and has no association to it's concrete model. 337 - <p> 338 - This will improve scalability because transient models will not be kept in memory or persistent. 339 - <p> 340 - Can't be reverted.</div> 341 -<dl><dt><span class="strong">Parameters:</span></dt><dd><code>modelNode</code> - model to convert</dd> 342 -<dt><span class="strong">Returns:</span></dt><dd>modelNode itself</dd></dl> 343 -</li> 344 -</ul> 345 -<a name="objectMapping(de.cau.cs.kieler.ktm.transformationtree.ModelWrapper, org.eclipse.emf.ecore.EObject)"> 346 -<!-- --> 347 -</a> 348 -<ul class="blockList"> 349 -<li class="blockList"> 350 -<h4>objectMapping</h4> 351 -<pre>public java.util.Map<de.cau.cs.kieler.ktm.transformationtree.EObjectWrapper,org.eclipse.emf.ecore.EObject> objectMapping(de.cau.cs.kieler.ktm.transformationtree.ModelWrapper modelNode, 352 - org.eclipse.emf.ecore.EObject model)</pre> 353 -<div class="block">Returns a mapping from Elements of a model in tree to a model instance. 354 - <p> 355 - ReferencedObjects of Elements in ModelWrapper in transformation tree are only copies of their origin instances. 356 - Returned mapping provides relations between Elements and their represented objects in given model instance. 357 - <p> 358 - Return null if any argument is null or model and model of modelNode does not match. 359 - If transformation tree was created on incomplete mappings returned mapping may be incomplete.</div> 360 -<dl><dt><span class="strong">Parameters:</span></dt><dd><code>modelNode</code> - node in tree which models elements shall be mapped</dd><dd><code>model</code> - root element of a model instance to map to</dd></dl> 361 -</li> 362 -</ul> 363 -<a name="parent(de.cau.cs.kieler.ktm.transformationtree.ModelWrapper)"> 364 -<!-- --> 365 -</a> 366 -<ul class="blockList"> 367 -<li class="blockList"> 368 -<h4>parent</h4> 369 -<pre>public de.cau.cs.kieler.ktm.transformationtree.ModelWrapper parent(de.cau.cs.kieler.ktm.transformationtree.ModelWrapper model)</pre> 370 -<div class="block">Returns source model-node in tree, where given model is transformed from. 371 - <p> 372 - If model is root-node, returns null.</div> 373 -<dl><dt><span class="strong">Parameters:</span></dt><dd><code>model</code> - model in tree</dd> 374 -<dt><span class="strong">Returns:</span></dt><dd>parent model or null</dd></dl> 375 -</li> 376 -</ul> 377 -<a name="parents(de.cau.cs.kieler.ktm.transformationtree.EObjectWrapper, de.cau.cs.kieler.ktm.transformationtree.ModelTransformation)"> 378 -<!-- --> 379 -</a> 380 -<ul class="blockList"> 381 -<li class="blockList"> 382 -<h4>parents</h4> 383 -<pre>public java.util.List<de.cau.cs.kieler.ktm.transformationtree.EObjectWrapper> parents(de.cau.cs.kieler.ktm.transformationtree.EObjectWrapper element, 384 - de.cau.cs.kieler.ktm.transformationtree.ModelTransformation tranformation)</pre> 385 -<div class="block">Returns all parent objects in source model of given ModelTransformation associated with given element. 386 - <p> 387 - If target model of given ModelTransformation does not contain given element returned list is empty.</div> 388 -<dl><dt><span class="strong">Parameters:</span></dt><dd><code>element</code> - element of a model in transformation tree.</dd><dd><code>tranformation</code> - model transformation to resolve parent relation.</dd> 389 -<dt><span class="strong">Returns:</span></dt><dd>List of parent elements.</dd></dl> 390 -</li> 391 -</ul> 392 -<a name="removeModelFromTree(de.cau.cs.kieler.ktm.transformationtree.ModelWrapper)"> 393 -<!-- --> 394 -</a> 395 -<ul class="blockList"> 396 -<li class="blockList"> 397 -<h4>removeModelFromTree</h4> 398 -<pre>public de.cau.cs.kieler.ktm.transformationtree.ModelWrapper removeModelFromTree(de.cau.cs.kieler.ktm.transformationtree.ModelWrapper modelNode)</pre> 399 -<div class="block">Removes given model from tree including all succeeding Models and EObjectWrapper-Mappings 400 - <p> 401 - Returns parent in tree 402 - <p> 403 - Returns null tree does not contain given model or model has no root</div> 404 -<dl><dt><span class="strong">Parameters:</span></dt><dd><code>modelNode</code> - node in tree to remove</dd> 405 -<dt><span class="strong">Returns:</span></dt><dd>parent node or null</dd></dl> 406 -</li> 407 -</ul> 408 -<a name="resolveMapping(de.cau.cs.kieler.ktm.transformationtree.ModelWrapper, org.eclipse.emf.ecore.EObject, de.cau.cs.kieler.ktm.transformationtree.ModelWrapper, org.eclipse.emf.ecore.EObject)"> 409 -<!-- --> 410 -</a> 411 -<ul class="blockList"> 412 -<li class="blockList"> 413 -<h4>resolveMapping</h4> 414 -<pre>public com.google.common.collect.Multimap<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EObject> resolveMapping(de.cau.cs.kieler.ktm.transformationtree.ModelWrapper sourceModelNode, 415 - org.eclipse.emf.ecore.EObject sourceModel, 416 - de.cau.cs.kieler.ktm.transformationtree.ModelWrapper targetModelNode, 417 - org.eclipse.emf.ecore.EObject targetModel)</pre> 418 -<div class="block">Resolves a mapping between all elements of source and target model instances by their nodes in transformation tree. 419 - <p> 420 - Returns a multi-mapping from elements of source model to target model elements. 421 - Mapping is created by resolving all transformations on a path from source to target. 422 - Source and target can be arbitrary model in tree, so path can be bottom up, top down or leaf to leaf. 423 - <p> 424 - Returns null if source or target model do not match to their models in tree or if they are not in the same tree. 425 - If transformation tree was created on incomplete mappings returned mapping may be incomplete.</div> 426 -<dl><dt><span class="strong">Parameters:</span></dt><dd><code>sourceModelNode</code> - model in transformation tree representing sourceModel model</dd><dd><code>sourceModel</code> - root element of a source model instance</dd><dd><code>targetModelNode</code> - model in transformation tree representing targetModel model</dd><dd><code>targetModel</code> - root element of a target model instance</dd> 427 -<dt><span class="strong">Returns:</span></dt><dd>multi-mapping from source model objects to target model objects or null</dd></dl> 428 -</li> 429 -</ul> 430 -<a name="root(de.cau.cs.kieler.ktm.transformationtree.ModelWrapper)"> 431 -<!-- --> 432 -</a> 433 -<ul class="blockList"> 434 -<li class="blockList"> 435 -<h4>root</h4> 436 -<pre>public de.cau.cs.kieler.ktm.transformationtree.ModelWrapper root(de.cau.cs.kieler.ktm.transformationtree.ModelWrapper model)</pre> 437 -<div class="block">Returns root model-node of tree.</div> 438 -<dl><dt><span class="strong">Parameters:</span></dt><dd><code>model</code> - any model-node in tree</dd> 439 -<dt><span class="strong">Returns:</span></dt><dd>root model-node.</dd></dl> 440 -</li> 441 -</ul> 442 -<a name="succeedingModels(de.cau.cs.kieler.ktm.transformationtree.ModelWrapper)"> 443 -<!-- --> 444 -</a> 445 -<ul class="blockList"> 446 -<li class="blockList"> 447 -<h4>succeedingModels</h4> 448 -<pre>public java.util.List<de.cau.cs.kieler.ktm.transformationtree.ModelWrapper> succeedingModels(de.cau.cs.kieler.ktm.transformationtree.ModelWrapper model)</pre> 449 -<div class="block">Returns all succeeding models for given model. 450 - <p> 451 - BFS will be performed on sub tree.</div> 452 -<dl><dt><span class="strong">Parameters:</span></dt><dd><code>model</code> - model in tree</dd> 453 -<dt><span class="strong">Returns:</span></dt><dd>list of succeeding models.</dd></dl> 454 -</li> 455 -</ul> 456 -<a name="succeedingTransformations(de.cau.cs.kieler.ktm.transformationtree.ModelWrapper)"> 457 -<!-- --> 458 -</a> 459 -<ul class="blockListLast"> 460 -<li class="blockList"> 461 -<h4>succeedingTransformations</h4> 462 -<pre>public java.util.List<de.cau.cs.kieler.ktm.transformationtree.ModelTransformation> succeedingTransformations(de.cau.cs.kieler.ktm.transformationtree.ModelWrapper model)</pre> 463 -<div class="block">Returns all succeeding ModelTransformations for given model-node. 464 - <p> 465 - BFS will be performed on sub tree.</div> 466 -<dl><dt><span class="strong">Parameters:</span></dt><dd><code>model</code> - model in tree</dd> 467 -<dt><span class="strong">Returns:</span></dt><dd>list of succeeding ModelTransformation.</dd></dl> 468 -</li> 469 -</ul> 470 -</li> 471 -</ul> 472 -</li> 473 -</ul> 474 -</div> 475 -</div> 476 -<!-- ========= END OF CLASS DATA ========= --> 477 -</body> 478 -</html> 479 -
- abstract_example_tree.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.XWikiGuest - Size
-
... ... @@ -1,1 +1,0 @@ 1 -40.2 KB - Content
- als-ktm-splitTriggerEffect-detail.jpg
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.XWikiGuest - Size
-
... ... @@ -1,1 +1,0 @@ 1 -11.4 KB - Content
- als-ktmt-metamodel.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.XWikiGuest - Size
-
... ... @@ -1,1 +1,0 @@ 1 -78.2 KB - Content
- example_abo.jpeg
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.XWikiGuest - Size
-
... ... @@ -1,1 +1,0 @@ 1 -71.7 KB - Content
- example_abo_norm.jpeg
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.XWikiGuest - Size
-
... ... @@ -1,1 +1,0 @@ 1 -50.8 KB - Content
- example_abo_resolved.jpeg
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.XWikiGuest - Size
-
... ... @@ -1,1 +1,0 @@ 1 -188.5 KB - Content
- example_abo_resolved_elements.jpeg
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.XWikiGuest - Size
-
... ... @@ -1,1 +1,0 @@ 1 -157.8 KB - Content
- example_abo_scg.jpeg
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.XWikiGuest - Size
-
... ... @@ -1,1 +1,0 @@ 1 -48.3 KB - Content
- example_abo_splitTE.jpeg
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.XWikiGuest - Size
-
... ... @@ -1,1 +1,0 @@ 1 -55.7 KB - Content
- example_tree.jpeg
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.XWikiGuest - Size
-
... ... @@ -1,1 +1,0 @@ 1 -24.4 KB - Content
- example_tree_transformation.jpeg
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.XWikiGuest - Size
-
... ... @@ -1,1 +1,0 @@ 1 -1.0 MB - Content
- Confluence.Code.ConfluencePageClass[0]
-
- Id
-
... ... @@ -1,1 +1,1 @@ 1 -8651 4451 +8651533 - URL
-
... ... @@ -1,1 +1,1 @@ 1 -https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/8651 445/Transformation Mapping (KTM)1 +https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/8651533/Transformation Mapping (KTM)
- XWiki.XWikiComments[0]
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.ima - Comment
-
... ... @@ -1,1 +1,0 @@ 1 -Freue mich schon... - Date
-
... ... @@ -1,1 +1,0 @@ 1 -2013-12-16 13:54:56.0