Package help
Class HelpBuildUtils
java.lang.Object
help.HelpBuildUtils
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static interface
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic void
cleanupHelpFileLinks
(Path helpFile) static Path
createReferencePath
(URI fileURI) static void
static Path
static Path
getHelpTopicDir
(Path file) Returns a file object that is the help topic directory for the given file.static Path
getRoot
(Collection<Path> roots, Path file) static boolean
Returns true if the given String represents a remote resourcestatic boolean
Returns true if the given URI represents a remote resourcestatic boolean
Returns true if the given Path represents a remote resourcestatic ImageLocation
locateImageReference
(Path sourceFile, String ref) Turn an HTML IMG reference into a location object that has resolved path info.static Path
locateReference
(Path sourceFile, String ref) Turn an HTML HREF reference into an absolute path.static Path
relativize
(Path parent, Path child) static Path
static Path
toDefaultFS
(Path path) static Path
static HelpModuleLocation
toLocation
(File file)
-
Field Details
-
debug
public static boolean debug
-
-
Method Details
-
toLocation
-
getRoot
-
getHelpTopicDir
Returns a file object that is the help topic directory for the given file. This method is useful for finding the help topic directory when the given file doesn't live directly under a help topic. -
getFile
-
relativizeWithHelpTopics
-
relativize
-
cleanupHelpFileLinks
- Throws:
IOException
-
debug
-
toDefaultFS
-
toFS
-
createReferencePath
-
isRemote
Returns true if the given String represents a remote resource- Parameters:
uriString
- the URI to test- Returns:
- true if the given String represents a remote resource
-
isRemote
Returns true if the given Path represents a remote resource- Parameters:
path
- the path- Returns:
- true if the given Path represents a remote resource
-
isRemote
Returns true if the given URI represents a remote resource- Parameters:
uri
- the URI- Returns:
- true if the given URI represents a remote resource
-
locateImageReference
public static ImageLocation locateImageReference(Path sourceFile, String ref) throws URISyntaxException Turn an HTML IMG reference into a location object that has resolved path info. This will locate files based upon relative references, specialized help system references (i.e., help/topics/...), and absolute URLs.- Parameters:
sourceFile
- the source file path of the image referenceref
- the reference text- Returns:
- an absolute path; null if the URI is remote
- Throws:
URISyntaxException
-
locateReference
Turn an HTML HREF reference into an absolute path. This will locate files based upon relative references, specialized help system references (i.e., help/topics/...), and absolute URLs.- Parameters:
ref
- the reference text- Returns:
- an absolute path; null if the URI is remote
- Throws:
URISyntaxException
-