org.gedcomx.build.enunciate
Class GedcomxDeploymentModule

java.lang.Object
  extended by org.codehaus.enunciate.modules.BasicDeploymentModule
      extended by org.codehaus.enunciate.modules.FreemarkerDeploymentModule
          extended by org.gedcomx.build.enunciate.GedcomxDeploymentModule
All Implemented Interfaces:
org.codehaus.enunciate.apt.EnunciateModelAware, org.codehaus.enunciate.modules.DeploymentModule, org.codehaus.enunciate.modules.DocumentationAwareModule, org.codehaus.enunciate.modules.ProjectTitleAware

public class GedcomxDeploymentModule
extends org.codehaus.enunciate.modules.FreemarkerDeploymentModule
implements org.codehaus.enunciate.modules.DocumentationAwareModule

The GEDCOM X deployment module handles the generation of the GEDCOM X documentation, validates common patterns, and supplies needed metadata for the namespaces.

Author:
Ryan Heaton

Field Summary
 
Fields inherited from class org.codehaus.enunciate.modules.BasicDeploymentModule
enunciate
 
Constructor Summary
GedcomxDeploymentModule()
           
 
Method Summary
 void addPrimaryNav(String label, String href)
          Add a primary nav element.
protected  Set<org.codehaus.enunciate.main.Artifact> buildBase()
          Builds the base output directory.
protected  void doBuild()
           
 void doFreemarkerGenerate()
           
protected  Collection<org.codehaus.enunciate.contract.jaxb.RootElementDeclaration> gatherMediaTypeRoots(org.codehaus.enunciate.apt.EnunciateFreemarkerModel model)
           
 Map<String,String> getBaseProjectUris()
           
protected  URL getCodeTemplateURL()
           
 org.apache.commons.digester.RuleSet getConfigurationRules()
           
 String getDocsDir()
          The subdirectory in the web application where the documentation will be put.
protected  URL getDocsTemplateURL()
           
 String getIndexPageName()
          The name of the index page.
 String getName()
           
 int getOrder()
           
protected  URL getRDFSchemaTemplateURL()
           
 String getTitle()
          The title of the documentation.
 org.codehaus.enunciate.contract.validation.Validator getValidator()
           
 void init(org.codehaus.enunciate.main.Enunciate enunciate)
           
 void initModel(org.codehaus.enunciate.apt.EnunciateFreemarkerModel model)
           
 boolean isDisableProcessing()
          Whether to disable processing.
 void putProjectBase(String id, String uri)
           
 void setDisableProcessing(boolean disableProcessing)
          Whether to disable processing.
 void setDocsDir(String docsDir)
          The subdirectory in the web application where the documentation will be put.
 void setIndexPageName(String indexPageName)
          The name of the index page.
 void setProjectId(String projectId)
          The id of the GEDCOM X project to be built.
 void setProjectLabelModifier(String projectLabelModifier)
           
 void setStylesheet(String stylesheet)
           
 void setTitle(String title)
          The title of the documentation.
 void setTitleConditionally(String title)
          Set the title for this project iff it hasn't already been set.
 
Methods inherited from class org.codehaus.enunciate.modules.FreemarkerDeploymentModule
close, doGenerate, getConfiguration, getModel, getModelInternal, getObjectWrapper, getTemplateExceptionHandler, getTemplateLoader, processTemplate, processTemplate, processTemplate, processTemplate
 
Methods inherited from class org.codehaus.enunciate.modules.BasicDeploymentModule
debug, doCompile, doPackage, getAliases, getBuildDir, getCompileDir, getEnunciate, getGenerateDir, getPackageDir, info, isDisabled, setBuildDir, setCompileDir, setDisabled, setGenerateDir, setPackageDir, step, warn
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.codehaus.enunciate.modules.DeploymentModule
close, getAliases, isDisabled, step
 

Constructor Detail

GedcomxDeploymentModule

public GedcomxDeploymentModule()
Method Detail

getName

public String getName()
Specified by:
getName in interface org.codehaus.enunciate.modules.DeploymentModule
Overrides:
getName in class org.codehaus.enunciate.modules.BasicDeploymentModule
Returns:
"gedcomx"

getOrder

public int getOrder()
Specified by:
getOrder in interface org.codehaus.enunciate.modules.DeploymentModule
Overrides:
getOrder in class org.codehaus.enunciate.modules.BasicDeploymentModule
Returns:
100

getTitle

public String getTitle()
The title of the documentation.

Specified by:
getTitle in interface org.codehaus.enunciate.modules.DocumentationAwareModule
Returns:
The title of the documentation.

setTitle

public void setTitle(String title)
The title of the documentation.

Specified by:
setTitle in interface org.codehaus.enunciate.modules.DocumentationAwareModule
Parameters:
title - The title of the documentation.

setTitleConditionally

public void setTitleConditionally(String title)
Set the title for this project iff it hasn't already been set.

Specified by:
setTitleConditionally in interface org.codehaus.enunciate.modules.ProjectTitleAware
Parameters:
title - The title.

getDocsDir

public String getDocsDir()
The subdirectory in the web application where the documentation will be put.

Specified by:
getDocsDir in interface org.codehaus.enunciate.modules.DocumentationAwareModule
Returns:
The subdirectory in the web application where the documentation will be put.

getIndexPageName

public String getIndexPageName()
The name of the index page.

Specified by:
getIndexPageName in interface org.codehaus.enunciate.modules.DocumentationAwareModule
Returns:
The name of the index page.

setIndexPageName

public void setIndexPageName(String indexPageName)
The name of the index page.

Specified by:
setIndexPageName in interface org.codehaus.enunciate.modules.DocumentationAwareModule
Parameters:
indexPageName - The name of the index page.

setDocsDir

public void setDocsDir(String docsDir)
The subdirectory in the web application where the documentation will be put.

Specified by:
setDocsDir in interface org.codehaus.enunciate.modules.DocumentationAwareModule
Parameters:
docsDir - The subdirectory in the web application where the documentation will be put.

isDisableProcessing

public boolean isDisableProcessing()
Whether to disable processing.

Returns:
Whether to disable processing.

setDisableProcessing

public void setDisableProcessing(boolean disableProcessing)
Whether to disable processing.

Parameters:
disableProcessing - Whether to disable processing.

addPrimaryNav

public void addPrimaryNav(String label,
                          String href)
Add a primary nav element.

Parameters:
label - The label for the nav.
href - The href.

setProjectId

public void setProjectId(String projectId)
The id of the GEDCOM X project to be built.

Parameters:
projectId - The id of the GEDCOM X project to be built.

setProjectLabelModifier

public void setProjectLabelModifier(String projectLabelModifier)

setStylesheet

public void setStylesheet(String stylesheet)

getDocsTemplateURL

protected URL getDocsTemplateURL()

getCodeTemplateURL

protected URL getCodeTemplateURL()

getRDFSchemaTemplateURL

protected URL getRDFSchemaTemplateURL()

init

public void init(org.codehaus.enunciate.main.Enunciate enunciate)
          throws org.codehaus.enunciate.EnunciateException
Specified by:
init in interface org.codehaus.enunciate.modules.DeploymentModule
Overrides:
init in class org.codehaus.enunciate.modules.BasicDeploymentModule
Throws:
org.codehaus.enunciate.EnunciateException

initModel

public void initModel(org.codehaus.enunciate.apt.EnunciateFreemarkerModel model)
Specified by:
initModel in interface org.codehaus.enunciate.apt.EnunciateModelAware
Overrides:
initModel in class org.codehaus.enunciate.modules.FreemarkerDeploymentModule

gatherMediaTypeRoots

protected Collection<org.codehaus.enunciate.contract.jaxb.RootElementDeclaration> gatherMediaTypeRoots(org.codehaus.enunciate.apt.EnunciateFreemarkerModel model)

doFreemarkerGenerate

public void doFreemarkerGenerate()
                          throws org.codehaus.enunciate.EnunciateException,
                                 IOException,
                                 freemarker.template.TemplateException
Specified by:
doFreemarkerGenerate in class org.codehaus.enunciate.modules.FreemarkerDeploymentModule
Throws:
org.codehaus.enunciate.EnunciateException
IOException
freemarker.template.TemplateException

doBuild

protected void doBuild()
                throws org.codehaus.enunciate.EnunciateException,
                       IOException
Overrides:
doBuild in class org.codehaus.enunciate.modules.BasicDeploymentModule
Throws:
org.codehaus.enunciate.EnunciateException
IOException

buildBase

protected Set<org.codehaus.enunciate.main.Artifact> buildBase()
                                                       throws IOException
Builds the base output directory.

Returns:
The set of artifacts available for download.
Throws:
IOException

getValidator

public org.codehaus.enunciate.contract.validation.Validator getValidator()
Specified by:
getValidator in interface org.codehaus.enunciate.modules.DeploymentModule
Overrides:
getValidator in class org.codehaus.enunciate.modules.BasicDeploymentModule

getConfigurationRules

public org.apache.commons.digester.RuleSet getConfigurationRules()
Specified by:
getConfigurationRules in interface org.codehaus.enunciate.modules.DeploymentModule
Overrides:
getConfigurationRules in class org.codehaus.enunciate.modules.BasicDeploymentModule

getBaseProjectUris

public Map<String,String> getBaseProjectUris()

putProjectBase

public void putProjectBase(String id,
                           String uri)


Copyright © 2015. All rights reserved.