*/
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() );
}