|
@@ -169,3 +169,15 @@ String function readAssociationSource(model : Element, name : String):
|
|
|
|
|
|
String function readAssociationDestination(model : Element, name : String):
|
|
|
return reverseKeyLookup(model["model"], read_edge_dst(model["model"][name]))
|
|
|
+
|
|
|
+String function followAssociation(model : Element, element_name : String, association_name : String):
|
|
|
+ Element assocs
|
|
|
+ String assoc
|
|
|
+ Element result
|
|
|
+
|
|
|
+ assocs = allOutgoingAssociationInstances(model, element_name, association_name)
|
|
|
+ result = create_node()
|
|
|
+ while (0 < list_len(assocs)):
|
|
|
+ set_add(result, readAssociationDestination(model, set_pop(assocs)))
|
|
|
+
|
|
|
+ return result
|