Package help
Class HelpBuildUtils
java.lang.Object
help.HelpBuildUtils
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic interface -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcleanupHelpFileLinks(Path helpFile) static PathcreateReferencePath(URI fileURI) static voidstatic Pathstatic PathgetHelpTopicDir(Path file) Returns a file object that is the help topic directory for the given file.static PathgetRoot(Collection<Path> roots, Path file) static booleanReturns true if the given String represents a remote resourcestatic booleanReturns true if the given URI represents a remote resourcestatic booleanReturns true if the given Path represents a remote resourcestatic ImageLocationlocateImageReference(Path sourceFile, String ref) Turn an HTML IMG reference into a location object that has resolved path info.static PathlocateReference(Path sourceFile, String ref) Turn an HTML HREF reference into an absolute path.static Pathrelativize(Path parent, Path child) static Pathstatic PathtoDefaultFS(Path path) static Pathstatic HelpModuleLocationtoLocation(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
-