code: protected CmsStaticExportData readResource(CmsObject cms, String uri) throws CmsException {
  
          CmsResource resource = null;
          boolean isDetailPage = false;
  
          try {
              resource = cms.readResource(uri);
          } catch (CmsVfsResourceNotFoundException e) {
  
              String urlName = CmsResource.getName(uri).replaceAll("/$", "");
              CmsUUID id = cms.readIdForUrlName(urlName);
              if (id == null) {
                  throw e;
              }
              resource = cms.readResource(id);
              isDetailPage = true;
  
              //String parent = CmsResource.getParentFolder(uri);
              //resource = cms.readDefaultFile(parent);
          }
          CmsStaticExportData result = new CmsStaticExportData(uri, null, resource, null);
          result.setIsDetailPage(isDetailPage);
          return result;
      }
docs: Reads the resource with the given URI.<p>
  
  @param cms the current CMS context
  @param uri the URI to check
  
  @return the resource export data
  
  @throws CmsException if soemthing goes wrong