Package org.apache.maven.jxr
Class DirectoryIndexer
- java.lang.Object
-
- org.apache.maven.jxr.DirectoryIndexer
-
public class DirectoryIndexer extends java.lang.ObjectThis 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.htmlmain index containing the framesetoverview-frame.htmllist of the project's packages (top left)allclasses-frame.htmllist of all classes in the project (bottom left)overview-summary.htmltop-level listing of the project's packages (main frame)-
Package specific:
package-summary.htmllisting of all classes in this package (main frame)package-frame.htmllisting of all classes in this package (bottom left)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDirectoryIndexer.ClassInfoHolds class informationstatic classDirectoryIndexer.PackageInfostatic classDirectoryIndexer.ProjectInfo
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Stringbottomprivate java.lang.StringdocTitle(package private) static java.lang.StringINDEXprivate java.lang.StringoutputEncodingprivate PackageManagerpackageManagerprivate java.lang.Stringrootprivate java.lang.StringtemplateDirprivate java.lang.StringwindowTitle
-
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 voiddoVelocity(java.lang.String templateName, java.lang.String outDir, org.apache.velocity.VelocityContext context, org.apache.velocity.app.VelocityEngine engine)java.lang.StringgetBottom()Gets the footer for the navigation pages.java.lang.StringgetDocTitle()Gets the major page heading.java.lang.StringgetOutputEncoding()Gets the output encoding.(package private) DirectoryIndexer.ProjectInfogetProjectInfo()java.lang.StringgetTemplateDir()Gets the template directory.java.lang.StringgetWindowTitle()Gets the window title.voidprocess()Does the actual indexing.voidsetBottom(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.voidsetDocTitle(java.lang.String docTitle)docTitleis used as a page heading for the summary files.
See the javadoc documentation for the property of the same namevoidsetOutputEncoding(java.lang.String outputEncoding)OutputEncoding is the encoding of output files.private voidsetProperties(org.apache.velocity.app.VelocityEngine engine)voidsetTemplateDir(java.lang.String templateDir)templateDiris the location of the jelly template files used to generate the navigation pages.voidsetWindowTitle(java.lang.String windowTitle)windowTitleis used in the output's <title> tags see the javadoc documentation for the property of the same name
-
-
-
Field Detail
-
INDEX
static final java.lang.String INDEX
- See Also:
- Constant Field Values
-
root
private java.lang.String root
-
packageManager
private PackageManager packageManager
-
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 projectroot- 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)
templateDiris 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)
windowTitleis 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)
docTitleis 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 JxrExceptionDoes 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
-
getProjectInfo
DirectoryIndexer.ProjectInfo getProjectInfo()
-
-