private QNameToStatementDefinition stmtDef() {
final StatementSupportBundle supportsForPhase = currentContext.getSupportsForPhase(inProgressPhase);
qnameToStmtDefMap.putAll(supportsForPhase.getCommonDefinitions());
qnameToStmtDefMap.putAll(supportsForPhase.getDefinitionsSpecificForVersion(getRootVersion()));
if (inProgressPhase != ModelProcessingPhase.FULL_DECLARATION) {
return qnameToStmtDefMap;
}
final Map<QName, StatementSupport<?, ?, ?>> extensions = currentContext.getAllFromNamespace(
StatementDefinitionNamespace.class);
if (extensions != null) {
extensions.forEach((qname, support) -> {
final StatementSupport<?, ?, ?> existing = qnameToStmtDefMap.putIfAbsent(qname, support);
if (existing != null) {
LOG.debug("Source {} already defines statement {} as {}", source, qname, existing);
} else {
LOG.debug("Source {} defined statement {} as {}", source, qname, support);
}
});
}
return qnameToStmtDefMap;
}