private void insertChildren(@Nullable OWLEntity entity, ExplanationTree tree) { if (entity == null) { return; } Set<OWLAxiom> currentPath = new HashSet<>(tree.getUserObjectPathToRoot()); getAxioms(entity).filter(ax -> !passTypes.contains(ax.getAxiomType())).forEach(ax -> { Set<OWLAxiom> mapped = getIndexedSet(entity, mappedAxioms, true); if (!consumedAxioms.contains(ax) && !mapped.contains(ax) && !currentPath.contains(ax)) { mapped.add(ax); consumedAxioms.add(ax); ExplanationTree child = new ExplanationTree(ax); tree.addChild(child); getRHSEntitiesSorted(ax).forEach(ent -> insertChildren(ent, child)); } }); sortChildrenAxioms(tree); }
private void insertChildren(@Nullable OWLEntity entity, ExplanationTree tree) { if (entity == null) { return; } Set<OWLAxiom> currentPath = new HashSet<>(tree.getUserObjectPathToRoot()); getAxioms(entity).filter(ax -> !passTypes.contains(ax.getAxiomType())).forEach(ax -> { Set<OWLAxiom> mapped = getIndexedSet(entity, mappedAxioms, true); if (!consumedAxioms.contains(ax) && !mapped.contains(ax) && !currentPath.contains(ax)) { mapped.add(ax); consumedAxioms.add(ax); ExplanationTree child = new ExplanationTree(ax); tree.addChild(child); getRHSEntitiesSorted(ax).forEach(ent -> insertChildren(ent, child)); } }); sortChildrenAxioms(tree); }
private void insertChildren(@Nullable OWLEntity entity, ExplanationTree tree) { if (entity == null) { return; } Set<OWLAxiom> currentPath = new HashSet<>(tree.getUserObjectPathToRoot()); getAxioms(entity).filter(ax -> !passTypes.contains(ax.getAxiomType())).forEach(ax -> { Set<OWLAxiom> mapped = getIndexedSet(entity, mappedAxioms, true); if (!consumedAxioms.contains(ax) && !mapped.contains(ax) && !currentPath.contains(ax)) { mapped.add(ax); consumedAxioms.add(ax); ExplanationTree child = new ExplanationTree(ax); tree.addChild(child); getRHSEntitiesSorted(ax).forEach(ent -> insertChildren(ent, child)); } }); sortChildrenAxioms(tree); }
private void insertChildren(@Nullable OWLEntity entity, ExplanationTree tree) { if (entity == null) { return; } Set<OWLAxiom> currentPath = new HashSet<>(tree.getUserObjectPathToRoot()); getAxioms(entity).filter(ax -> !passTypes.contains(ax.getAxiomType())).forEach(ax -> { Set<OWLAxiom> mapped = getIndexedSet(entity, mappedAxioms, true); if (!consumedAxioms.contains(ax) && !mapped.contains(ax) && !currentPath.contains(ax)) { mapped.add(ax); consumedAxioms.add(ax); ExplanationTree child = new ExplanationTree(ax); tree.addChild(child); getRHSEntitiesSorted(ax).forEach(ent -> insertChildren(ent, child)); } }); sortChildrenAxioms(tree); }