Keep all ontology domains in menu

This commit is contained in:
2026-06-23 22:47:17 +02:00
parent 28a34905c7
commit 60646cebf6
3 changed files with 33 additions and 28 deletions

View File

@@ -12,21 +12,20 @@ export async function traverseOntology(jsonPath) {
const ontology = await loadOntology(jsonPath);
const modules = ontology.modules;
let tree = [];
const domains = [];
for (const module of modules) {
if (module.id === 'Architecture') {
console.debug(module.classTrees);
for (const classTree of module.classTrees) {
traverseClasses(classTree, tree);
}
let tree = [];
for (const classTree of module.classTrees) {
traverseClasses(classTree, tree);
}
domains.push({
id: module.id,
tree
});
}
return {
ontology: "Architecture",
domains: tree
};
return domains;
}
/**
@@ -52,7 +51,6 @@ function traverseClasses(ontologyClass, tree, depth = 1) {
);
}
}
}
/**