code: public static final String getType(CmsObject cms, String rootPath) {
  
          String type = null;
          CmsSolrIndex index = CmsSearchManager.getIndexSolr(cms, null);
          if (index != null) {
              I_CmsSearchDocument doc = index.getDocument(CmsSearchField.FIELD_PATH, rootPath);
              if (doc != null) {
                  type = doc.getFieldValueAsString(CmsSearchField.FIELD_TYPE);
              }
          }
          return type;
      }
docs: Returns the resource type for the given root path.<p>
  
  @param cms the current CMS context
  @param rootPath the root path of the resource to get the type for
  
  @return the resource type for the given root path