if (sort) {
nodes = Util.sortedIterator(nodes, ProjectTraversal.dataNodeComparator);
}
while (nodes.hasNext()) {
DataNode node = (DataNode) nodes.next();
ProjectPath nodePath = path.appendToPath(node);
handler.projectNode(nodePath);
if (handler.shouldReadChildren(node, path)) {
this.traverseMaps(node.getDataMaps().iterator(), nodePath);
}
}
}