/** * Constructs a path from an URI * * @param uri URI to create path from. */ public GridGgfsPath(URI uri) { A.notNull(uri, "uri"); path = normalizePath(uri.getPath()); }
/** * Constructs a path from the URI string. * * @param path URI string. */ public GridGgfsPath(String path) { A.ensure(!F.isEmpty(path), "'path' is null or empty"); this.path = normalizePath(path); }
/** * Resolve a child path against a parent path. * * @param parentPath Parent path. * @param childPath Child path. */ public GridGgfsPath(GridGgfsPath parentPath, String childPath) { A.notNull(parentPath, "parentPath"); String path = GridFilenameUtils.concat(parentPath.path, childPath); if (F.isEmpty(path)) throw new IllegalArgumentException("Failed to parse path" + " [parent=" + parentPath + ", childPath=" + childPath + ']'); this.path = normalizePath(path); }