public static OrganigramNode findTreeNode(OrganigramNode searchRoot, String rowKey) {

        if (rowKey == null || searchRoot == null) {
            return null;
        }

        if (searchRoot.getRowKey().equals(rowKey)) {
            return searchRoot;
        }

        if (searchRoot.getChildren() != null) {
            for (OrganigramNode child : searchRoot.getChildren()) {
                OrganigramNode childResult = findTreeNode(child, rowKey);
                if (childResult != null) {
                    return childResult;
                }
            }
        }

        return null;
    }
Finds a {@link OrganigramNode} for the given rowKey.

@param searchRoot The {@link OrganigramNode} to start the search.
@param rowKey     The rowKey.
@return The {@link OrganigramNode} for the rowKey or <code>null</code>.
primefaces/src/main/java/org/primefaces/component/organigram/OrganigramHelper.java