org.hibernate.tool.hbm2x
Class DocExporter

java.lang.Object
  extended by org.hibernate.tool.hbm2x.AbstractExporter
      extended by org.hibernate.tool.hbm2x.DocExporter
All Implemented Interfaces:
Exporter

public class DocExporter
extends AbstractExporter

Exporter implementation that creates Hibernate Documentation. Creates Tables and Classes Details

Author:
Ricardo C. Moral, Amit Bhayani

Field Summary
static boolean IS_LINUX
           
static String OS_NAME
           
 
Fields inherited from class org.hibernate.tool.hbm2x.AbstractExporter
log, templatePaths
 
Constructor Summary
DocExporter()
           
DocExporter(org.hibernate.cfg.Configuration cfg, File outputdir)
          Creates a new object.
 
Method Summary
 void doStart()
           
 void generateCommmonAndAssets()
          Generate common files and copy assets.
 void generateEntitiesAllEntitiesList()
          Generates the html file containing list of classes (allclases.html)
 void generateEntitiesAllPackagesList()
          Generates the html file containig list of packages (allpackages.html)
 void generateEntitiesDetails()
          generates one html file for each class containing detail information of class
 void generateEntitiesIndex()
          Generate the index file of the class documentation
 void generateEntitiesPackageDetailedInfo()
          Generates the html file containing list of classes and interfaces for given package
 void generateEntitiesPackageEntityList()
          generates the list of classes sepcific to package
 void generatePackageSummary(boolean graphsGenerated)
          Generate summary (summaty.html) to show all the packages
 void generateTablesAllSchemasList()
          Generate a file with a list of all the schemas in the configuration.
 void generateTablesAllTablesList()
          Generate a file with a list of all the tables in the configuration.
 void generateTablesDetails()
          Generate one file per table with detail information.
 void generateTablesIndex()
          Generate the index file of the table documentation.
 void generateTablesSchemaDetailedInfo()
          Generate two files per schema.
 void generateTablesSchemaTableList()
           
 void generateTablesSummary(boolean graphsGenerated)
          Generate a file with an summary of all the tables.
 String getName()
           
protected  void processTemplate(Map parameters, String templateName, File outputFile)
          Run templates.
protected  void setupContext()
          Setup the context variables used by the exporter.
 
Methods inherited from class org.hibernate.tool.hbm2x.AbstractExporter
cleanUpContext, getArtifactCollector, getCfg2HbmTool, getCfg2JavaTool, getConfiguration, getFileForClassName, getOutputDirectory, getProperties, getTemplateHelper, getTemplatePath, getTemplatePaths, setArtifactCollector, setConfiguration, setOutputDirectory, setProperties, setTemplateHelper, setTemplatePath, setupTemplates, start
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OS_NAME

public static final String OS_NAME

IS_LINUX

public static final boolean IS_LINUX
Constructor Detail

DocExporter

public DocExporter(org.hibernate.cfg.Configuration cfg,
                   File outputdir)
Creates a new object.

Parameters:
cfg - hibernate configuration.
outputdir - the output directory.
templatePaths - the template paths.

DocExporter

public DocExporter()
Method Detail

doStart

public void doStart()
             throws ExporterException
Specified by:
doStart in class AbstractExporter
Throws:
ExporterException

setupContext

protected void setupContext()
Description copied from class: AbstractExporter
Setup the context variables used by the exporter. Subclasses should call super.setupContext() to ensure all needed variables are in the context.

Overrides:
setupContext in class AbstractExporter

generateCommmonAndAssets

public void generateCommmonAndAssets()
Generate common files and copy assets.


generateTablesIndex

public void generateTablesIndex()
Generate the index file of the table documentation.


generateEntitiesIndex

public void generateEntitiesIndex()
Generate the index file of the class documentation


generateTablesSummary

public void generateTablesSummary(boolean graphsGenerated)
Generate a file with an summary of all the tables.

Parameters:
graphsGenerated -

generatePackageSummary

public void generatePackageSummary(boolean graphsGenerated)
Generate summary (summaty.html) to show all the packages


generateTablesDetails

public void generateTablesDetails()
Generate one file per table with detail information.


generateEntitiesDetails

public void generateEntitiesDetails()
generates one html file for each class containing detail information of class


generateEntitiesAllPackagesList

public void generateEntitiesAllPackagesList()
Generates the html file containig list of packages (allpackages.html)


generateEntitiesAllEntitiesList

public void generateEntitiesAllEntitiesList()
Generates the html file containing list of classes (allclases.html)


generateEntitiesPackageEntityList

public void generateEntitiesPackageEntityList()
generates the list of classes sepcific to package


generateEntitiesPackageDetailedInfo

public void generateEntitiesPackageDetailedInfo()
Generates the html file containing list of classes and interfaces for given package


generateTablesAllSchemasList

public void generateTablesAllSchemasList()
Generate a file with a list of all the schemas in the configuration.


generateTablesAllTablesList

public void generateTablesAllTablesList()
Generate a file with a list of all the tables in the configuration.


generateTablesSchemaTableList

public void generateTablesSchemaTableList()

generateTablesSchemaDetailedInfo

public void generateTablesSchemaDetailedInfo()
Generate two files per schema. One with a summary of the tables in the schema and another one with a list of tables.


processTemplate

protected void processTemplate(Map parameters,
                               String templateName,
                               File outputFile)
Run templates.

Parameters:
parameters - the parameters to pass to the templates template.
templateName - the template to use.
outputFile - the output file.

getName

public String getName()
Overrides:
getName in class AbstractExporter