@Override public void visit(final OWLObjectIntersectionOf desc) { final Set<Node> inputNodes = desc.operands().map(this::evaluate).collect(Collectors.toSet()); _node = _graph.createOrNode(inputNodes); }
@Override public void visit(final OWLObjectIntersectionOf desc) { final Set<Node> inputNodes = desc.operands().map(this::evaluate).collect(Collectors.toSet()); _node = _graph.createOrNode(inputNodes); }
@Override public void visit(final OWLObjectUnionOf desc) { final Set<Node> inputNodes = desc.operands().map(this::evaluate).collect(Collectors.toSet()); _node = _graph.createOrNode(inputNodes); }
@Override public void visit(final OWLObjectUnionOf desc) { final Set<Node> inputNodes = desc.operands().map(this::evaluate).collect(Collectors.toSet()); _node = _graph.createOrNode(inputNodes); }
protected void processEquivalent(final OWLAxiom axiom, final OWLClassExpression c1, final OWLClassExpression c2) { final Set<Node> nodes1 = new HashSet<>(); nodes1.add(_topEvaluator.evaluate(c1)); nodes1.add(_topEvaluator.evaluate(c2)); final Set<Node> nodes2 = new HashSet<>(); nodes2.add(_bottomEvaluator.evaluate(c1)); nodes2.add(_bottomEvaluator.evaluate(c2)); final Node or1 = _graph.createOrNode(nodes1); final Node or2 = _graph.createOrNode(nodes2); final Node result = _graph.createAndNode(SetUtils.create(or1, or2)); addOutputs(result, axiom); }
protected void processEquivalent(final OWLAxiom axiom, final OWLClassExpression c1, final OWLClassExpression c2) { final Set<Node> nodes1 = new HashSet<>(); nodes1.add(_topEvaluator.evaluate(c1)); nodes1.add(_topEvaluator.evaluate(c2)); final Set<Node> nodes2 = new HashSet<>(); nodes2.add(_bottomEvaluator.evaluate(c1)); nodes2.add(_bottomEvaluator.evaluate(c2)); final Node or1 = _graph.createOrNode(nodes1); final Node or2 = _graph.createOrNode(nodes2); final Node result = _graph.createAndNode(SetUtils.create(or1, or2)); addOutputs(result, axiom); }
protected void processDisjoints(final OWLAxiom axiom, final Stream<OWLClassExpression> desc) { final OWLClassExpression descriptions[] = desc.toArray(OWLClassExpression[]::new); final Set<Node> or = new HashSet<>(); for (int i = 0; i < descriptions.length - 1; i++) for (int j = i; j < descriptions.length; j++) { final Node n1 = _bottomEvaluator.evaluate(descriptions[i]); final Node n2 = _bottomEvaluator.evaluate(descriptions[j]); or.add(_graph.createAndNode(SetUtils.create(n1, n2))); } if (!or.isEmpty()) if (or.size() == 1) addOutputs(or.iterator().next(), axiom); else addOutputs(_graph.createOrNode(or), axiom); }
protected void processDisjoints(final OWLAxiom axiom, final Stream<OWLClassExpression> desc) { final OWLClassExpression descriptions[] = desc.toArray(OWLClassExpression[]::new); final Set<Node> or = new HashSet<>(); for (int i = 0; i < descriptions.length - 1; i++) for (int j = i; j < descriptions.length; j++) { final Node n1 = _bottomEvaluator.evaluate(descriptions[i]); final Node n2 = _bottomEvaluator.evaluate(descriptions[j]); or.add(_graph.createAndNode(SetUtils.create(n1, n2))); } if (!or.isEmpty()) if (or.size() == 1) addOutputs(or.iterator().next(), axiom); else addOutputs(_graph.createOrNode(or), axiom); }