// Process feature queue
if (!featureQueue.isEmpty()) {
do {
done = false;
final IFeatureQueueEntry entry = featureQueue.remove();
Datatype d = entry.getD();
// Get right hand sides from NF8 expressions that
// match d on their left hand side
MonotonicCollection<NF8> entries =
ontologyNF8.get(d.getFeature());
if (entries == null)
continue;
// Evaluate to determine the ones that match
MonotonicCollection<IConjunctionQueueEntry> res =
new MonotonicCollection<IConjunctionQueueEntry>(2);
for (final NF8 e : entries) {
Datatype d2 = e.lhsD;
// If they match add a conjunction queue entry
// to queueA
if (datatypeMatches(d, d2)) {
res.add(new IConjunctionQueueEntry() {
/**
* Serialisation version.
*/
private static final long serialVersionUID = 1L;
public int getBi() {
return CoreFactory.TOP_CONCEPT;
}
public int getB() {
return e.rhsB;
}
});
}
}
addToConceptQueue(res);
} while (!featureQueue.isEmpty());
}
// Process role queue
if (!roleQueue.isEmpty()) {
done = false;
final IRoleQueueEntry entry = roleQueue.remove();
if (!succ.lookupConcept(entry.getR()).contains(entry.getB())) {
processNewEdgeTracking(entry.getR(), entry.getB());
}
}
if (!externalQueue.isEmpty()) {
done = false;
final IRoleQueueEntry entry = externalQueue.remove();
processNewEdgeTracking(entry.getR(), entry.getB());
}
} while (!done);
}