Class 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 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
      • 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)
      • 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 class java.lang.Object