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
192883
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);
    }
1011690
public static Component getRootParent(Component component)
	{
		while (null != component.getParent())
		{
			component = component.getParent();
		}
		return component;
	}
160615
public CmsContainerBean getParentContainer() {

        CmsContainerBean result = null;
        if ((getContainer() != null) && (getContainer().getParentInstanceId() != null)) {
            result = m_parentContainers.get(getContainer().getParentInstanceId());
        }
        return result;
    }
1069132
private String getSimpleName(String fqcn) {
        if (fqcn.indexOf('.') >= 0) {
            return fqcn.substring(fqcn.lastIndexOf('.') + 1);
        }
        return fqcn;
    }
382626
public String getPathName()
    {
    if( pathName_ == null)
      {
      StringBuilder pathName = new StringBuilder();

      IVarDef parent = getParent();
      if( parent != null)
        {
        pathName
          .append( parent.getPathName())
          .append( '.');
        }

      String name = getName();
      if( name != null)
        {
        pathName.append( name);
        }

      pathName_ = pathName.toString();
      }

    return pathName_;
    }
53984
public function getReferenceNodesByFqn(string $fqn)
    {
        return isset($this->referenceNodes) && isset($this->referenceNodes[$fqn]) ? $this->referenceNodes[$fqn] : null;
    }
1034386
public static String parent(String node) {
        final int index = node.lastIndexOf('/');
        if (index < 0)
            return null;
        return node.substring(0, index);
    }
594906
protected String getParentOrganizationalUnit(String fqn) {

        String ouFqn = CmsOrganizationalUnit.getParentFqn(CmsOrganizationalUnit.removeLeadingSeparator(fqn));
        if (ouFqn == null) {
            ouFqn = "";
        }
        return ouFqn;
    }
1011007
@Nullable
  protected String getParentPath(String path) {
    // Root does not have a parent.
    if (isRoot(path)) {
      return null;
    }
    int separatorIndex = path.lastIndexOf(PATH_SEPARATOR);
    if (separatorIndex < 0) {
      return null;
    }
    return path.substring(0, separatorIndex);
  }
652957
public String getString(TrieNode root) {
    if (this == root) return "";
    String parentStr = null == getParent() ? "" : getParent().getString(root);
    return parentStr + getToken();
  }
1156769
def qualified_name(self):
        

        parent = self.full_parent_name
        if parent:
            return parent + ' ' + self.name
        else:
            return self.name
735086
public static Element getChild(Element parent, String childName) {
		NodeList nodes = parent.getChildNodes();
		for (int i = 0; i < nodes.getLength(); ++i) {
			Node node = nodes.item(i);
			if ((node instanceof Element) && node.getNodeName().equals(childName))
				return (Element)node;
		}
		return null;
	}
424828
public SmiOidNode getRootNode() {
        SmiOidNode parent = this;
        while (parent.getParent() != null) {
            parent = parent.getParent();
        }
        return parent;
    }
732315
private void computeQualifiedName() {
    if (parent != null) {
      qualifiedName = parent.qualifiedName + "." + field.getName();
    } else {
      qualifiedName = field.getName();
    }
  }
1128755
public function getProjectNamespaceRootFromEntityFqn(string $entityFqn): string
    {
        return $this->tidy(
            \substr(
                $entityFqn,
                0,
                \strrpos(
                    $entityFqn,
                    '\\' . AbstractGenerator::ENTITIES_FOLDER_NAME . '\\'
                )
            )
        );
    }
116997
public static CmsRole valueOfRoleName(String roleName) {

        String roleOu = CmsOrganizationalUnit.getParentFqn(roleName);
        Iterator<CmsRole> it = SYSTEM_ROLES.iterator();
        while (it.hasNext()) {
            CmsRole role = it.next();
            // direct check
            if (roleName.equals(role.getRoleName())) {
                return role.forOrgUnit(roleOu);
            }
            if (!role.isOrganizationalUnitIndependent()) {
                // the role name does not start with "/", but the given role fqn does
                if (roleName.endsWith(CmsOrganizationalUnit.SEPARATOR + role.getRoleName())) {
                    return role.forOrgUnit(roleOu);
                }
            }
        }
        return null;
    }
997647
public function fromNamespace($fqnn)
    {
        $name = str_replace('\\', '.', ltrim((string) $fqnn, '\\'));

        // convert root namespace to default; default is a keyword and no namespace CAN be named as such
        if ($name === '') {
            $name = 'default';
        }

        return $name;
    }