private static Bool checkDisjointPropertyClash(final CachedNode root1, final CachedNode root2) { final MultiValueMap<ATermAppl, Role> neighbors1 = collectNeighbors(root1); if (neighbors1.isEmpty()) return null; final MultiValueMap<ATermAppl, Role> neighbors2 = collectNeighbors(root2); if (neighbors2.isEmpty()) return null; for (final Entry<ATermAppl, Set<Role>> e : neighbors1.entrySet()) { final ATermAppl commonNeighbor = e.getKey(); final Set<Role> roles1 = e.getValue(); final Set<Role> roles2 = neighbors2.get(commonNeighbor); if (roles2 == null) continue; if (checkDisjointProperties(roles1, roles2)) return Bool.UNKNOWN; } return null; }
private static Bool checkDisjointPropertyClash(final CachedNode root1, final CachedNode root2) { final MultiValueMap<ATermAppl, Role> neighbors1 = collectNeighbors(root1); if (neighbors1.isEmpty()) return null; final MultiValueMap<ATermAppl, Role> neighbors2 = collectNeighbors(root2); if (neighbors2.isEmpty()) return null; for (final Entry<ATermAppl, Set<Role>> e : neighbors1.entrySet()) { final ATermAppl commonNeighbor = e.getKey(); final Set<Role> roles1 = e.getValue(); final Set<Role> roles2 = neighbors2.get(commonNeighbor); if (roles2 == null) continue; if (checkDisjointProperties(roles1, roles2)) return Bool.UNKNOWN; } return null; }
/** * {@inheritDoc} */ @Override public Set<OWLAxiom> extractModule(final Set<? extends OWLEntity> signature) { if (isChanged()) resetModules(); final Set<OWLEntity> module = new HashSet<>(signature); axioms()// .filter(axiom -> !isLocal(axiom, Collections.<OWLEntity> emptySet())) // .forEach(axiom -> module.addAll(axiom.signature().collect(Collectors.toList()))); if (!_entityAxioms.isEmpty()) if (_optimizeForSharedModules) extractModuleSignature(null, new HashSet<OWLEntity>(), new ArrayList<OWLEntity>(), module); else extractModuleSignature(null, new DisjointSet<OWLEntity>(), new ArrayList<OWLEntity>(), module); return getModuleAxioms(module); }
/** * {@inheritDoc} */ @Override public Set<OWLAxiom> extractModule(final Set<? extends OWLEntity> signature) { if (isChanged()) resetModules(); final Set<OWLEntity> module = new HashSet<>(signature); axioms()// .filter(axiom -> !isLocal(axiom, Collections.<OWLEntity> emptySet())) // .forEach(axiom -> module.addAll(axiom.signature().collect(Collectors.toList()))); if (!_entityAxioms.isEmpty()) if (_optimizeForSharedModules) extractModuleSignature(null, new HashSet<OWLEntity>(), new ArrayList<OWLEntity>(), module); else extractModuleSignature(null, new DisjointSet<OWLEntity>(), new ArrayList<OWLEntity>(), module); return getModuleAxioms(module); }