if (log.isTraceEnabled()) log.trace("check for subsumption: " + role + "." + concept);
final int cInt = factory.getConcept(((NamedConcept) concept).getId());
final IConceptSet cAncestorSet = getAncestors(no, cInt);
final int rInt = factory.getRole(role.getId());
final RoleSet rSet = rc.get(rInt);
final List<Existential> remove = new ArrayList<Existential>();
boolean subsumed = false;
for (Existential candidate: items) {
final Concept value = candidate.getConcept();
if (!(value instanceof NamedConcept)) {
log.debug("WARNING: pass through of nested complex value: " + value);
continue;
}
final int dInt = factory.getConcept(((NamedConcept) value).getId());
final IConceptSet dAncestorSet = getAncestors(no, dInt);
final int sInt = factory.getRole(((NamedRole) candidate.getRole()).getId());
final RoleSet sSet = rc.get(sInt);
if (rInt == sInt && cInt == dInt) {
subsumed = true;
} else {
if (rSet.contains(sInt)) {
if (cAncestorSet.contains(dInt)) {
remove.add(candidate);
if (log.isTraceEnabled()) log.trace("\tremove " + candidate);
}
}
if (sSet.contains(rInt)) {
if (dAncestorSet.contains(cInt)) {
subsumed = true;
if (log.isTraceEnabled()) log.trace("\tsubsumed");
}
}