Package org.semanticweb.owlapi.reasoner

Examples of org.semanticweb.owlapi.reasoner.OWLReasonerFactory


      OWLOntology ont = manager.loadOntologyFromOntologyDocument( IRI.create( PHYSICAL_URI ) );
     
      ReasonerConfiguration reasonerConfig = new ReasonerConfigurationImp();
      reasonerConfig.loadRemoteReasonerConfiguration(new File("reasoner.xml"));

      OWLReasonerFactory reasonerFactory = new HeraklesReasonerFactory( reasonerConfig, "de.fzi.herakles.strategy.impl.BasicLoadStrategy", "de.fzi.herakles.strategy.impl.AQAAnytimeStrategy" );
     
      AnytimeOWLReasoner reasoner = (AnytimeOWLReasoner) reasonerFactory.createReasoner( ont );

      System.out.println("Creating AnytimeListener...");
      AnytimeListener<OWLNamedIndividual> listener = new AnytimeListenerImpl();
           
            OWLClass cls = factory.getOWLClass( IRI.create( CLASS_URI ) );
View Full Code Here


      OWLOntology ont = manager.loadOntologyFromOntologyDocument( IRI.create( PHYSICAL_URI ) );
     
      ReasonerConfiguration reasonerConfig = new ReasonerConfigurationImp();
      reasonerConfig.loadRemoteReasonerConfiguration(new File("reasoner.xml"));

      OWLReasonerFactory reasonerFactory = new HeraklesReasonerFactory( reasonerConfig, "de.fzi.herakles.strategy.impl.BasicLoadStrategy", "de.fzi.herakles.strategy.impl.BasicPStrategy" );
     
      OWLReasoner reasoner = reasonerFactory.createReasoner( ont );
           
      // We can easily get a list of inconsistent classes.  (A class is inconsistent if it
      // can't possibly have any instances).  Note that the getInconsistentClasses method
      // is really just a convenience method for obtaining the classes that are equivalent
      // to owl:Nothing.
View Full Code Here

      OWLOntology ont = manager.loadOntologyFromOntologyDocument( IRI.create( PHYSICAL_URI ) );
     
      ReasonerConfiguration reasonerConfig = new ReasonerConfigurationImp();
      reasonerConfig.loadRemoteReasonerConfiguration(new File("reasoner.xml"));

      OWLReasonerFactory reasonerFactory = new HeraklesReasonerFactory( reasonerConfig, "de.fzi.herakles.strategy.impl.BasicLoadStrategy", "de.fzi.herakles.strategy.impl.AQAAnytimeStrategy" );
     
      AnytimeOWLReasoner reasoner = (AnytimeOWLReasoner) reasonerFactory.createReasoner( ont );

      System.out.println("Creating AnytimeListener...");
      AnytimeListener<OWLNamedIndividual> listener = new AnytimeListenerImpl();

      OWLClass cls = factory.getOWLClass(IRI.create(CLASS_URI));
View Full Code Here

      OWLOntology ont = manager.loadOntologyFromOntologyDocument( IRI.create( PHYSICAL_URI ) );
     
      ReasonerConfiguration reasonerConfig = new ReasonerConfigurationImp();
      reasonerConfig.loadRemoteReasonerConfiguration(new File("reasoner.xml"));

      OWLReasonerFactory reasonerFactory = new HeraklesReasonerFactory( reasonerConfig, "de.fzi.herakles.strategy.impl.AnalysingLoadStrategy", "de.fzi.herakles.strategy.impl.ABoxTBoxRatioSelectionStrategy" );
           
            // We now need to load an ontology into the reasoner. 
      OWLReasoner reasoner = reasonerFactory.createReasoner( ont );
           
            // With the strategies used, Herakles delegates the tasks to all registered reasoners
            // in parallel and returns the results from the fastest one. In the following we perform
            // various reasoning tasks. In between the tasks we wait for a few seconds to ensure
            // every reasoner has finished, since we want every reasoner to be available again for the
View Full Code Here

      OWLOntology ont = manager.loadOntologyFromOntologyDocument( IRI.create( PHYSICAL_URI ) );
     
      ReasonerConfiguration reasonerConfig = new ReasonerConfigurationImp();
      reasonerConfig.loadRemoteReasonerConfiguration(new File("reasoner.xml"));

      OWLReasonerFactory reasonerFactory = new HeraklesReasonerFactory( reasonerConfig, "de.fzi.herakles.strategy.impl.BasicLoadStrategy", "de.fzi.herakles.strategy.impl.ScreechAnytimeStrategy" );
     
      AnytimeOWLReasoner reasoner = (AnytimeOWLReasoner) reasonerFactory.createReasoner( ont );

      System.out.println("Creating AnytimeListener...");
      AnytimeListener<OWLNamedIndividual> listener = new AnytimeListenerImpl();
     
            OWLClass cls = factory.getOWLClass( IRI.create( CLASS_URI ) );
View Full Code Here

      OWLOntology ont = manager.loadOntologyFromOntologyDocument( IRI.create( PHYSICAL_URI ) );
     
      ReasonerConfiguration reasonerConfig = new ReasonerConfigurationImp();
      reasonerConfig.loadRemoteReasonerConfiguration(new File("reasoner.xml"));

      OWLReasonerFactory reasonerFactory = new HeraklesReasonerFactory( reasonerConfig, "de.fzi.herakles.strategy.impl.BasicLoadStrategy", "de.fzi.herakles.strategy.impl.BenchmarkingStrategy" );
           
            // We now need to load an ontology into the reasoner. 
      OWLReasoner reasoner = reasonerFactory.createReasoner( ont );
           
            // With the strategies used, Herakles delegates the tasks to all registered reasoners
            // in parallel and returns the results from the fastest one. In the following we perform
            // various reasoning tasks. In between the tasks we wait for a few seconds to ensure
            // every reasoner has finished, since we want every reasoner to be available again for the
View Full Code Here

      // make sure these jars are on the classpath
     
      ReasonerConfiguration reasonerConfig = new ReasonerConfigurationImp();
      reasonerConfig.loadRemoteReasonerConfiguration(new File("reasoner.xml"));
             
      OWLReasonerFactory reasonerFactory = new HeraklesReasonerFactory( reasonerConfig, "de.fzi.herakles.strategy.impl.BasicLoadStrategy", "de.fzi.herakles.strategy.impl.FaultTolerantPStrategy" );
     
      OWLReasoner reasoner = reasonerFactory.createReasoner( ontology );

            // Get SubClasses          
        OWLClass cls = factory.getOWLClass(IRI.create( CLASS_IRI ) );
      NodeSet<OWLClass> subClasses = reasoner.getSubClasses( cls, true );
      System.out.println(subClasses);
View Full Code Here

    // if the execution strategy is not selected, use the basic parallel execution strategy
    if(executionStrategy.equals("")){
      executionStrategy = "de.fzi.herakles.strategy.impl.BasicPStrategy";
    }

    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

            return;
        }
        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

Related Classes of org.semanticweb.owlapi.reasoner.OWLReasonerFactory

Copyright © 2018 www.massapicom. 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.