/** * @param axiom axiom * @param signature signature * @param type type */ public void extract(AxiomWrapper axiom, Signature signature, ModuleType type) { this.extract(Collections.singletonList(axiom), signature, type); } }
/** * @param axiom axiom * @param signature signature * @param type type */ public void extract(AxiomWrapper axiom, Signature signature, ModuleType type) { this.extract(Collections.singletonList(axiom), signature, type); } }
/** * @param axiom axiom * @param signature signature * @param type type */ public void extract(AxiomWrapper axiom, Signature signature, ModuleType type) { this.extract(Collections.singletonList(axiom), signature, type); } }
/** * @param axiom axiom * @param signature signature * @param type type */ public void extract(AxiomWrapper axiom, Signature signature, ModuleType type) { this.extract(Collections.singletonList(axiom), signature, type); } }
/** * @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); }
/** * @param signature the signature to use * @param moduletype module type * @param useSemantics true if semantic locality should be used * @return a set of axioms that corresponds to the atom with the id INDEX */ public Collection<AxiomWrapper> getModule(Stream<OWLEntity> signature, boolean useSemantics, ModuleType moduletype) { // init signature Signature sig = new Signature(signature); sig.setLocality(false); modularizer.extract(axioms, sig, moduletype); return modularizer.getModule(); } }
/** * @param signature the signature to use * @param moduletype module type * @param useSemantics true if semantic locality should be used * @return a set of axioms that corresponds to the atom with the id INDEX */ public Collection<AxiomWrapper> getModule(Stream<OWLEntity> signature, boolean useSemantics, ModuleType moduletype) { // init signature Signature sig = new Signature(signature); sig.setLocality(false); modularizer.extract(axioms, sig, moduletype); return modularizer.getModule(); } }
/** * @param signature the signature to use * @param moduletype module type * @param useSemantics true if semantic locality should be used * @return a set of axioms that corresponds to the atom with the id INDEX */ public Collection<AxiomWrapper> getModule(Stream<OWLEntity> signature, boolean useSemantics, ModuleType moduletype) { // init signature Signature sig = new Signature(signature); sig.setLocality(false); modularizer.extract(axioms, sig, moduletype); return modularizer.getModule(); } }
/** * @param signature the signature to use * @param moduletype module type * @param useSemantics true if semantic locality should be used * @return a set of axioms that corresponds to the atom with the id INDEX */ public Collection<AxiomWrapper> getModule(Stream<OWLEntity> signature, boolean useSemantics, ModuleType moduletype) { // init signature Signature sig = new Signature(signature); sig.setLocality(false); modularizer.extract(axioms, sig, moduletype); return modularizer.getModule(); } }
/** * remove tautologies (axioms that are always local) from the ontology * temporarily */ private void removeTautologies() { // we might use it for another decomposition tautologies.clear(); for (AxiomWrapper p : axioms) { if (p.isUsed()) { // check whether an axiom is local wrt its own signature modularizer.extract(p, new Signature(p.getAxiom().signature()), type); if (modularizer.isTautology(p.getAxiom(), type)) { tautologies.add(p); p.setUsed(false); } } } }
/** * remove tautologies (axioms that are always local) from the ontology * temporarily */ private void removeTautologies() { // we might use it for another decomposition tautologies.clear(); for (AxiomWrapper p : axioms) { if (p.isUsed()) { // check whether an axiom is local wrt its own signature modularizer.extract(p, new Signature(p.getAxiom().signature()), type); if (modularizer.isTautology(p.getAxiom(), type)) { tautologies.add(p); p.setUsed(false); } } } }
/** * remove tautologies (axioms that are always local) from the ontology * temporarily */ private void removeTautologies() { // we might use it for another decomposition tautologies.clear(); for (AxiomWrapper p : axioms) { if (p.isUsed()) { // check whether an axiom is local wrt its own signature modularizer.extract(p, new Signature(p.getAxiom().signature()), type); if (modularizer.isTautology(p.getAxiom(), type)) { tautologies.add(p); p.setUsed(false); } } } }
/** * remove tautologies (axioms that are always local) from the ontology * temporarily */ private void removeTautologies() { // we might use it for another decomposition tautologies.clear(); for (AxiomWrapper p : axioms) { if (p.isUsed()) { // check whether an axiom is local wrt its own signature modularizer.extract(p, new Signature(p.getAxiom().signature()), type); if (modularizer.isTautology(p.getAxiom(), type)) { tautologies.add(p); p.setUsed(false); } } } }