/** * @param signature the signature to use * @param moduletype the module type * @return a set of axioms that corresponds to the atom with the id INDEX */ public Set<OWLAxiom> getNonLocal(Stream<OWLEntity> signature, ModuleType moduletype) { // init signature Signature sig = new Signature(signature); sig.setLocality(false); // do check modularizer.getLocalityChecker().setSignatureValue(sig); Set<OWLAxiom> result = new HashSet<>(); for (AxiomWrapper p : axioms) { if (!modularizer.getLocalityChecker().local(p.getAxiom())) { result.add(p.getAxiom()); } } return result; }
/** * @param signature the signature to use * @param moduletype the module type * @return a set of axioms that corresponds to the atom with the id INDEX */ public Set<OWLAxiom> getNonLocal(Stream<OWLEntity> signature, ModuleType moduletype) { // init signature Signature sig = new Signature(signature); sig.setLocality(false); // do check modularizer.getLocalityChecker().setSignatureValue(sig); Set<OWLAxiom> result = new HashSet<>(); for (AxiomWrapper p : axioms) { if (!modularizer.getLocalityChecker().local(p.getAxiom())) { result.add(p.getAxiom()); } } return result; }
/** * @param signature the signature to use * @param moduletype the module type * @return a set of axioms that corresponds to the atom with the id INDEX */ public Set<OWLAxiom> getNonLocal(Stream<OWLEntity> signature, ModuleType moduletype) { // init signature Signature sig = new Signature(signature); sig.setLocality(false); // do check modularizer.getLocalityChecker().setSignatureValue(sig); Set<OWLAxiom> result = new HashSet<>(); for (AxiomWrapper p : axioms) { if (!modularizer.getLocalityChecker().local(p.getAxiom())) { result.add(p.getAxiom()); } } return result; }
/** * @param signature the signature to use * @param moduletype the module type * @return a set of axioms that corresponds to the atom with the id INDEX */ public Set<OWLAxiom> getNonLocal(Stream<OWLEntity> signature, ModuleType moduletype) { // init signature Signature sig = new Signature(signature); sig.setLocality(false); // do check modularizer.getLocalityChecker().setSignatureValue(sig); Set<OWLAxiom> result = new HashSet<>(); for (AxiomWrapper p : axioms) { if (!modularizer.getLocalityChecker().local(p.getAxiom())) { result.add(p.getAxiom()); } } return result; }
/** * @param signature * signature * @param useSemantic * useSemantic * @param type * type * @param r * reasoner * @return a set of axioms that corresponds to the atom with the id INDEX */ @PortedFrom(file = "Kernel.h", name = "getNonLocal") public Set<AxiomWrapper> getNonLocal(List<Expression> signature, boolean useSemantic, ModuleType type, OWLReasoner r) { // init signature Signature sig = new Signature(); sig.setLocality(type == ModuleType.TOP); signature.stream().filter(p -> p instanceof NamedEntity).map(p -> ((NamedEntity) p).getEntity()).forEach( sig::add); // do check LocalityChecker lc = getModExtractor(useSemantic, r).getModularizer().getLocalityChecker(); lc.setSignatureValue(sig); result.clear(); add(result, getOntology().getAxioms().stream().filter(p -> !lc.local(p.getAxiom()))); return result; }
LocalityChecker lc = getModExtractor(false, null).getModularizer().getLocalityChecker(); for (Map.Entry<OWLEntity, Signature> p : name2Sig.entrySet()) { lc.setSignatureValue(p.getValue());