Package org.mindswap.pellet.utils.progress

Examples of org.mindswap.pellet.utils.progress.ConsoleProgressMonitor


   */
  protected void extractModuleSignatures(Set<? extends OWLEntity> entities) {

    log.fine( "Extract module for " + entities );

    ProgressMonitor monitor = new ConsoleProgressMonitor();
    monitor.setProgressTitle( "Extracting" );
    monitor.setProgressLength( entities.size() );
    monitor.taskStarted();
   
    Set<OWLEntity> nonLocalModule = new HashSet<OWLEntity>();
    for( OWLAxiom axiom : getAxioms() ) {
      if( !isLocal( axiom, Collections.<OWLEntity> emptySet() ) )
        nonLocalModule.addAll( OntologyUtils.getSignature( axiom ) );
    }

    // iterate over classes passed in, and extract all their modules
    for( OWLEntity ent : entities ) {
      monitor.incrementProgress();

      if( log.isLoggable( Level.FINE ) )
        log.fine( "Class: " + ent );

      if( !modules.containsKey( ent ) )
        if( optimizeForSharedModules )
          extractModuleSignature( ent, new HashSet<OWLEntity>(),
              new ArrayList<OWLEntity>(), new HashSet<OWLEntity>( nonLocalModule ) );
        else
          extractModuleSignature( ent, new DisjointSet<OWLEntity>(),
              new ArrayList<OWLEntity>(), new HashSet<OWLEntity>( nonLocalModule ) );
    }

    monitor.taskFinished();

    if( log.isLoggable( Level.FINE ) )
      log.fine( modules.toString() );
  }
View Full Code Here


    startTask( "Realization" );
    reasoner.getKB().realize();
    finishTask( "Realization" );   

    monitor = new ConsoleProgressMonitor();
    monitor.setProgressTitle( "Explaining" );
    monitor.setProgressLength( reasoner.getRootOntology().getClassesInSignature().size() );
    monitor.taskStarted();

    Node<OWLClass> bottoms = reasoner.getEquivalentClasses( OWL.Nothing );
View Full Code Here

TOP

Related Classes of org.mindswap.pellet.utils.progress.ConsoleProgressMonitor

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.