|
@@ -26,18 +26,20 @@ Element function selectPossibleIncoming(model : Element, target : String, limit_
|
|
|
// Should also include those specified on the superclass(es)
|
|
|
|
|
|
String type
|
|
|
- Element metamodel
|
|
|
+ Element metamodel_dict
|
|
|
Element elem
|
|
|
Element result
|
|
|
+ Element target_element
|
|
|
|
|
|
result = create_node()
|
|
|
- metamodel = model["metamodel"]
|
|
|
+ metamodel_dict = model["metamodel"]["model"]
|
|
|
+ target_element = model["model"][target]
|
|
|
|
|
|
while (0 < list_len(limit_set)):
|
|
|
type = set_pop(limit_set)
|
|
|
- elem = metamodel["model"][type]
|
|
|
+ elem = metamodel_dict[type]
|
|
|
if (is_edge(elem)):
|
|
|
- if (is_nominal_instance(model, model["model"][target], read_edge_dst(elem))):
|
|
|
+ if (is_nominal_instance(model, target_element, read_edge_dst(elem))):
|
|
|
set_add(result, type)
|
|
|
|
|
|
return result
|
|
@@ -46,18 +48,20 @@ Element function selectPossibleOutgoing(model : Element, source : String, limit_
|
|
|
// Find all possible outgoing link types for the source model
|
|
|
// Should also include those specified on the superclass(es)
|
|
|
String type
|
|
|
- Element metamodel
|
|
|
+ Element metamodel_dict
|
|
|
Element elem
|
|
|
Element result
|
|
|
+ Element source_element
|
|
|
|
|
|
result = create_node()
|
|
|
- metamodel = model["metamodel"]
|
|
|
+ metamodel_dict = model["metamodel"]["model"]
|
|
|
+ source_element = model["model"][source]
|
|
|
|
|
|
while (0 < list_len(limit_set)):
|
|
|
type = set_pop(limit_set)
|
|
|
- elem = metamodel["model"][type]
|
|
|
+ elem = metamodel_dict[type]
|
|
|
if (is_edge(elem)):
|
|
|
- if (is_nominal_instance(model, model["model"][source], read_edge_src(elem))):
|
|
|
+ if (is_nominal_instance(model, source_element, read_edge_src(elem))):
|
|
|
set_add(result, type)
|
|
|
|
|
|
return result
|