Alle Check Logiken Implementiert
This commit is contained in:
@@ -196,6 +196,25 @@ class TOSGroupsConfig(JsonBasedConfig):
|
||||
for cId in childIds:
|
||||
self.get_children_keys(tos_hierarchy, cId, result)
|
||||
|
||||
def get_Id2TosGroup(self):
|
||||
"hole alle ids zur jeweiligen Gruppe"
|
||||
# lazy. nur einmal laden, wenn noch nicht geschehen
|
||||
if not self.tos_hierarchy:
|
||||
self.tos_hierarchy = super().load_json_from_file()
|
||||
tos_hierarchy = self.tos_hierarchy
|
||||
|
||||
num2refId = dict()
|
||||
num2child = dict()
|
||||
allkwds = self.get_all_keywords()
|
||||
for kw in allkwds.keys():
|
||||
refids = tos_hierarchy[kw]["reference-ids"]
|
||||
for cId in refids.keys():
|
||||
num2refId[cId] = refids[cId]
|
||||
children = tos_hierarchy[kw]["children"]
|
||||
for cId in children.keys():
|
||||
num2child[cId] = children[cId]
|
||||
return (num2refId, num2child)
|
||||
|
||||
def get_all_keywords(self):
|
||||
"""hole alle TOS Keywords, welche in der config Datei definiert sind"""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user