code: protected void addNodeToItsParent(CmsAppCategoryNode node) {
  
          String parentId = node.getCategory().getParentId();
          if (CmsStringUtil.isEmptyOrWhitespaceOnly(parentId)) {
              parentId = null;
          }
          CmsAppCategoryNode parentNode = m_nodes.get(parentId);
          if (parentNode == null) {
              LOG.error(
                  "Missing parent [" + node.getCategory().getParentId() + "] for [" + node.getCategory().getId() + "]");
          } else {
              parentNode.addChild(node);
          }
      }
docs: Adds a category node to the category node belonging to its parent id.<p>
  
  @param node the node which should be attached to its parent