/** * @param useSemantic * useSemantic * @param r * reasoner * @return module extractor */ @PortedFrom(file = "Kernel.h", name = "getModExtractor") public Decomposer getModExtractor(boolean useSemantic, OWLReasoner r) { if (useSemantic) { if (modSem == null) { modSem = new Decomposer(ontology.getAxioms(), new SemanticLocalityChecker(r)); } return modSem; } if (modSyn == null) { modSyn = new Decomposer(ontology.getAxioms(), new SyntacticLocalityChecker()); } return modSyn; }
@Override public void preprocessOntology(Collection<AxiomWrapper> axioms) { exprMap.clear(); Signature s = new Signature(); for (AxiomWrapper q : axioms) { if (q.isUsed()) { exprMap.putAll(q.getAxiom(), asList(getExpr(q.getAxiom()))); s.addAll(q.getAxiom().signature()); } } // register all the objects in the ontology signature Set<OWLAxiom> declarationAxioms = new HashSet<>(); for (OWLEntity p : s.getSignature()) { declarationAxioms.add(df.getOWLDeclarationAxiom(p)); } try { kernel = factory.createReasoner(manager.createOntology(declarationAxioms)); } catch (OWLOntologyCreationException e) { throw new OWLRuntimeException(e); } kernel.precomputeInferences(InferenceType.CLASS_HIERARCHY); }
@Override public void preprocessOntology(Collection<AxiomWrapper> axioms) { exprMap.clear(); Signature s = new Signature(); for (AxiomWrapper q : axioms) { if (q.isUsed()) { exprMap.putAll(q.getAxiom(), asList(getExpr(q.getAxiom()))); s.addAll(q.getAxiom().signature()); } } // register all the objects in the ontology signature Set<OWLAxiom> declarationAxioms = new HashSet<>(); for (OWLEntity p : s.getSignature()) { declarationAxioms.add(df.getOWLDeclarationAxiom(p)); } try { kernel = factory.createReasoner(manager.createOntology(declarationAxioms)); } catch (OWLOntologyCreationException e) { throw new OWLRuntimeException(e); } kernel.precomputeInferences(InferenceType.CLASS_HIERARCHY); }
@Override public void preprocessOntology(Collection<AxiomWrapper> axioms) { exprMap.clear(); Signature s = new Signature(); for (AxiomWrapper q : axioms) { if (q.isUsed()) { exprMap.putAll(q.getAxiom(), asList(getExpr(q.getAxiom()))); s.addAll(q.getAxiom().signature()); } } // register all the objects in the ontology signature Set<OWLAxiom> declarationAxioms = new HashSet<>(); for (OWLEntity p : s.getSignature()) { declarationAxioms.add(df.getOWLDeclarationAxiom(p)); } try { kernel = factory.createReasoner(manager.createOntology(declarationAxioms)); } catch (OWLOntologyCreationException e) { throw new OWLRuntimeException(e); } kernel.precomputeInferences(InferenceType.CLASS_HIERARCHY); }
@Override public void preprocessOntology(Collection<AxiomWrapper> axioms) { exprMap.clear(); Signature s = new Signature(); for (AxiomWrapper q : axioms) { if (q.isUsed()) { exprMap.putAll(q.getAxiom(), asList(getExpr(q.getAxiom()))); s.addAll(q.getAxiom().signature()); } } // register all the objects in the ontology signature Set<OWLAxiom> declarationAxioms = new HashSet<>(); for (OWLEntity p : s.getSignature()) { declarationAxioms.add(df.getOWLDeclarationAxiom(p)); } try { kernel = factory.createReasoner(manager.createOntology(declarationAxioms)); } catch (OWLOntologyCreationException e) { throw new OWLRuntimeException(e); } kernel.precomputeInferences(InferenceType.CLASS_HIERARCHY); }