|
@@ -437,22 +437,17 @@ Void function model_overwrite(model : Element, model_id : String):
|
|
|
String location
|
|
|
String instanceOf_link
|
|
|
|
|
|
- log("Phase 1")
|
|
|
location = "models/" + cast_id2s(model)
|
|
|
- log("Export location content: " + cast_e2s(import_node(location)))
|
|
|
export_node(location, model["model"])
|
|
|
|
|
|
// Change location in meta-data
|
|
|
- log("Phase 2")
|
|
|
unset_attribute(core, model_id, "location")
|
|
|
instantiate_attribute(core, model_id, "location", location)
|
|
|
|
|
|
- log("Phase 3")
|
|
|
instanceOf_link = get_instanceOf_link(model_id)
|
|
|
unset_attribute(core, instanceOf_link, "type_mapping")
|
|
|
instantiate_attribute(core, instanceOf_link, "type_mapping", model["type_mapping"])
|
|
|
|
|
|
- log("Phase 4")
|
|
|
return!
|
|
|
|
|
|
Boolean function check_is_typed_by(model_id : String, metamodel_id : String):
|
|
@@ -515,7 +510,6 @@ Element function execute_operation(operation_id : String, input_models : Element
|
|
|
Boolean tracability
|
|
|
|
|
|
// 1) Find merged metamodel
|
|
|
- log("Find merged")
|
|
|
|
|
|
exact_type = read_type(core, operation_id)
|
|
|
|
|
@@ -541,7 +535,6 @@ Element function execute_operation(operation_id : String, input_models : Element
|
|
|
|
|
|
if (merged_metamodel_id != ""):
|
|
|
// 2) Merge source models
|
|
|
- log("Merge source")
|
|
|
|
|
|
model_tuples = create_node()
|
|
|
while (read_nr_out(input_models) > 0):
|
|
@@ -553,10 +546,6 @@ Element function execute_operation(operation_id : String, input_models : Element
|
|
|
merged_model = model_join(model_tuples, get_full_model(merged_metamodel_id), read_root())
|
|
|
|
|
|
// 3) Transform
|
|
|
- log("Transform")
|
|
|
- log("Source model: " + pretty_print(merged_model))
|
|
|
- log("Types of merged: " + set_to_string(dict_keys(merged_model["metamodel"]["model"])))
|
|
|
- log("operation: " + pretty_print(get_full_model(operation_id)))
|
|
|
|
|
|
if (exact_type == "ModelTransformation"):
|
|
|
result = transform(merged_model, get_full_model(operation_id))
|
|
@@ -572,7 +561,6 @@ Element function execute_operation(operation_id : String, input_models : Element
|
|
|
log("ERROR")
|
|
|
|
|
|
// 4) Split in different models depending on type
|
|
|
- log("Split")
|
|
|
|
|
|
if (element_neq(tracability_model, read_root())):
|
|
|
tracability = True
|
|
@@ -590,7 +578,6 @@ Element function execute_operation(operation_id : String, input_models : Element
|
|
|
result = model_split(merged_model, model_tuples, tracability)
|
|
|
|
|
|
if (tracability):
|
|
|
- log("Trace")
|
|
|
Element new_tracability_model
|
|
|
new_tracability_model = result["__tracability"]
|
|
|
dict_overwrite(tracability_model, "model", new_tracability_model["model"])
|
|
@@ -598,7 +585,6 @@ Element function execute_operation(operation_id : String, input_models : Element
|
|
|
dict_overwrite(tracability_model, "metamodel", new_tracability_model["metamodel"])
|
|
|
dict_delete(result, "__tracability")
|
|
|
|
|
|
- log("Done")
|
|
|
return result!
|
|
|
else:
|
|
|
return read_root()!
|