de.cau.cs.kieler.ktm.extensions
public class TransformationTreeExtensions extends java.lang.Object
Constructor and Description |
---|
TransformationTreeExtensions() |
Modifier and Type | Method and Description |
---|---|
de.cau.cs.kieler.ktm.transformationtree.Model |
addTransformationToTree(com.google.common.collect.ImmutableMultimap<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EObject> mapping,
de.cau.cs.kieler.ktm.transformationtree.Model modelNode,
java.lang.String transformationID,
org.eclipse.emf.ecore.EObject sourceModelRoot,
org.eclipse.emf.ecore.EObject targetModelRoot,
java.lang.String targetModelName)
Appends transformation mapping information about source- and target-model to given tree.
|
java.util.List<de.cau.cs.kieler.ktm.transformationtree.Element> |
children(de.cau.cs.kieler.ktm.transformationtree.Element element,
java.util.List<de.cau.cs.kieler.ktm.transformationtree.ModelTransformation> tranformationPath)
Returns all child elements in target model at tail of transformation path associated with given element.
|
java.util.List<de.cau.cs.kieler.ktm.transformationtree.Element> |
children(de.cau.cs.kieler.ktm.transformationtree.Element element,
de.cau.cs.kieler.ktm.transformationtree.ModelTransformation tranformation)
Returns all child elements in target model of transformation associated with given element.
|
java.util.List<de.cau.cs.kieler.ktm.transformationtree.Model> |
children(de.cau.cs.kieler.ktm.transformationtree.Model model)
Returns all child models of this node in tree, where given model is transformed into.
|
de.cau.cs.kieler.ktm.transformationtree.Model |
findModelInTree(de.cau.cs.kieler.ktm.transformationtree.Model tree,
org.eclipse.emf.ecore.EObject modelRoot)
Searches given transformation tree for matching modelNode to given model represented by it's root element.
|
java.util.List<de.cau.cs.kieler.ktm.transformationtree.ModelTransformation> |
getTransformationPath(de.cau.cs.kieler.ktm.transformationtree.Model source,
de.cau.cs.kieler.ktm.transformationtree.Model destination)
Returns a path from source model to destination model
|
de.cau.cs.kieler.ktm.transformationtree.Model |
initializeTransformationTree(com.google.common.collect.ImmutableMultimap<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EObject> mapping,
java.lang.String transformationID,
org.eclipse.emf.ecore.EObject sourceModelRoot,
java.lang.String sourceModelName,
org.eclipse.emf.ecore.EObject targetModelRoot,
java.lang.String targetModelName)
Creates a new transformation tree containing given mapping as first transformation.
|
de.cau.cs.kieler.ktm.transformationtree.Model |
makeTransient(de.cau.cs.kieler.ktm.transformationtree.Model modelNode)
Sets Model's transient flag and removes references to concrete Objects in all elements of given model.
|
de.cau.cs.kieler.ktm.transformationtree.Model |
parent(de.cau.cs.kieler.ktm.transformationtree.Model model)
Returns parent model in tree, where given model was transformed from.
|
java.util.List<de.cau.cs.kieler.ktm.transformationtree.Element> |
parents(de.cau.cs.kieler.ktm.transformationtree.Element element,
java.util.List<de.cau.cs.kieler.ktm.transformationtree.ModelTransformation> tranformationPath)
Returns all parent elements in source model at head of transformation path associated with given element.
|
java.util.List<de.cau.cs.kieler.ktm.transformationtree.Element> |
parents(de.cau.cs.kieler.ktm.transformationtree.Element element,
de.cau.cs.kieler.ktm.transformationtree.ModelTransformation tranformation)
Returns all parent elements in source model of transformation associated with given element.
|
de.cau.cs.kieler.ktm.transformationtree.Model |
removeModelFromTree(de.cau.cs.kieler.ktm.transformationtree.Model modelNode)
Removes given model from tree including all succeeding Models and Element-Mappings
Returns parent in tree as Model
Returns null tree does not contain given model or model has no root
|
de.cau.cs.kieler.ktm.transformationtree.Model |
root(de.cau.cs.kieler.ktm.transformationtree.Model model)
Returns root model of tree.
|
java.util.List<de.cau.cs.kieler.ktm.transformationtree.ModelTransformation> |
succeedingTransformations(de.cau.cs.kieler.ktm.transformationtree.Model model)
Returns all succeeding ModelTransformations for given model.
|
public de.cau.cs.kieler.ktm.transformationtree.Model addTransformationToTree(com.google.common.collect.ImmutableMultimap<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EObject> mapping, de.cau.cs.kieler.ktm.transformationtree.Model modelNode, java.lang.String transformationID, org.eclipse.emf.ecore.EObject sourceModelRoot, org.eclipse.emf.ecore.EObject targetModelRoot, java.lang.String targetModelName)
initializeTransformationTree
.
New transformation will be appended to modelNode representing source model.
Transformations CANNOT appended to transient models!
Returns new leaf in tree as Model representing target model.
Return null if sourceModel is not modelNode or model is transient.mapping
- object mapping datamodelNode
- node in tree to append transformation, representing source modeltransformationID
- a unique identifier for initial transformationsourceModelRoot
- root element of source modeltargetModelRoot
- root element of target modeltargetModelName
- display name of target modelMappingException
- indicated inconsistent mappings. Appears when Objects in source are mapped to target object but do not exist in source model.public java.util.List<de.cau.cs.kieler.ktm.transformationtree.Element> children(de.cau.cs.kieler.ktm.transformationtree.Element element, java.util.List<de.cau.cs.kieler.ktm.transformationtree.ModelTransformation> tranformationPath)
tranformationPath
- list of model transformations from source model to target model.public java.util.List<de.cau.cs.kieler.ktm.transformationtree.Element> children(de.cau.cs.kieler.ktm.transformationtree.Element element, de.cau.cs.kieler.ktm.transformationtree.ModelTransformation tranformation)
public java.util.List<de.cau.cs.kieler.ktm.transformationtree.Model> children(de.cau.cs.kieler.ktm.transformationtree.Model model)
public de.cau.cs.kieler.ktm.transformationtree.Model findModelInTree(de.cau.cs.kieler.ktm.transformationtree.Model tree, org.eclipse.emf.ecore.EObject modelRoot)
public java.util.List<de.cau.cs.kieler.ktm.transformationtree.ModelTransformation> getTransformationPath(de.cau.cs.kieler.ktm.transformationtree.Model source, de.cau.cs.kieler.ktm.transformationtree.Model destination)
public de.cau.cs.kieler.ktm.transformationtree.Model initializeTransformationTree(com.google.common.collect.ImmutableMultimap<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EObject> mapping, java.lang.String transformationID, org.eclipse.emf.ecore.EObject sourceModelRoot, java.lang.String sourceModelName, org.eclipse.emf.ecore.EObject targetModelRoot, java.lang.String targetModelName)
mapping
- object mapping datatransformationID
- a unique identifier for initial transformationsourceModelRoot
- root element of source modelsourceModelName
- display name of source modeltargetModelRoot
- root element of target modeltargetModelName
- display name of target modelpublic de.cau.cs.kieler.ktm.transformationtree.Model makeTransient(de.cau.cs.kieler.ktm.transformationtree.Model modelNode)
modelNode
- model to convertpublic de.cau.cs.kieler.ktm.transformationtree.Model parent(de.cau.cs.kieler.ktm.transformationtree.Model model)
public java.util.List<de.cau.cs.kieler.ktm.transformationtree.Element> parents(de.cau.cs.kieler.ktm.transformationtree.Element element, java.util.List<de.cau.cs.kieler.ktm.transformationtree.ModelTransformation> tranformationPath)
tranformationPath
- list of model transformations from source model to target model.public java.util.List<de.cau.cs.kieler.ktm.transformationtree.Element> parents(de.cau.cs.kieler.ktm.transformationtree.Element element, de.cau.cs.kieler.ktm.transformationtree.ModelTransformation tranformation)
public de.cau.cs.kieler.ktm.transformationtree.Model removeModelFromTree(de.cau.cs.kieler.ktm.transformationtree.Model modelNode)
modelNode
- node in tree to removepublic de.cau.cs.kieler.ktm.transformationtree.Model root(de.cau.cs.kieler.ktm.transformationtree.Model model)
public java.util.List<de.cau.cs.kieler.ktm.transformationtree.ModelTransformation> succeedingTransformations(de.cau.cs.kieler.ktm.transformationtree.Model model)