private void buildChildren(Set<OWLAxiom> axioms) { List<Set<OWLAxiom>> axiomChildren = new ArrayList<Set<OWLAxiom>>(); for (OWLAxiom ax : axioms) { Set<OWLAxiom> children = build(ax); for (OWLAxiom childAx : children) { index(ax, map, childAx); } axiomChildren.add(children); } for (Set<OWLAxiom> children : axiomChildren) { buildChildren(children); } }
public JustificationMap(OWLClassExpression desc, Set<OWLAxiom> axioms) { this.axioms = axioms; this.desc = desc; this.rootAxioms = new HashSet<OWLAxiom>(); map = new HashMap<OWLAxiom, Set<OWLAxiom>>(); usedAxioms = new HashSet<OWLAxiom>(); axiomsByRHS = new HashMap<OWLEntity, Set<OWLAxiom>>(); axiomsByLHS = new HashMap<OWLEntity, Set<OWLAxiom>>(); createMap(); }
private void buildChildren(OWLClassExpression seed) { // Return the axioms that have the entity on the LHS List<OWLAxiom> result = asList(seed.signature().flatMap(this::getAxiomsByLHS)); usedAxioms.addAll(result); rootAxioms.addAll(result); buildChildren(result); }
private void buildChildren(Collection<OWLAxiom> axiomSet) { List<Set<OWLAxiom>> axiomChildren = new ArrayList<>(); for (OWLAxiom ax : axiomSet) { Set<OWLAxiom> children = build(ax); children.forEach(a -> map.put(a, ax)); axiomChildren.add(children); } axiomChildren.forEach(this::buildChildren); }
private void buildChildren(OWLClassExpression seed) { // Return the axioms that have the entity on the LHS OWLEntityCollector collector = new OWLEntityCollector(); seed.accept(collector); Set<OWLAxiom> result = new HashSet<OWLAxiom>(); for (OWLEntity ent : collector.getObjects()) { Set<OWLAxiom> axs = getAxiomsByLHS(ent); for (OWLAxiom ax : axs) { result.add(ax); usedAxioms.add(ax); } } rootAxioms.addAll(result); buildChildren(result); }
private void createMap() { for (OWLAxiom ax : axioms) { OWLAxiomPartExtractor extractor = new OWLAxiomPartExtractor(); ax.accept(extractor); OWLEntityCollector rhsCollector = new OWLEntityCollector(); for (OWLObject rhsObject : extractor.getRHS()) { rhsObject.accept(rhsCollector); } for (OWLEntity rhsEntity : rhsCollector.getObjects()) { index(rhsEntity, axiomsByRHS, ax); } OWLEntityCollector lhsCollector = new OWLEntityCollector(); for (OWLObject lhsObject : extractor.getLHS()) { lhsObject.accept(lhsCollector); } for (OWLEntity lhsEntity : lhsCollector.getObjects()) { index(lhsEntity, axiomsByLHS, ax); } } buildChildren(desc); }
private Set<OWLAxiom> build(OWLAxiom parentAxiom) { usedAxioms.add(parentAxiom); OWLAxiomPartExtractor extractor = new OWLAxiomPartExtractor(); parentAxiom.accept(extractor); Set<OWLAxiom> result = new HashSet<OWLAxiom>(); for (OWLObject obj : extractor.getRHS()) { OWLEntityCollector collector = new OWLEntityCollector(); obj.accept(collector); for (OWLEntity ent : collector.getObjects()) { Set<OWLAxiom> axs = getAxiomsByLHS(ent); for (OWLAxiom ax : axs) { if (!usedAxioms.contains(ax)) { result.add(ax); usedAxioms.add(ax); } } } } return result; }
private void buildChildren(OWLClassExpression seed) { // Return the axioms that have the entity on the LHS List<OWLAxiom> result = asList(seed.signature().flatMap(this::getAxiomsByLHS)); usedAxioms.addAll(result); rootAxioms.addAll(result); buildChildren(result); }
private void buildChildren(Collection<OWLAxiom> axiomSet) { List<Set<OWLAxiom>> axiomChildren = new ArrayList<>(); for (OWLAxiom ax : axiomSet) { Set<OWLAxiom> children = build(ax); children.forEach(a -> map.put(a, ax)); axiomChildren.add(children); } axiomChildren.forEach(this::buildChildren); }
private void buildChildren(OWLClassExpression seed) { // Return the axioms that have the entity on the LHS List<OWLAxiom> result = asList(seed.signature().flatMap(this::getAxiomsByLHS)); usedAxioms.addAll(result); rootAxioms.addAll(result); buildChildren(result); }
/** * Instantiates a new justification map. * * @param desc the class expression * @param axioms the axioms */ public JustificationMap(OWLClassExpression desc, Set<OWLAxiom> axioms) { this.axioms = checkNotNull(axioms, "axioms cannot be null"); this.desc = checkNotNull(desc, "desc cannot be null"); createMap(); }
private void buildChildren(Collection<OWLAxiom> axiomSet) { List<Set<OWLAxiom>> axiomChildren = new ArrayList<>(); for (OWLAxiom ax : axiomSet) { Set<OWLAxiom> children = build(ax); children.forEach(a -> map.put(a, ax)); axiomChildren.add(children); } axiomChildren.forEach(this::buildChildren); }
private void buildChildren(OWLClassExpression seed) { // Return the axioms that have the entity on the LHS List<OWLAxiom> result = asList(seed.signature().flatMap(this::getAxiomsByLHS)); usedAxioms.addAll(result); rootAxioms.addAll(result); buildChildren(result); }
/** * Instantiates a new justification map. * * @param desc the class expression * @param axioms the axioms */ public JustificationMap(OWLClassExpression desc, Set<OWLAxiom> axioms) { this.axioms = checkNotNull(axioms, "axioms cannot be null"); this.desc = checkNotNull(desc, "desc cannot be null"); createMap(); }
private void buildChildren(Collection<OWLAxiom> axiomSet) { List<Set<OWLAxiom>> axiomChildren = new ArrayList<>(); for (OWLAxiom ax : axiomSet) { Set<OWLAxiom> children = build(ax); children.forEach(a -> map.put(a, ax)); axiomChildren.add(children); } axiomChildren.forEach(this::buildChildren); }
private void createMap() { for (OWLAxiom ax : axioms) { OWLAxiomPartExtractor extractor = new OWLAxiomPartExtractor(); ax.accept(extractor); Set<OWLEntity> lhscollected = new HashSet<>(); OWLEntityCollector lhsCollector = new OWLEntityCollector(lhscollected); extractor.getLHS().forEach(l -> l.accept(lhsCollector)); lhscollected.forEach(l -> axiomsByLHS.put(l, ax)); } buildChildren(desc); }
/** * Instantiates a new justification map. * * @param desc the class expression * @param axioms the axioms */ public JustificationMap(OWLClassExpression desc, Set<OWLAxiom> axioms) { this.axioms = checkNotNull(axioms, "axioms cannot be null"); this.desc = checkNotNull(desc, "desc cannot be null"); createMap(); }
private void createMap() { for (OWLAxiom ax : axioms) { OWLAxiomPartExtractor extractor = new OWLAxiomPartExtractor(); ax.accept(extractor); Set<OWLEntity> lhscollected = new HashSet<>(); OWLEntityCollector lhsCollector = new OWLEntityCollector(lhscollected); extractor.getLHS().forEach(l -> l.accept(lhsCollector)); lhscollected.forEach(l -> axiomsByLHS.put(l, ax)); } buildChildren(desc); }
/** * Instantiates a new justification map. * * @param desc the class expression * @param axioms the axioms */ public JustificationMap(OWLClassExpression desc, Set<OWLAxiom> axioms) { this.axioms = checkNotNull(axioms, "axioms cannot be null"); this.desc = checkNotNull(desc, "desc cannot be null"); createMap(); }
private void createMap() { for (OWLAxiom ax : axioms) { OWLAxiomPartExtractor extractor = new OWLAxiomPartExtractor(); ax.accept(extractor); Set<OWLEntity> lhscollected = new HashSet<>(); OWLEntityCollector lhsCollector = new OWLEntityCollector(lhscollected); extractor.getLHS().forEach(l -> l.accept(lhsCollector)); lhscollected.forEach(l -> axiomsByLHS.put(l, ax)); } buildChildren(desc); }