if( removed && PelletOptions.USE_COMPLETION_QUEUE && this instanceof Individual ) {
Individual ind = (Individual)this;
ind.applyNext[Node.ATOM] = 0;
ind.applyNext[Node.OR] = 0;
QueueElement qe = new QueueElement( this );
abox.getCompletionQueue().add( qe, NodeSelector.DISJUNCTION );
abox.getCompletionQueue().add( qe, NodeSelector.ATOM );
}
// with smart restore there is a possibility that we remove a conjunct
// but not the conjunction. this is the case if conjunct was added before
// the conjunction but depended on an earlier branch. so we need to make
// sure all conjunctions are actually applied
if( PelletOptions.USE_SMART_RESTORE ) {
for( Iterator<ATermAppl> i = conjunctions.iterator(); i.hasNext(); ) {
ATermAppl c = i.next();
DependencySet d = getDepends(c);
for(ATermList cs = (ATermList) c.getArgument(0); !cs.isEmpty(); cs = cs.getNext()) {
ATermAppl conj = (ATermAppl) cs.getFirst();
addType(conj, d);
}
}
}
for( Iterator<Entry<Node,DependencySet>> i = differents.entrySet().iterator(); i.hasNext(); ) {
Entry<Node,DependencySet> entry = i.next();
Node node = entry.getKey();
DependencySet d = entry.getValue();
if( d.getBranch() > branch ) {
if( log.isLoggable( Level.FINE ) )
log.fine("RESTORE: " + name + " delete difference " + node);
i.remove();
restored = true;
}
}
removed = false;
for( Iterator<Edge> i = inEdges.iterator(); i.hasNext(); ) {
Edge e = i.next();
DependencySet d = e.getDepends();
if( d.getBranch() > branch ) {
if( log.isLoggable( Level.FINE ) )
log.fine("RESTORE: " + name + " delete reverse edge " + e);
if( PelletOptions.USE_INCREMENTAL_CONSISTENCY )
abox.getIncrementalChangeTracker().addDeletedEdge( e );
i.remove();
restored = true;
removed = true;
}
}
if( removed && PelletOptions.USE_COMPLETION_QUEUE ) {
QueueElement qe = new QueueElement( this );
abox.getCompletionQueue().add( qe, NodeSelector.EXISTENTIAL );
abox.getCompletionQueue().add( qe, NodeSelector.MIN_NUMBER );
}
return restored;