code: public String getResourceName(Object obj) {
  
          String result;
          if (obj instanceof CmsResource) {
              result = ((CmsResource)obj).getName();
          } else {
              result = CmsResource.getName(String.valueOf(obj));
          }
          return result;
      }
docs: Returns the name of a resource without the path information.<p>
  
  This assumes the parameter is either a CmsResource, or a String representing a resource name.<p>
  
  The resource name of a file is the name of the file.
  The resource name of a folder is the folder name with trailing "/".
  The resource name of the root folder is <code>/</code>.<p>
  
  @param obj a CmsResource or a String representing a resource name
  
  @return the name of a resource without the path information
  
  @see CmsResource#getName()
  @see org.opencms.jsp.CmsJspResourceWrapper#getResourceName()