Class DirectoryIndexer


  • public class DirectoryIndexer
    extends java.lang.Object
    This class creates the navigational pages for jxr's cross-referenced source files. The navigation is inspired by javadoc, so it should have a familiar feel. Creates the following files:
    • index.html main index containing the frameset
    • overview-frame.html list of the project's packages (top left)
    • allclasses-frame.html list of all classes in the project (bottom left)
    • overview-summary.html top-level listing of the project's packages (main frame)
    • Package specific:
      • package-summary.html listing of all classes in this package (main frame)
      • package-frame.html listing of all classes in this package (bottom left)
    • Constructor Summary

      Constructors 
      Constructor Description
      DirectoryIndexer​(PackageManager packageManager, java.lang.String root)
      Constructor for the DirectoryIndexer object
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private void doVelocity​(java.lang.String templateName, java.lang.String outDir, org.apache.velocity.VelocityContext context, org.apache.velocity.app.VelocityEngine engine)  
      java.lang.String getBottom()
      Gets the footer for the navigation pages.
      java.lang.String getDocTitle()
      Gets the major page heading.
      java.lang.String getOutputEncoding()
      Gets the output encoding.
      (package private) DirectoryIndexer.ProjectInfo getProjectInfo()  
      java.lang.String getTemplateDir()
      Gets the template directory.
      java.lang.String getWindowTitle()
      Gets the window title.
      void process()
      Does the actual indexing.
      void setBottom​(java.lang.String bottom)
      Bottom is a footer for the navigation pages, usually a copyright.
      See the javadoc documentation for the property of the same name.
      void setDocTitle​(java.lang.String docTitle)
      docTitle is used as a page heading for the summary files.
      See the javadoc documentation for the property of the same name
      void setOutputEncoding​(java.lang.String outputEncoding)
      OutputEncoding is the encoding of output files.
      private void setProperties​(org.apache.velocity.app.VelocityEngine engine)  
      void setTemplateDir​(java.lang.String templateDir)
      templateDir is the location of the jelly template files used to generate the navigation pages.
      void setWindowTitle​(java.lang.String windowTitle)
      windowTitle is used in the output's <title> tags see the javadoc documentation for the property of the same name
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • root

        private java.lang.String root
      • outputEncoding

        private java.lang.String outputEncoding
      • templateDir

        private java.lang.String templateDir
      • windowTitle

        private java.lang.String windowTitle
      • docTitle

        private java.lang.String docTitle
      • bottom

        private java.lang.String bottom
    • Constructor Detail

      • DirectoryIndexer

        public DirectoryIndexer​(PackageManager packageManager,
                                java.lang.String root)
        Constructor for the DirectoryIndexer object
        Parameters:
        packageManager - PackageManager for this project
        root - Path of the root output directory
    • Method Detail

      • setOutputEncoding

        public void setOutputEncoding​(java.lang.String outputEncoding)
        OutputEncoding is the encoding of output files.
        Parameters:
        outputEncoding - output encoding
      • getOutputEncoding

        public java.lang.String getOutputEncoding()
        Gets the output encoding.
        Returns:
        output encoding
      • setTemplateDir

        public void setTemplateDir​(java.lang.String templateDir)
        templateDir is the location of the jelly template files used to generate the navigation pages.
        Parameters:
        templateDir - location of the template directory
      • getTemplateDir

        public java.lang.String getTemplateDir()
        Gets the template directory.
        Returns:
        location of the template directory
      • setWindowTitle

        public void setWindowTitle​(java.lang.String windowTitle)
        windowTitle is used in the output's <title> tags see the javadoc documentation for the property of the same name
        Parameters:
        windowTitle - the <title> attribute
      • getWindowTitle

        public java.lang.String getWindowTitle()
        Gets the window title.
        Returns:
        window title
      • setDocTitle

        public void setDocTitle​(java.lang.String docTitle)
        docTitle is used as a page heading for the summary files.
        See the javadoc documentation for the property of the same name
        Parameters:
        docTitle - major page heading
      • getDocTitle

        public java.lang.String getDocTitle()
        Gets the major page heading.
        Returns:
        major page heading
      • setBottom

        public void setBottom​(java.lang.String bottom)
        Bottom is a footer for the navigation pages, usually a copyright.
        See the javadoc documentation for the property of the same name.
        Parameters:
        bottom - page footer
      • getBottom

        public java.lang.String getBottom()
        Gets the footer for the navigation pages.
        Returns:
        bottom page footer
      • process

        public void process()
                     throws JxrException
        Does the actual indexing.
        Throws:
        JxrException - If something went wrong
      • setProperties

        private void setProperties​(org.apache.velocity.app.VelocityEngine engine)
      • doVelocity

        private void doVelocity​(java.lang.String templateName,
                                java.lang.String outDir,
                                org.apache.velocity.VelocityContext context,
                                org.apache.velocity.app.VelocityEngine engine)
                         throws JxrException
        Throws:
        JxrException