@Override
  public TreeNode<Set<String>> finalizeProperties(
      TreeNode<QueryInfo> queryTree, boolean isCollection) {

    QueryInfo queryInfo = queryTree.getObject();
    TreeNode<Set<String>> resultTree = new TreeNodeImpl<>(
      null, queryInfo.getProperties(), queryTree.getName());

    copyPropertiesToResult(queryTree, resultTree);

    boolean addKeysToEmptyResource = true;
    if (! isCollection && isRequestWithNoProperties(queryTree)) {
      addSubResources(queryTree, resultTree);
      addKeysToEmptyResource = false;
    }
    ensureRequiredProperties(resultTree, addKeysToEmptyResource);

    return resultTree;
  }
Default resource renderer.
Provides the default "native" rendering for all resources.
ambari-server/src/main/java/org/apache/ambari/server/api/query/render/DefaultRenderer.java