alma::tools::entitybuilder::CastorBuilder Class Reference
List of all members.
Public Member Functions |
| void | run0 (String[] args, String configFileConcat) throws BindingException, FileNotFoundException |
| void | run (File schemaDir, File primaryConfigFile, List< String > otherConfigFileNames, List< File > includeDirs, File javaOutputDir) throws BindingException, FileNotFoundException |
Static Public Member Functions |
| static void | main (String[] args) |
Private Member Functions |
| void | generate (SourceGenerator sgen, File schemaFile, String packageName) throws FileNotFoundException |
Detailed Description
Generates Java binding classes from xml schema files using the Castor generator framework. Needs at least one configuration file for the mapping from xml namespaces to Java packages.
Member Function Documentation
| void alma::tools::entitybuilder::CastorBuilder::generate |
( |
SourceGenerator |
sgen, |
|
|
File |
schemaFile, |
|
|
String |
packageName | |
|
) |
| | throws FileNotFoundException [inline, private] |
| static void alma::tools::entitybuilder::CastorBuilder::main |
( |
String[] |
args |
) |
[inline, static] |
- Parameters:
-
| args | args[0]: xml config file (with path) complying to EntitybuilderSettings.xsd; for the schemas that need code generation;
args[1]: output directory under which the generated Java files will be put.
args[2..n]: -I schemaIncludeDirectory (optional) |
References run0().
| void alma::tools::entitybuilder::CastorBuilder::run |
( |
File |
schemaDir, |
|
|
File |
primaryConfigFile, |
|
|
List< String > |
otherConfigFileNames, |
|
|
List< File > |
includeDirs, |
|
|
File |
javaOutputDir | |
|
) |
| | throws BindingException, FileNotFoundException [inline] |
Runs the Castor code generator.
- Parameters:
-
| schemaDir | (base) directory where the xsd files are, for which code will be generated. |
| primaryConfigFile | config file for the schema code generation. Currently must be in the directory schemaDir. |
| otherConfigFileNames | Names without paths of schema code generation config files. While primaryConfigFile must contain the information for the schemas to compile directly, these config files have similar information for other schemas which are included by the "primary" schemas. This data is needed to generate correct Java packages of already existing binding classes. |
| includeDirs | directories from which other xsd files or config files should be included, with preference to directories that appear first in case of multiple occurences of the same file. |
| javaOutputDir | root directory under which the generated Java binding classes will be put |
- Exceptions:
-
References generate(), alma::tools::entitybuilder::EntitybuilderConfig::getAllNamespaces(), alma::tools::entitybuilder::EntitybuilderConfig::getAllSchemaFiles(), alma::tools::entitybuilder::XsdFileFinder::getAllXsdConfigFiles(), alma::tools::entitybuilder::EntitybuilderConfig::getJPackageForNamespace(), alma::tools::entitybuilder::EntitybuilderConfig::getJPackageForSchema(), alma::tools::entitybuilder::EntitybuilderConfig::getPrimarySchemaFiles(), alma::tools::entitybuilder::EntitybuilderConfig::getSchemaName2File(), alma::tools::entitybuilder::EntitybuilderConfig::load(), and alma::tools::entitybuilder::XsdFileFinder::setVerbose().
Referenced by alma::tools::entitybuilder::CastorBuilderTest::_testBuildFromSchema(), run0(), and alma::tools::entitybuilder::CastorBuilderTest::testBuildFromSchemaInOtherDir().
| void alma::tools::entitybuilder::CastorBuilder::run0 |
( |
String[] |
args, |
|
|
String |
configFileConcat | |
|
) |
| | throws BindingException, FileNotFoundException [inline] |
Parses the arguments given to main and then hands over control to method run.
- Parameters:
-
| args | as in main |
| configFileConcat | space-separated list of xsd binding config files for included schemas. |
- Exceptions:
-
References run().
Referenced by main().
The documentation for this class was generated from the following file: