/** Runs the pellet reasoner on the aligned ontology */ private void runPellet() { Reasoner reasoner = PelletReasonerFactory.theInstance().create(); reasoner = reasoner.bindSchema(schema); inferredModel = (InfModel) ModelFactory.createInfModel(reasoner, schema); StmtIterator stmts = inferredModel.listStatements(); inferences = (OntModel) ModelFactory.createOntologyModel().add(stmts); } // runPellet
/* @see org.mindswap.owl.OWLProvider#createReasoner(java.lang.String) */ public Reasoner createReasoner(final String reasonerName) { // Pellet reasoner (first, because it is most likely used) if (Reasoners.Pellet.name().equals(reasonerName)) { PelletOptions.USE_CLASSIFICATION_MONITOR = PelletOptions.MonitorType.NONE; // mute console outputs return PelletReasonerFactory.theInstance().create(); } // Jena built-in reasoners else if (Reasoners.OWL.name().equals(reasonerName)) { return OWLFBRuleReasonerFactory.theInstance().create(null); } else if (Reasoners.OWLMini.name().equals(reasonerName)) { return OWLMiniReasonerFactory.theInstance().create(null); } else if (Reasoners.OWLMicro.name().equals(reasonerName)) { return OWLMicroReasonerFactory.theInstance().create(null); } else if (Reasoners.RDFS.name().equals(reasonerName)) { return RDFSRuleReasonerFactory.theInstance().create(null); } else if (Reasoners.Transitive.name().equals(reasonerName)) { return TransitiveReasonerFactory.theInstance().create(null); } return null; }