|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.maven.util.DVSLPathTool
Path tool for use with the DVSL toolbox. This class contains static methods to assist in determining path-related information such as relative paths.
Constructor Summary | |
DVSLPathTool()
|
Method Summary | |
static java.lang.String |
calculateLink(java.lang.String link,
java.lang.String relativePath)
Calculates the appropriate link given the preferred link and the relativePath of the document |
static java.lang.String |
getDirectoryComponent(java.lang.String filename)
Determines the directory component of a filename. |
static java.lang.String |
getRelativePath(java.lang.String filename)
Determines the relative path of a filename. |
static java.lang.String |
getRelativePath(java.lang.String basedir,
java.lang.String filename)
Determines the relative path of a filename from a base directory. |
(package private) static java.lang.String |
uppercaseDrive(java.lang.String path)
Cygwin prefers lowercase drive letters, but other parts of maven use uppercase |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DVSLPathTool()
Method Detail |
public static final java.lang.String getRelativePath(java.lang.String basedir, java.lang.String filename)
$relativePath
context variable. The arguments to
this method may contain either forward or backward slashes as
file separators. The relative path returned is formed using
forward slashes as it is expected this path is to be used as a
link in a web page (again mimicking Anakia's behavior).
This method is thread-safe.
basedir
- The base directory.filename
- The filename that is relative to the base
directory.
basedir
is null or zero-length,
or filename
is null or zero-length.public static final java.lang.String getRelativePath(java.lang.String filename)
$relativePath
context variable. The argument to
this method may contain either forward or backward slashes as
file separators. The relative path returned is formed using
forward slashes as it is expected this path is to be used as a
link in a web page (again mimicking Anakia's behavior).
This method is thread-safe.
filename
- The filename to be parsed.
filename
is null or zero-length.public static final java.lang.String getDirectoryComponent(java.lang.String filename)
$context.getAppValue("infilename")
to get the
current directory that is currently being processed.
This method is thread-safe.
filename
- The filename to be parsed.
filename
. If
the filename does not contain a directory component, "." is
returned.static final java.lang.String uppercaseDrive(java.lang.String path)
path
-
public static final java.lang.String calculateLink(java.lang.String link, java.lang.String relativePath)
link
- relativePath
-
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |