code: private CmsResource getResource(CmsObject cms, String resourcename, CmsResourceFilter filter) {
  
          CmsResource res = null;
  
          try {
              res = cms.readResource(
                  CmsResourceWrapperUtils.removeFileExtension(cms, resourcename, getExtension()),
                  filter);
          } catch (CmsException ex) {
              return null;
          }
  
          if (checkTypeId(res.getTypeId())) {
              return res;
          }
  
          return null;
      }
docs: Trys to read the resourcename after removing the file extension and return the
  resource if the type id is correct.<p>
  
  @param cms the initialized CmsObject
  @param resourcename the name of the resource to read
  @param filter the resource filter to use while reading
  
  @return the resource or null if not found