Keep all ontology domains in menu
This commit is contained in:
@@ -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) {
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user