Class GenerationParameters

java.lang.Object
schema2template.GenerationParameters

public class GenerationParameters extends Object
  • Constructor Details

    • GenerationParameters

      public GenerationParameters()
    • GenerationParameters

      public GenerationParameters(String grammarVersion, String grammarID, String grammarPath, String grammarAdditionsPath, String mainTemplatePath, String targetDirPath)
      Parameters:
      grammarVersion - the version number of grammar
      grammarID - the ID label of the grammar (without the version)
      grammarPath - the path to the grammar file relative to the project base directory (of the calling pom.xml)
      grammarAdditionsPath - the path to the file with additional information to the grammar, e.g. ODF default values are listed in the ODF specificaiton
      mainTemplatePath - the path to the velocity file that maps the grammar to a list of velocity templates and their condition triggering them
      targetDirPath - the output directory of the generation (usually target/generated-sources/)
  • Method Details

    • getGrammarVersion

      public String getGrammarVersion()
      Returns:
      the version of the grammar. Helpful to document changes between versions in documentation
    • getGrammarID

      public String getGrammarID()
      Returns:
      the ID of the grammar file. For instance, in ODF there are different sub-modules like package manifest, digitial signature for package and the ODF schema.
    • getGrammarPath

      public String getGrammarPath()
      Returns:
      the path to the grammar file
    • getGrammarAdditionsPath

      public String getGrammarAdditionsPath()
      Returns:
      the path to the grammar-add-on file. This file holds erquired information in the specification but not in the XML grammar, e.g. default values (as they were inserted during load of the grammar by some XML parser and were blowing up the DOM. Another example for add-on information not in the grammar but in the specificaiton are the style families.
    • getMainTemplatePath

      public String getMainTemplatePath()
      Returns:
      the path to the grammar2template velocity file. It maps the grammar to a set of template files together with the condition and loops that triggering the data transformation!
    • getTargetDir

      public String getTargetDir()
      Returns:
      the path to the grammar2template velocity file.!