Package schema2template
Class GenerationParameters
java.lang.Object
schema2template.GenerationParameters
-
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 grammargrammarID
- 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 specificaitonmainTemplatePath
- the path to the velocity file that maps the grammar to a list of velocity templates and their condition triggering themtargetDirPath
- the output directory of the generation (usually target/generated-sources/)
-
-
Method Details
-
getGrammarVersion
- Returns:
- the version of the grammar. Helpful to document changes between versions in documentation
-
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
- Returns:
- the path to the grammar file
-
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
- 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
- Returns:
- the path to the grammar2template velocity file.!
-