Returns the path to the parent component of the provided property path.
323132
public static String getParentPropertyPath(String propertyPath) {
       int propertySeparatorIndex = getLastNestedPropertySeparatorIndex(propertyPath);
       return propertySeparatorIndex == -1? "": propertyPath.substring(0, propertySeparatorIndex);
   }
849552
def relpath_for(self, path):
        """"""
        if self.parent_dir in (".", ""):
            return path

        if path == self.parent_dir:
            return ""

        dirname = os.path.dirname(path) or "."
        basename = os.path.basename(path)

        cached = self.relpath_cache.get(dirname, empty)
        if cached is empty:
            cached = self.relpath_cache[dirname] = os.path.relpath(dirname, self.parent_dir)

        return os.path.join(cached, basename)
672096
def parent_child_paths(path, some_path):
        
        return PathFilterUtil.is_child(path, some_path) or PathFilterUtil.is_child(some_path, path)
918934
public static <T> SimplePath<T> path(Class<? extends T> type, Path<?> parent, String property) {
        return simplePath(type, parent, property);
    }
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);
  }
960549
def data_path(self) -> DataPath:
        """"""
        dp = self.data_parent()
        return (dp.data_path() if dp else "") + "/" + self.iname()
545488
protected function getParentClasspath()
    {
        if ($this->getChild()->getAncestor()) {
            return $this->getChild()->getAncestor();
        } else {
            return $this->getObjectBuilder()->getClasspath();
        }
    }
1302531
function getParent(model, path) {
    var getParentMethod = inner(model).getParent;
    return getParentMethod ? getParentMethod.call(model, path) : model.parentModel;
}
510196
public static String getParentPath(String path) {
        if (path == null) return null;
        path = path.trim();
        if (path.endsWith(PATH_ROOT) && path.length() > 1) {
            path = path.substring(0, path.length() - 1);
        }
        int lastIndex = path.lastIndexOf(PATH_ROOT);
        if (path.length() > 1 && lastIndex > 0) {
            return path.substring(0, lastIndex);
        }
        return PATH_ROOT;
    }
1088500
public static String toUrlPath(Parent parent) throws IOException {
        String relativePath = "pom.xml";

        if (relativePath != parent.getRelativePath())  {
            if ("".equals(parent.getRelativePath())) {
                relativePath = new StringBuilder()
                    .append(parent.getArtifactId())
                    .append("-")
                    .append(parent.getVersion())
                    .append(".pom")
                    .toString();
            } else {
                relativePath = new File(parent.getRelativePath()).getCanonicalPath();
            }

        }

        String urlPath = new StringBuilder()
                .append(parent.getGroupId().replaceAll("\\.", "/").toLowerCase())
                .append("/")
                .append(parent.getArtifactId().replaceAll("\\.", "/").toLowerCase())
                .append("/")
                .append(parent.getVersion())
                .append("/")
                .append(relativePath)
                .toString();

        return urlPath;
    }
480438
public String getRelativePath() {
        final StringBuilder builder = new StringBuilder();
        for(final String p : path) {
            builder.append(p).append("/");
        }
        builder.append(getName());
        return builder.toString();
    }
611424
public static String getParent(String path) throws InvalidPathException {
    String cleanedPath = cleanPath(path);
    String name = FilenameUtils.getName(cleanedPath);
    String parent = cleanedPath.substring(0, cleanedPath.length() - name.length() - 1);
    if (parent.isEmpty()) {
      // The parent is the root path.
      return AlluxioURI.SEPARATOR;
    }
    return parent;
  }
789821
public DocumentPath parent() {
    if (pathElements.size() <= 1) {
      return null;
    }
    return new DocumentPath(this.pathElements.subList(0, pathElements.size() - 1));
  }
319157
def full_path(self):
        ''''''
        with self._mutex:
            if self._parent:
                return self._parent.full_path + [self._name]
            else:
                return [self._name]
1325342
function getComponentName (componentPath) {
  if (!componentPath) {
    return null
  }
  let component = COMPONENTS.find(({ path }) => {
    path = normalize(path)
    return path === componentPath || path.split('.')[0] === componentPath
  })

  return component ? component.name : null
}
1299424
function path(properties, options) {
  if (!properties) return;
  var str = properties.path;
  if (options.includeSearch && properties.search) str += properties.search;
  return str;
}
196435
public String getParentXPath() {
        Iterator<Level> levelIterator = path.descendingIterator();
        if (levelIterator.hasNext()) {
            levelIterator.next();
        }
        return getXPath(levelIterator);
    }