code: public static CmsUUID getIdForUri(CmsObject cms, String uri) throws CmsException {
  
          return cms.readResource(uri).getStructureId();
      }
docs: Looks up an URI in the sitemap and returns either a sitemap entry id (if the URI is a sitemap URI)
  or the structure id of a resource (if the URI is a VFS path).<p>
  
  @param cms the current CMS context
  @param uri the URI to look up
  @return a sitemap entry id or a structure id
  
  @throws CmsException if something goes wrong