Merge Operations
Merge operations merge several metamodel elements of the same type into a single element, whereas split operations split a metamodel element into several elements of the same type.
Merge Reference into Another
In the metamodel, a reference is deleted. In the model, the values of this reference are merged to a compatible reference.
Parameters:
- toMerge: The reference that is deleted
- mergeTo: The reference to which the values are merged
Constraints:
- The references must be different from each other
- The reference to merge to must be multi-valued
- The reference to merge to must be available in the context class
- The types of the references must be compatible
Partition Reference
In the metamodel, a reference is partitioned into a number of references according to its type. A sub reference is created for each subclass of the reference's type. Finally, the original reference is deleted. In the model, the value of the reference is partitioned accordingly.
Parameters:
- reference: The reference to be partitioned
Constraints:
- The reference must be multi-valued
- The type of the reference must be abstract
Replace Class
In the metamodel, a class is deleted. In the model, instances of this class are migrated to another class based on a mapping of features.
Parameters:
- toReplace: The class to be replaced
- replaceBy: The class by which it is replaced
- featuresToReplace: The features to be replaced
- featuresReplaceBy: The features by which they are replaced (in the same order)
Constraints:
- The replaced and replacing features have to be of the same size
- The replace features must be defined in the replaced class
- The replacing features must be defined in the replacing class
- The replace features must cover all features from the difference between the class to replace and the class by which it is replaced
- The class to be replaced must not have sub types
Replace Enumeration
In the metamodel, an enumeration is replaced by another one. More specifically, the enumeration is deleted and the other enumeration used instead. In the model, the values of this enumeration are replaced based on a mapping of literals.
Parameters:
- toReplace: The enumeration to be replaced
- replaceBy: The enumeration by which it is replaced
- literalsToReplace: The literals to be replaced
- literalsReplaceBy: The literals by which they are replaced (in the same order)
Constraints:
- The replacing literals must belong to the replacing enumeration
- The replacing and replaced literals must be of the same size
- The replaced literals must belong to the replaced enumeration
Replace Literal
In the metamodel, an enum literal is removed and replaced by another one. In the model, the enum's values are replaced accordingly.
Parameters:
- toReplace: The enum literal to replace
- replaceBy: The enum literal by which it is replaced
Constraints:
- The enum literal by which it is replace must belong to the same enum.
Split String Attribute
In the metamodel, a new String-typed attribute is created. In the model, the value of another String-typed attribute is split among the two attributes by means of a regular expression.
Parameters:
- toSplit: The feature whose values are split
- context: The class in which the new feature is created
- attributeName: The name of the new attribute
- pattern: The regular expression
Constraints:
- The class with the new attribute must be a subclass of the class with the attribute to be split
- The type of the attribute to split has to be String
Unite References
In the metamodel, a number of references are united into a single reference which obtains their common super type as type. In the model, their values have to be moved accordingly.
Parameters:
- references: The references which are united
- unitedReferenceName: The name of the single reference which unites all the references
Constraints:
- The references have to belong to the same class
- The references must be all either cross or containment references