code: public CmsSitemapTreeNodeData getData(CmsResource resource) {
  
          try {
              CmsVfsSitemapService svc = new CmsVfsSitemapService();
              CmsObject cms = OpenCms.initCmsObject(A_CmsUI.getCmsObject());
              cms.getRequestContext().setSiteRoot("");
              svc.setCms(cms);
  
              CmsClientSitemapEntry ent = svc.getChildren(resource.getRootPath(), resource.getStructureId(), 0);
              CmsSitemapTreeNodeData data = new CmsSitemapTreeNodeData(
                  m_localeContext.getRootLocale(),
                  m_localeContext.getComparisonLocale());
              data.setClientEntry(ent);
              data.initialize(cms);
              return data;
          } catch (Exception e) {
              LOG.error(e.getLocalizedMessage(), e);
              return null;
          }
  
      }
docs: Gets the tree data for a resource.<p>
  
  @param resource a resource
  @return the data for the resource