private Bool checkDisjointPropertyClash(CachedNode root1, CachedNode root2) { MultiValueMap<ATermAppl, Role> neighbors1 = collectNeighbors( root1 ); if( neighbors1.isEmpty() ) return null; MultiValueMap<ATermAppl, Role> neighbors2 = collectNeighbors( root2 ); if( neighbors2.isEmpty() ) return null; for( Entry<ATermAppl, Set<Role>> e : neighbors1.entrySet() ) { ATermAppl commonNeighbor = e.getKey(); Set<Role> roles1 = e.getValue(); Set<Role> roles2 = neighbors2.get( commonNeighbor ); if( roles2 == null ) continue; if( checkDisjointProperties( roles1, roles2 ) ) return Bool.UNKNOWN; } return null; }
private Bool checkDisjointPropertyClash(CachedNode root1, CachedNode root2) { MultiValueMap<ATermAppl, Role> neighbors1 = collectNeighbors( root1 ); if( neighbors1.isEmpty() ) return null; MultiValueMap<ATermAppl, Role> neighbors2 = collectNeighbors( root2 ); if( neighbors2.isEmpty() ) return null; for( Entry<ATermAppl, Set<Role>> e : neighbors1.entrySet() ) { ATermAppl commonNeighbor = e.getKey(); Set<Role> roles1 = e.getValue(); Set<Role> roles2 = neighbors2.get( commonNeighbor ); if( roles2 == null ) continue; if( checkDisjointProperties( roles1, roles2 ) ) return Bool.UNKNOWN; } return null; }
/** * {@inheritDoc} */ public Set<OWLAxiom> extractModule(Set<? extends OWLEntity> signature) { if( isChanged() ) resetModules(); Set<OWLEntity> module = new HashSet<OWLEntity>( signature ); for( OWLAxiom axiom : getAxioms() ) { if( !isLocal( axiom, Collections.<OWLEntity> emptySet() ) ) module.addAll( OntologyUtils.getSignature( axiom ) ); } if( !entityAxioms.isEmpty() ) { if( optimizeForSharedModules ) extractModuleSignature( null, new HashSet<OWLEntity>(), new ArrayList<OWLEntity>(), module ); else extractModuleSignature( null, new DisjointSet<OWLEntity>(), new ArrayList<OWLEntity>(), module ); } return getModuleAxioms( module ); }
private void processQueue() { int startingSize = queue.size(); while( !queue.isEmpty() ) { int processed = startingSize - queue.size(); if( monitor.getProgress() < processed ) monitor.setProgress( processed ); MultiValueMap<ConceptInfo, Trigger> localQueue = queue; queue = new MultiValueMap<ConceptInfo, Trigger>(); for (Entry<ConceptInfo, Set<Trigger>> entry : localQueue.entrySet()) { ConceptInfo ci = entry.getKey(); for (Trigger trigger : entry.getValue()) { processTrigger(ci, trigger); } } } }
private void processQueue() { int startingSize = queue.size(); while( !queue.isEmpty() ) { int processed = startingSize - queue.size(); if( monitor.getProgress() < processed ) monitor.setProgress( processed ); MultiValueMap<ConceptInfo, Trigger> localQueue = queue; queue = new MultiValueMap<ConceptInfo, Trigger>(); for (Entry<ConceptInfo, Set<Trigger>> entry : localQueue.entrySet()) { ConceptInfo ci = entry.getKey(); for (Trigger trigger : entry.getValue()) { processTrigger(ci, trigger); } } } }