Public Member Functions | Static Public Member Functions

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)

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

static void alma.tools.entitybuilder.CastorBuilder.main ( String[]  args  )  [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 alma.tools.entitybuilder.CastorBuilder.run0().

void alma.tools.entitybuilder.CastorBuilder.run ( File  schemaDir,
File  primaryConfigFile,
List< String >  otherConfigFileNames,
List< File >  includeDirs,
File  javaOutputDir 
) throws BindingException, FileNotFoundException

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:
BindingException 
FileNotFoundException 

References 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(), org.exolab.castor.builder.BuilderConfiguration.setClassDescFieldNames(), org.exolab.castor.builder.SourceGenerator.setCreateMarshalMethods(), org.exolab.castor.builder.SourceGenerator.setDescriptorCreation(), org.exolab.castor.builder.SourceGenerator.setDestDir(), org.exolab.castor.builder.BuilderConfiguration.setEqualsMethod(), org.exolab.castor.builder.SourceGenerator.setLineSeparator(), org.exolab.castor.builder.BuilderConfiguration.setLocationPackageMapping(), org.exolab.castor.builder.BuilderConfiguration.setNamespacePackageMapping(), org.exolab.castor.builder.BuilderConfiguration.setPrimitiveWrapper(), org.exolab.castor.builder.SourceGenerator.setSuppressNonFatalWarnings(), org.exolab.castor.builder.SourceGenerator.setTestable(), org.exolab.castor.builder.SourceGenerator.setVerbose(), and alma.tools.entitybuilder.XsdFileFinder.setVerbose().

Referenced by alma.tools.entitybuilder.CastorBuilder.run0().

void alma.tools.entitybuilder.CastorBuilder.run0 ( String[]  args,
String  configFileConcat 
) throws BindingException, FileNotFoundException

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:
BindingException 
FileNotFoundException 

References alma.tools.entitybuilder.CastorBuilder.run().

Referenced by alma.tools.entitybuilder.CastorBuilder.main().


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations Properties