public class CrawlableDatasetUtils
extends java.lang.Object
Constructor and Description |
---|
CrawlableDatasetUtils() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
getPath(java.lang.String[] pathSegments) |
static java.lang.String[] |
getPathSegments(java.lang.String path)
Split a path into segments, handles null as empty string.
|
static boolean |
isValidAbsolutePath(java.lang.String[] pathSegments) |
static boolean |
isValidRelativePath(java.lang.String[] pathSegments) |
static java.lang.String |
stepDownRelativePath(java.lang.String[] pathSegments)
Given a relative path as an array of path segments (see
getPathSegments(String) ,
return the path relative to the first path segment. |
static java.lang.String |
toStringForPathSegments(java.lang.String path) |
static java.lang.String |
toStringForPathSegments(java.lang.String[] pathSegments) |
public static java.lang.String[] getPathSegments(java.lang.String path)
path
- the path to split.public static java.lang.String getPath(java.lang.String[] pathSegments)
public static boolean isValidAbsolutePath(java.lang.String[] pathSegments)
public static boolean isValidRelativePath(java.lang.String[] pathSegments)
public static java.lang.String stepDownRelativePath(java.lang.String[] pathSegments)
getPathSegments(String)
,
return the path relative to the first path segment.
I.e., drop the first segmentRejoin the given path segments after dropping the first path segment.pathSegments
- a string array of a relative path as returned by getPathSegments()public static java.lang.String toStringForPathSegments(java.lang.String[] pathSegments)
public static java.lang.String toStringForPathSegments(java.lang.String path)