Examples of OWLReasoner


Examples of org.semanticweb.owlapi.reasoner.OWLReasoner

    OWLReasonerFactory reasonerFactory;
    try {
      reasonerFactory = new HeraklesReasonerFactory( registry, loadStrategy, executionStrategy );
//      OWLReasoner reasoner = reasonerFactory.createReasoner( manager  );
      OWLReasoner reasoner = reasonerFactory.createReasoner( ontology  );
      return reasoner;
    } catch( ClassNotFoundException e ) {
      logger.debug("strategy class can't be found!");
      e.printStackTrace();
    }
View Full Code Here

Examples of org.semanticweb.owlapi.reasoner.OWLReasoner

        createDebuggingOntology();
//        RDFXMLRenderer ren = new RDFXMLRenderer();
//        ren.setOWLOntologyManager(owlOntologyManager);
//        ren.render(debuggingOntology, IRI.create("file:/Users/matthewhorridge/Desktop/DebuggingOntology" + ontologyCounter + ".owlapi"));
        ontologyCounter++;
        OWLReasoner reasoner = reasonerFactory.createNonBufferingReasoner(debuggingOntology);
        satTestCount++;
        boolean sat = reasoner.isSatisfiable(currentClass);
        reasoner.dispose();
        return sat;
    }
View Full Code Here

Examples of org.semanticweb.owlapi.reasoner.OWLReasoner

     */
    private boolean isSatisfiable(OWLClassExpression unsatClass) throws OWLException {
        createDebuggingOntology();
        ontologyCounter++;

        OWLReasoner reasoner = getReasonerFactory().createNonBufferingReasoner(debuggingOntology);

        if (OntologyUtils.containsUnreferencedEntity(debuggingOntology, unsatClass)) {
          reasoner.dispose();
            return true;
        }
        satTestCount++;
        boolean sat = reasoner.isSatisfiable(unsatClass);
        reasoner.dispose();
        return sat;
    }
View Full Code Here

Examples of org.semanticweb.owlapi.reasoner.OWLReasoner

  public IRI getIRI() {
    return iri;
  }

  protected boolean isConsistent(OWLOntology o) {
    OWLReasoner reasoner = reasonerFactory.createReasoner( o );
    return reasoner.isConsistent();
  }
View Full Code Here

Examples of org.semanticweb.owlapi.reasoner.OWLReasoner

    OWLReasoner reasoner = reasonerFactory.createReasoner( o );
    return reasoner.isConsistent();
  }

  protected boolean isEntailed(OWLOntology premise, OWLOntology conclusion) {
    OWLReasoner reasoner = reasonerFactory.createReasoner( premise );

    return reasoner.isEntailed( conclusion.getLogicalAxioms() );
  }
View Full Code Here

Examples of org.semanticweb.owlapi.reasoner.OWLReasoner

        }
        System.out.println("owl-api loading: "+(System.currentTimeMillis()-start));
       
        // Create a Snorocket reasoner and classify
        OWLReasonerFactory reasonerFactory = new SnorocketReasonerFactory();
        OWLReasoner reasoner = reasonerFactory.createNonBufferingReasoner(root);
        reasoner.precomputeInferences(InferenceType.CLASS_HIERARCHY);
        reasoner.dispose();
       
        System.out.println(Statistics.INSTANCE.getStatistics());
        System.out.println("Total time: "+Statistics.INSTANCE.getTotalTime());
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.