boolean defaultPrimaryType,
boolean residual)
throws RepositoryException {
NodeTypeManager manager = session.getWorkspace().getNodeTypeManager();
NodeTypeIterator types = manager.getAllNodeTypes();
boolean overjump = false;
while (types.hasNext()) {
NodeType type = types.nextNodeType();
// node types with more than one residual child node definition
// will cause trouble in test cases. the implementation
// might pick another definition than the definition returned by
// this method, when a child node is set.