code: public static final String getParentFqn(String fqn) {
  
          if (CmsStringUtil.isEmptyOrWhitespaceOnly(fqn)) {
              // in case of the root ou
              return null;
          }
          int pos;
          if (fqn.endsWith(CmsOrganizationalUnit.SEPARATOR)) {
              pos = fqn.substring(0, fqn.length() - 1).lastIndexOf(CmsOrganizationalUnit.SEPARATOR);
          } else {
              pos = fqn.lastIndexOf(CmsOrganizationalUnit.SEPARATOR);
          }
          if (pos <= 0) {
              // in case of simple names assume root ou
              return "";
          }
          return fqn.substring(0, pos + 1);
      }
docs: Returns the parent fully qualified name.<p>
  
  This is <code>null</code> for the root ou, and
  the empty string for first level ous.<p>
  
  @param fqn the fully qualified name to get the parent from
  
  @return the parent fully qualified name