Class HelpModuleCollection

java.lang.Object
help.validator.location.HelpModuleCollection
All Implemented Interfaces:
TOCItemProvider

public class HelpModuleCollection extends 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 Details

    • fromHelpDirectory

      public static HelpModuleCollection fromHelpDirectory(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(Collection<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(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 Collection<Path> getHelpRoots()
    • getDuplicateAnchorsByFile

      public Map<HelpFile,Map<String,List<AnchorDefinition>>> getDuplicateAnchorsByFile()
    • getDuplicateAnchorsByTopic

      public Map<HelpTopic,List<AnchorDefinition>> getDuplicateAnchorsByTopic()
    • getAllHREFs

      public Collection<HREF> getAllHREFs()
    • getAllIMGs

      public Collection<IMG> getAllIMGs()
    • getAllAnchorDefinitions

      public Collection<AnchorDefinition> getAllAnchorDefinitions()
    • getAnchorDefinition

      public AnchorDefinition getAnchorDefinition(Path target)
    • getHelpFile

      public HelpFile getHelpFile(Path helpPath)
    • getTocDefinitionsByID

      public Map<String,TOCItemDefinition> getTocDefinitionsByID()
      Description copied from interface: TOCItemProvider
      Returns all TOC items defined by this provider
      Specified by:
      getTocDefinitionsByID in interface TOCItemProvider
      Returns:
      the items
    • getExternalTocItemsById

      public Map<String,TOCItemExternal> getExternalTocItemsById()
      Description copied from interface: TOCItemProvider
      Returns all external TOC items referenced by this provider
      Specified by:
      getExternalTocItemsById in interface TOCItemProvider
      Returns:
      the items
    • getInputTOCItems

      public 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 Collection<HREF> getTOC_HREFs()
    • toString

      public String toString()
      Overrides:
      toString in class Object