/** * @param sig signature * @param parent parent atom * @return module for given axiom AX; use parent atom's module as a base for the module search */ private Optional<OntologyAtom> buildModule(Signature sig, OntologyAtom parent) { // build a module for a given signature modularizer.extract(parent.getModule(), sig, type); Collection<AxiomWrapper> module = modularizer.getModule(); // if module is empty (empty bottom atom) -- do nothing if (module.isEmpty()) { return Optional.empty(); } // check if the module corresponds to a PARENT one; modules are the same // iff their sizes are the same if (parent != rootAtom && module.size() == parent.getModule().size()) { return Optional.of(parent); } // create new atom with that module assert atomList != null; OntologyAtom atom = atomList.newAtom(); atom.setModule(module); return Optional.of(atom); }
/** * @param sig signature * @param parent parent atom * @return module for given axiom AX; use parent atom's module as a base for the module search */ private Optional<OntologyAtom> buildModule(Signature sig, OntologyAtom parent) { // build a module for a given signature modularizer.extract(parent.getModule(), sig, type); Collection<AxiomWrapper> module = modularizer.getModule(); // if module is empty (empty bottom atom) -- do nothing if (module.isEmpty()) { return Optional.empty(); } // check if the module corresponds to a PARENT one; modules are the same // iff their sizes are the same if (parent != rootAtom && module.size() == parent.getModule().size()) { return Optional.of(parent); } // create new atom with that module assert atomList != null; OntologyAtom atom = atomList.newAtom(); atom.setModule(module); return Optional.of(atom); }
/** * @param sig signature * @param parent parent atom * @return module for given axiom AX; use parent atom's module as a base for the module search */ private Optional<OntologyAtom> buildModule(Signature sig, OntologyAtom parent) { // build a module for a given signature modularizer.extract(parent.getModule(), sig, type); Collection<AxiomWrapper> module = modularizer.getModule(); // if module is empty (empty bottom atom) -- do nothing if (module.isEmpty()) { return Optional.empty(); } // check if the module corresponds to a PARENT one; modules are the same // iff their sizes are the same if (parent != rootAtom && module.size() == parent.getModule().size()) { return Optional.of(parent); } // create new atom with that module assert atomList != null; OntologyAtom atom = atomList.newAtom(); atom.setModule(module); return Optional.of(atom); }
/** * @param sig signature * @param parent parent atom * @return module for given axiom AX; use parent atom's module as a base for the module search */ private Optional<OntologyAtom> buildModule(Signature sig, OntologyAtom parent) { // build a module for a given signature modularizer.extract(parent.getModule(), sig, type); Collection<AxiomWrapper> module = modularizer.getModule(); // if module is empty (empty bottom atom) -- do nothing if (module.isEmpty()) { return Optional.empty(); } // check if the module corresponds to a PARENT one; modules are the same // iff their sizes are the same if (parent != rootAtom && module.size() == parent.getModule().size()) { return Optional.of(parent); } // create new atom with that module assert atomList != null; OntologyAtom atom = atomList.newAtom(); atom.setModule(module); return Optional.of(atom); }