private void importOntology() throws Exception OWLReasonerFactory reasonerFactory = new Reasoner.ReasonerFactory(); OWLReasonerConfiguration config; if (this.verbose_output) {
public OWLReasoner createReasoner(Set<OWLOntology> ontologies) { if (ontologies.size() == 1) { OWLOntology ontology = ontologies.iterator().next(); if (reasonerType == ReasonerType.PELLET) { // Logger abox_logger = ABox.log; // abox_logger.setLevel(level); // Logger kb_logger = KnowledgeBase.log; // kb_logger.setLevel(level); // Logger tb_logger = Taxonomy.log; // tb_logger.setLevel(level); return com.clarkparsia.pellet.owlapiv3.PelletReasonerFactory.getInstance().createReasoner(ontology); } else if (reasonerType == ReasonerType.HERMIT) { return new org.semanticweb.HermiT.Reasoner.ReasonerFactory().createReasoner(ontology); } else { throw new IllegalArgumentException( "Cannot create a reasoner of type '" + reasonerType + "'"); } } else { throw new IllegalArgumentException( "OWLAPI v3 reasoners will only reason over a single ontology in one session"); } } }
public OWLReasoner createNonBufferingReasoner(OWLOntology ontology) { return createNonBufferingReasoner(ontology,null); } public OWLReasoner createNonBufferingReasoner(OWLOntology ontology,OWLReasonerConfiguration owlAPIConfiguration) {
public OWLReasoner createReasoner(OWLOntology ontology) { return createReasoner(ontology,null); } public OWLReasoner createReasoner(OWLOntology ontology,OWLReasonerConfiguration config) {
public OWLReasoner createReasoner(OWLOntology ontology,OWLReasonerConfiguration config) { return createHermiTOWLReasoner(getProtegeConfiguration(config),ontology); } public OWLReasoner createNonBufferingReasoner(OWLOntology ontology) {
public KLABReasoner(OWL owl) { overall = (Ontology) owl.requireOntology(ONTOLOGY_ID, OWL.INTERNAL_ONTOLOGY_PREFIX); if (KLAB.CONFIG.useReasoner()) { this.reasoner = new Reasoner.ReasonerFactory() .createReasoner(overall.getOWLOntology()); on = true; } }
/** * Instantiates a {@link OwlApiClassifier} from the specified parameters. * * @param ontology the ontology */ public OwlApiClassifier(OWLOntology ontology) { reasoner = new Reasoner.ReasonerFactory().createReasoner(ontology); this.ontology = ontology; }
public OWLReasoner createNonBufferingReasoner(OWLOntology ontology,OWLReasonerConfiguration owlAPIConfiguration) { Configuration configuration=getProtegeConfiguration(owlAPIConfiguration); configuration.bufferChanges=false; return createHermiTOWLReasoner(configuration,ontology); } protected Configuration getProtegeConfiguration(OWLReasonerConfiguration owlAPIConfiguration) {