Package org.mindswap.pellet.utils

Examples of org.mindswap.pellet.utils.Timer.stop()


   
    /* Classify the ontology if necessary */
    if (!reasoner.isClassified()){
      Timer timerClassify = timers.startTimer( "classification" );
      reasoner.classify();
      timerClassify.stop();
      classificationTime = timerClassify.getTotal();
    }
   
    /* Maps each class to the number of instances (including direct and indirect) */
    HashMap<OWLClass, Integer> counts = new HashMap<OWLClass, Integer>();
View Full Code Here


      System.out.println(reasoner.getEquivalentClasses(cc).size());
     
      /* retrieve all individuals of the class (direct and indirect individuals) */
      Timer timerRetrieval = timers.startTimer( "retrieval" );
      allIndividuals = reasoner.getIndividuals(cc, false);
      timerRetrieval.stop();
     
      /* update instance retrieval time */
      instanceRetrievalTime += timerRetrieval.getTotal();
     
      /* retrieve all direct instances of the class */
 
View Full Code Here

      manager = OWLManager.createOWLOntologyManager();

      /* Rewrite Tbox T -> T' based on the current vocabulary subset */
      Timer timerApproximation = timers.startTimer( "approximation" );
      ApproximationResult approximationResult = approximation.getNextTBox();
      timerApproximation.stop();
     
      if (approximationResult != null) {
        System.out.println("Creating Tbox approximation "+runCounter);
       
        OWLOntology abox = null;
View Full Code Here

       
        if ( !(reasoner.isClassified()) ){
          logger.info("Classifying KB...");
          Timer timerClassify = timers.startTimer( "classification" );
          reasoner.classify();
          timerClassify.stop();
          classificationTime = timerClassify.getTotal();
        }
       
        /* Load Abox into reasoner */
        reasoner.loadOntologies(Collections.singleton(abox));
View Full Code Here

          /* get all individuals (direct and indirect) of class cc only if the class is defined in the ontology */
          if (reasoner.isDefined(cc)){
            timers.createTimer("retrieval");
            Timer timerRetrieval = timers.startTimer( "retrieval" );
            individuals = reasoner.getIndividuals(cc, false);
            timerRetrieval.stop();
           
            /* get direct individuals only */
            directIndividuals = reasoner.getIndividuals(cc, true);
           
            /* update instance retrieval time */
 
View Full Code Here

            Timer timerAboxUpdate = timers.startTimer("aboxupdate");
            for (OWLIndividual ci : individuals){
              changesToMake.add(new AddAxiom(abox, factory.getOWLClassAssertionAxiom(ci, cc)));
            }
            List<OWLOntologyChange> actualChangesMade = manager.applyChanges(changesToMake);
            timerAboxUpdate.stop();
            newIndividualsToAdd += actualChangesMade.size();
            aboxUpdateTime = timerAboxUpdate.getTotal();
          }
           
          /* Update total number of direct and indirect instances retrieved in the current run */
 
View Full Code Here

    timers.createTimer("selection");
   
    /* Selection contains concept names only */ 
    Timer timerSelection = timers.startTimer("selection");
    this.selection = this.strategy.getNextSelection();
    timerSelection.stop();
    long selectionTime = timerSelection.getTotal();
   
    if (this.selection == null){
      return null;
    }else {
View Full Code Here

        }else{
          manager.applyChange(new AddAxiom(approximatedTbox, ca));
          logger.info("[UNMODIFIED AXIOM] [type="+ca.getAxiomType().getName()+"]: "+ca.toString());
        }
      }
      timerRewrite.stop();
      long axiomRewritingTime = timerRewrite.getTotal();
     
      /*
      it = axioms.iterator();
      List<OWLAxiomChange> toRemove = new Vector<OWLAxiomChange>();
View Full Code Here

      if (!reasoner.isClassified())
      {
        /* Measure time using Benchmarking framework */
        Timer timerClassify = timers.startTimer("classification");
        reasoner.classify();
        timerClassify.stop();
        classificationTime = timerClassify.getTotal();
      }

      /* Load Abox into reasoner */
      reasoner.loadOntologies(Collections.singleton(abox));
 
View Full Code Here

           * indirect individuals)
           */
          timers.createTimer("retrieval");
          Timer timerRetrieval = timers.startTimer("retrieval");
          allIndividuals = reasoner.getIndividuals(cc, false);
          timerRetrieval.stop();

          /* update instance retrieval time */
          instanceRetrievalTime += timerRetrieval.getTotal();

          /* retrieve all direct instances of the class */
 
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.