|
|
@@ -19,6 +19,8 @@ String function pretty_print(model : Element):
|
|
|
Element attr_keys
|
|
|
String attr_key
|
|
|
String result
|
|
|
+ Element lst
|
|
|
+ String assoc
|
|
|
|
|
|
result = ""
|
|
|
keys_m = dict_keys(model["model"])
|
|
|
@@ -34,7 +36,24 @@ String function pretty_print(model : Element):
|
|
|
result = result + (((" " + reverseKeyLookup(model["model"], read_edge_src(model["model"][v_m]))) + " --> ") + reverseKeyLookup(model["model"], read_edge_dst(model["model"][v_m])))
|
|
|
result = result + "\n"
|
|
|
|
|
|
+ // Print all incoming associations
|
|
|
+ result = result + " Incoming associations:\n"
|
|
|
+ lst = allIncomingAssociationInstances(model, v_m, "")
|
|
|
+ while (set_len(lst) > 0):
|
|
|
+ assoc = set_pop(lst)
|
|
|
+ if (read_type(model["metamodel"], read_type(model, assoc)) == "Association"):
|
|
|
+ result = result + " " + readAssociationSource(model, assoc) + " ---(" + assoc + ")--> \n"
|
|
|
+
|
|
|
+ // Print all outgoing associations
|
|
|
+ result = result + " Outgoing associations:\n"
|
|
|
+ lst = allOutgoingAssociationInstances(model, v_m, "")
|
|
|
+ while (set_len(lst) > 0):
|
|
|
+ assoc = set_pop(lst)
|
|
|
+ if (read_type(model["metamodel"], read_type(model, assoc)) == "Association"):
|
|
|
+ result = result + " ---(" + assoc + ")--> " + readAssociationDestination(model, assoc) + "\n"
|
|
|
+
|
|
|
// Defines attributes
|
|
|
+ result = result + " Defines attributes:\n"
|
|
|
attr_list = getInstantiatableAttributes(model, v_m)
|
|
|
attr_keys = dict_keys(attr_list)
|
|
|
while (set_len(attr_keys) > 0):
|
|
|
@@ -43,6 +62,7 @@ String function pretty_print(model : Element):
|
|
|
result = result + "\n"
|
|
|
|
|
|
// Has attributes
|
|
|
+ result = result + " Has attributes:\n"
|
|
|
attr_list = getAttributeList(model, v_m)
|
|
|
attr_keys = dict_keys(attr_list)
|
|
|
while (set_len(attr_keys) > 0):
|