code: protected boolean isTab(IUserLayoutManager ulm, String folderId) throws PortalException {
          // we could be a bit more careful here and actually check the type
          return ulm.getRootFolderId().equals(ulm.getParentId(folderId));
      }
docs: A folder is a tab if its parent element is the layout element
  
  @param ulm User Layout Manager
  @param folderId the folder in question
  @return <code>true</code> if the folder is a tab, otherwise <code>false</code>