org.unitils.dbmaintainer.structure.impl
Class XsdDataSetStructureGenerator
java.lang.Object
org.unitils.dbmaintainer.util.BaseDatabaseAccessor
org.unitils.dbmaintainer.structure.impl.XsdDataSetStructureGenerator
- All Implemented Interfaces:
- DataSetStructureGenerator, DatabaseAccessing
public class XsdDataSetStructureGenerator
- extends BaseDatabaseAccessor
- implements DataSetStructureGenerator
Implementation of DataSetStructureGenerator
that generates xml schema files for data sets.
This will generate an xsd for each configured database schema. Each database schema will be described in an xsd named
'schema_name'.xsd. A general dataset.xsd will also be generated. This xsd refers to the database schema specific xsds.
- Author:
- Tim Ducheyne, Filip Neven
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PROPKEY_XSD_DIR_NAME
public static final String PROPKEY_XSD_DIR_NAME
- See Also:
- Constant Field Values
PROPKEY_XSD_COMPLEX_TYPE_SUFFIX
public static final String PROPKEY_XSD_COMPLEX_TYPE_SUFFIX
- See Also:
- Constant Field Values
XsdDataSetStructureGenerator
public XsdDataSetStructureGenerator()
doInit
protected void doInit(Properties configuration)
- Initializes the generator.
- Overrides:
doInit
in class BaseDatabaseAccessor
- Parameters:
configuration
- The config, not null
generateDataSetStructure
public void generateDataSetStructure()
- Generates the XSDs, and writes them to the target directory specified by the property
PROPKEY_XSD_DIR_NAME
.
- Specified by:
generateDataSetStructure
in interface DataSetStructureGenerator
generateDataSetXsd
protected void generateDataSetXsd(File xsdDirectory)
- Generates a general dataset xsd that will refer to database schema specific dataset XSDs.
- Parameters:
xsdDirectory
- The target directory, not null
generateDatabaseSchemaXsd
protected void generateDatabaseSchemaXsd(DbSupport dbSupport,
File xsdDirectory)
- Generates an XSD for the database schema of the given db support.
- Parameters:
dbSupport
- The db support, not nullxsdDirectory
- The target directory, not null
Copyright © 2011. All Rights Reserved.