Package help.validator.location
Class HelpModuleCollection
- java.lang.Object
-
- help.validator.location.HelpModuleCollection
-
- All Implemented Interfaces:
TOCItemProvider
public class HelpModuleCollection extends java.lang.Object implements TOCItemProvider
A class that is meant to hold a single help input directory and 0 or more external, pre-built help sources (i.e., jar file or directory).Note Note Note This class is a bit conceptually muddled. Our build system is reflected in this class in that we currently build one help module at a time. Thus, any dependencies of that module being built can be passed into this "collection" at build time. We used to build multiple help modules at once, resolving dependencies for all of the input modules after we built each module. This class will need to be tweaked in order to go back to a build system with multiple input builds.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
containsHelpFiles()
static HelpModuleCollection
fromFiles(java.util.Collection<java.io.File> files)
Creates a help module collection that assumes zero or more pre-built help jar files and one help directory that is an input into the help building process.static HelpModuleCollection
fromHelpDirectory(java.io.File dir)
Creates a help module collection that contains only a singe help module from a help directory, not a pre-built help jar.static HelpModuleCollection
fromHelpLocations(java.util.Collection<HelpModuleLocation> locations)
Creates a help module collection that assumes zero or more pre-built help jar files and one help directory that is an input into the help building process.java.util.Collection<AnchorDefinition>
getAllAnchorDefinitions()
java.util.Collection<HREF>
getAllHREFs()
java.util.Collection<IMG>
getAllIMGs()
AnchorDefinition
getAnchorDefinition(java.nio.file.Path target)
java.util.Map<HelpFile,java.util.Map<java.lang.String,java.util.List<AnchorDefinition>>>
getDuplicateAnchorsByFile()
java.util.Map<HelpTopic,java.util.List<AnchorDefinition>>
getDuplicateAnchorsByTopic()
java.util.Map<java.lang.String,TOCItemExternal>
getExternalTocItemsById()
Returns all external TOC items referenced by this providerHelpFile
getHelpFile(java.nio.file.Path helpPath)
java.util.Collection<java.nio.file.Path>
getHelpRoots()
java.util.Collection<TOCItem>
getInputTOCItems()
Input TOC items are those that we are building for the input help module of this collectionGhidraTOCFile
getSourceTOCFile()
java.util.Collection<HREF>
getTOC_HREFs()
java.util.Map<java.lang.String,TOCItemDefinition>
getTocDefinitionsByID()
Returns all TOC items defined by this providerjava.lang.String
toString()
-
-
-
Method Detail
-
fromHelpDirectory
public static HelpModuleCollection fromHelpDirectory(java.io.File dir)
Creates a help module collection that contains only a singe help module from a help directory, not a pre-built help jar.- Parameters:
dir
- the directory containing help- Returns:
- the help collection
-
fromFiles
public static HelpModuleCollection fromFiles(java.util.Collection<java.io.File> files)
Creates a help module collection that assumes zero or more pre-built help jar files and one help directory that is an input into the help building process.- Parameters:
files
- the files from which to get help- Returns:
- the help collection
-
fromHelpLocations
public static HelpModuleCollection fromHelpLocations(java.util.Collection<HelpModuleLocation> locations)
Creates a help module collection that assumes zero or more pre-built help jar files and one help directory that is an input into the help building process.- Parameters:
locations
- the locations from which to get help- Returns:
- the help collection
-
getSourceTOCFile
public GhidraTOCFile getSourceTOCFile()
-
containsHelpFiles
public boolean containsHelpFiles()
-
getHelpRoots
public java.util.Collection<java.nio.file.Path> getHelpRoots()
-
getDuplicateAnchorsByFile
public java.util.Map<HelpFile,java.util.Map<java.lang.String,java.util.List<AnchorDefinition>>> getDuplicateAnchorsByFile()
-
getDuplicateAnchorsByTopic
public java.util.Map<HelpTopic,java.util.List<AnchorDefinition>> getDuplicateAnchorsByTopic()
-
getAllHREFs
public java.util.Collection<HREF> getAllHREFs()
-
getAllIMGs
public java.util.Collection<IMG> getAllIMGs()
-
getAllAnchorDefinitions
public java.util.Collection<AnchorDefinition> getAllAnchorDefinitions()
-
getAnchorDefinition
public AnchorDefinition getAnchorDefinition(java.nio.file.Path target)
-
getHelpFile
public HelpFile getHelpFile(java.nio.file.Path helpPath)
-
getTocDefinitionsByID
public java.util.Map<java.lang.String,TOCItemDefinition> getTocDefinitionsByID()
Description copied from interface:TOCItemProvider
Returns all TOC items defined by this provider- Specified by:
getTocDefinitionsByID
in interfaceTOCItemProvider
- Returns:
- the items
-
getExternalTocItemsById
public java.util.Map<java.lang.String,TOCItemExternal> getExternalTocItemsById()
Description copied from interface:TOCItemProvider
Returns all external TOC items referenced by this provider- Specified by:
getExternalTocItemsById
in interfaceTOCItemProvider
- Returns:
- the items
-
getInputTOCItems
public java.util.Collection<TOCItem> getInputTOCItems()
Input TOC items are those that we are building for the input help module of this collection- Returns:
- the items
-
getTOC_HREFs
public java.util.Collection<HREF> getTOC_HREFs()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-