Package com.orchestranetworks.addon.dex.common.generation
Classes and interfaces used to generate tables, fields and mappings for the XML and SQL import, export and transfer data services.
Generating EBX® tables
Set<Path> sourceTablePaths = new LinkedHashSet<Path>(); sourceTablePaths.add(Path.parse("/root/Libraries")); sourceTablePaths.add(Path.parse("/root/Courses")); EBXTableGeneration genTable = TableGenerationFactory.getEBXTableGeneration(); TableGenerationResult<EBXField, EBXTable> genTableResult = genTable.generateTables(sourceDataset, sourceTablePaths, session);
When tables are declared in the {addon.label} configuration, you can create EBX® tables by using EBXTableHelper
.
EBXTableHelperSpec tableHelperSpec = new EBXTableHelperSpec(applicationLogicalName,currentDataset,session); EBXTableHelper tableHelper = TableHelperFactory.getEBXTableHelper(); List<EBXTable> ebxTables = tableHelper.getTables(tableHelperSpec);
Generating an XML table
Set<Path> sourceTablePaths = new LinkedHashSet<Path>(); sourceTablePaths.add(Path.parse("/root/Libraries")); TableGenerationResult<XMLField, XMLTable> genTableResult = TableGenerationFactory .getXMLTableGeneration() .generateTables(currentDataset, sourceTablePaths, session);
When tables are declared in the {addon.label} configuration, you can create XML tables by using XMLTableHelper
.
XMLTableHelperSpec tableHelperSpec = new XMLTableHelperSpec(applicationLogicalName, true, session); XMLTableHelper tableHelper = TableHelperFactory.getXMLTableHelper(); List<XMLTable> xmlTables = tableHelper.getTables(tableHelperSpec);
Generating an SQL table
When using the Import SQL service:
Set<String> sqlTableNames = new LinkedHashSet<String>(); sqlTableNames.add("LIBRARIES"); SQLTableGeneration sqlTableGen = TableGenerationFactory.getSQLTableGeneration(); TableGenerationResult<SQLField, SQLTable> genTableResult = sqlTableGen .generateTables( sqlImportConfig.getSQLDataSourceName(), sqlImportConfig.getSchemaName(), null, sqlTableNames, ServiceType.SQL_IMPORT);
When using the Export SQL service:
Set<String> sqlTableNames = new LinkedHashSet<String>(); sqlTableNames.add("LIBRARIES"); SQLTableGeneration sqlTableGen = TableGenerationFactory.getSQLTableGeneration(); TableGenerationResult<SQLField, SQLTable> genTableResult = sqlTableGen .generateTables( sqlExportConfig.getSQLDataSourceName(), sqlExportConfig.getSchemaName(), null, sqlTableNames, ServiceType.SQL_EXPORT);
When tables are declared in the {addon.label} configuration, you can create SQL tables by using SQLTableHelper
.
SQLTableHelperSpec tableHelperSpec = new SQLTableHelperSpec(applicationLogicalName, session); SQLTableHelper tableHelper = TableHelperFactory.getSQLTableHelper(); List<SQLTable> sqlTables = tableHelper.getTables(tableHelperSpec);
Generating a CSV table
Set<Path> sourceTablePaths = new LinkedHashSet<Path>(); sourceTablePaths.add(Path.parse("/root/Libraries")); CSVTableGeneration tableGeneration = TableGenerationFactory.getCSVTableGeneration(); TableGenerationResult<CSVField, CSVTable> result = tableGeneration .generateTables(currentDataset, sourceTablePaths, session);
When tables are declared in the {addon.label} configuration, you can create CSV table by using CSVTableHelper
.
CSVTableHelperSpec tableHelperSpec = new CSVTableHelperSpec(applicationLogicalName, session); CSVTableHelper tableHelper = TableHelperFactory.getCSVTableHelper(); List<CSVTable> csvTables = tableHelper.getTables(tableHelperSpec);
Generating the spreadsheet tables
Set<Path> sourceTablePaths = new LinkedHashSet<Path>(); sourceTablePaths.add(Path.parse("/root/Libraries")); SpreadsheetTableGeneration tableGeneration = TableGenerationFactory.getSpreadsheetTableGeneration(); TableGenerationResult<SpreadsheetField, SpreadsheetTable> result = tableGeneration .generateTables(currentDataset,sourceTablePaths,session);
When tables are declared in the {addon.label} configuration, you can create spreadsheet table by using SpreadsheetTableHelper
.
SpreadsheetTableHelperSpec tableHelperSpec = new SpreadsheetTableHelperSpec(applicationLogicalName, session); SpreadsheetTableHelper tableHelper = TableHelperFactory.getSpreadsheetTableHelper(); List<SpreadsheetTable> tables = tableHelper.getTables(tableHelperSpec);
Generating an application mapping for data transfer
ApplicationMapping<EBXField, EBXField> applicationMapping = ApplicationMappingHelperFactory .getApplicationMappingForTransferHelper().getApplicationMapping(transferConfig);
When table and field mappings are declared in the {addon.label} configuration, create application mapping by using TransferConfigurationSpec
with ApplicationMappingForTransferHelper
. See the examples below:
-
The following example shows data transfer between tables based on the same data model:
Set<Path> sourceTablePaths = new HashSet<Path>(); sourceTablePaths.add(Path.parse("/root/Libraries")); sourceTablePaths.add(Path.parse("/root/Courses")); ApplicationMapping<EBXField, EBXField> applicationMapping = ApplicationMappingHelperFactory .getApplicationMappingForTransferHelper().getApplicationMapping( transferConfig, sourceApplication, targetApplication, sourceTablePaths);
-
The following example shows data transfer between tables based on different data models:
Map<Path, Path> tableMappingPaths = new HashMap<Path, Path>(); tableMappingPaths.put(Path.parse("/root/Libraries"), Path.parse("/root/LibrariesTarget")); tableMappingPaths.put(Path.parse("/root/Courses"), Path.parse("/root/CoursesTarget")); for (Map.Entry<Path, Path> entry : tableMappingPaths.entrySet()) { EBXTable srcEBXTable = new EBXTable( transferConfig.getCurrentDataset().getTable(entry.getKey())); EBXTable tarEBXTable = new EBXTable( transferConfig.getTargetDataset().getTable(entry.getValue())); tableMappingList.add(new TableMapping<EBXField, EBXField>(srcEBXTable, tarEBXTable)); } ApplicationMapping<EBXField, EBXField> applicationMapping = ApplicationMappingHelperFactory .getApplicationMappingForTransferHelper().getApplicationMapping( transferConfig, sourceApplication, targetApplication, tableMappingList);
Generating an application mapping for the Import XML service
When table and field mappings are declared in the {addon.label} configuration:
ApplicationMapping<XMLField, EBXField> applicationMapping = ApplicationMappingHelperFactory .getApplicationMappingForXMLImportHelper().getApplicationMapping( xmlImportConfig, sourceApplication, targetApplication, tableMappingList);
Additionally, you can use ImportXMLConfigurationSpec to create the mapping when using Import XML with default mode:
ApplicationMapping<XMLField, EBXField> applicationMapping = ApplicationMappingHelperFactory .getApplicationMappingForXMLImportHelper().getApplicationMapping(xmlImportConfig);
If table and field mappings are declared in the {addon.label} configuration, the application mapping can be created by using ApplicationMappingForXMLImportHelper:
Set<Path> targetEBXTablePaths = new HashSet<Path>(); targetEBXTablePaths.add(Path.parse("/root/Libraries")); ApplicationMapping<XMLField, EBXField> applicationMapping = ApplicationMappingHelperFactory .getApplicationMappingForXMLImportHelper().getApplicationMapping( xmlImportConfig, sourceApplication, targetApplication, targetEBXTablePaths);
Generating the application mapping for the Export XML service
When table and field mappings are declared in the {addon.label} configuration:
ApplicationMapping<EBXField, XMLField> applicationMapping = ApplicationMappingHelperFactory .getApplicationMappingForXMLExportHelper().getApplicationMapping( xmlExportConfig, sourceApplication, targetApplication, tableMappingList);
Additionally, you can use ExportXMLConfigurationSpec to create the mapping when using Export XML with default mode:
ApplicationMapping<EBXField, XMLField> applicationMapping = ApplicationMappingHelperFactory .getApplicationMappingForXMLExportHelper().getApplicationMapping(xmlExportConfig);
If table and field mappings are declared in the {addon.label} configuration, the application mapping can be created by using ApplicationMappingForXMLExportHelper
:
Set<Path> sourceEBXTablePaths = new HashSet<Path>(); sourceEBXTablePaths.add(Path.parse("/root/Libraries")); ApplicationMapping<EBXField, XMLField> applicationMapping = ApplicationMappingHelperFactory .getApplicationMappingForXMLExportHelper().getApplicationMapping( xmlExportConfig, sourceApplication, targetApplication, sourceEBXTablePaths);
Generating an application mapping for the Import SQL service
ApplicationMapping<SQLField, EBXField> applicationMapping = ApplicationMappingHelperFactory .getApplicationMappingForSQLImportHelper().getApplicationMapping(sqlImportConfig);
Generating an application mapping for the Export SQL service
ApplicationMapping<EBXField, SQLField> applicationMapping = ApplicationMappingHelperFactory .getApplicationMappingForSQLExportHelper().getApplicationMapping(sqlExportConfig);
Generating an application mapping for the Import CSV service
ApplicationMapping<CSVField, EBXField> applicationMapping = ApplicationMappingHelperFactory .getApplicationMappingForCSVImportHelper().getApplicationMapping(csvImportConfigSpec);
If table and field mappings are declared in the {addon.label} configuration, the application mapping can be created by using CSVImportApplicationMappingHelper
:
Set<Path> sourceEBXTablePaths = new HashSet<Path>(); sourceEBXTablePaths.add(Path.parse("/root/Libraries")); ApplicationMapping<CSVField, EBXField> applicationMapping = ApplicationMappingHelperFactory .getApplicationMappingForCSVImportHelper().getApplicationMapping( csvImportConfigSpec, sourceApplication, targetApplication, sourceEBXTablePaths);
Generating an application mapping for the Export CSV service
ApplicationMapping<EBXField, CSVField> applicationMapping = ApplicationMappingHelperFactory .getApplicationMappingForCSVExportHelper().getApplicationMapping(csvExportConfigSpec);
If table and field mappings are declared in the {addon.label} configuration, the application mapping can be created by using CSVExportApplicationMappingHelper
:
Set<Path> sourceEBXTablePaths = new HashSet<Path>(); sourceEBXTablePaths.add(Path.parse("/root/Libraries")); ApplicationMapping<EBXField, CSVField> applicationMapping = ApplicationMappingHelperFactory .getApplicationMappingForCSVExportHelper().getApplicationMapping( csvExportConfigSpec, sourceApplication, targetApplication, sourceEBXTablePaths);
Generating an application mapping for the Import Excel service
ApplicationMapping<SpreadsheetField, EBXField> applicationMapping = ApplicationMappingHelperFactory .getApplicationMappingForSpreadsheetImportHelper().getApplicationMapping(excelImportConfigSpec);
If table and field mappings are declared in the {addon.label} configuration, the application mapping can be created by using SpreadsheetImportApplicationMappingHelper
:
Set<Path> sourceEBXTablePaths = new HashSet<Path>(); sourceEBXTablePaths.add(Path.parse("/root/Libraries")); ApplicationMapping<SpreadsheetField, EBXField> applicationMapping = ApplicationMappingHelperFactory .getApplicationMappingForSpreadsheetImportHelper().getApplicationMapping( excelImportConfigSpec, sourceApplication, targetApplication, sourceEBXTablePaths);
Generating an application mapping for the Export Excel service
ApplicationMapping<EBXField, SpreadsheetField> applicationMapping = ApplicationMappingHelperFactory .getApplicationMappingForSpreadsheetExportHelper().getApplicationMapping(excelExportConfigSpec);
If table and field mappings are declared in the {addon.label} configuration, the application mapping can be created by using SpreadsheetExportApplicationMappingHelper
:
Set<Path> sourceEBXTablePaths = new HashSet<Path>(); sourceEBXTablePaths.add(Path.parse("/root/Libraries")); ApplicationMapping<EBXField, SpreadsheetField> applicationMapping = ApplicationMappingHelperFactory .getApplicationMappingForSpreadsheetExportHelper().getApplicationMapping( excelExportConfigSpec, sourceApplication, targetApplication, sourceEBXTablePaths);
-
Interface Summary Interface Description ApplicationMappingHelper<SC extends Field,TC extends Field,T extends Table<SC>> Provides the methods to getApplicationMapping
.CSVExportApplicationMappingHelper Provides the methods to get anApplicationMapping
instance for CSV export.CSVImportApplicationMappingHelper Provides the methods to get anApplicationMapping
instance for CSV import.CSVTableGeneration ExtendsTableGeneration
to generate aCSVTable
instance.CSVTableHelper ExtendsTableHelper
to getCSVTable
declared in the {addon.label} dataset.EBXTableGeneration Extends theTableHelper
to generateEBXTable
.EBXTableHelper Extends theTableHelper
to get theEBXTable
declared in the {addon.label} dataset.SpreadsheetExportApplicationMappingHelper Provides the methods to get anApplicationMapping
instance for spreadsheet export.SpreadsheetImportApplicationMappingHelper Provides the methods to get anApplicationMapping
instance for spreadsheet import.SpreadsheetTableGeneration Extends theTableGeneration
to generate aSpreadsheetTable
.SpreadsheetTableHelper Extends theTableHelper
to get theSpreadsheetTable
declared in the {addon.label} dataset.SQLExportApplicationMappingHelper Provides the methods to get anApplicationMapping
for SQL export.SQLImportApplicationMappingHelper Provides the methods to get anApplicationMapping
instance for SQL import.SQLTableGeneration Provides the methods to generate anSQLTable
instance.SQLTableHelper Extends theTableHelper
to get theSQLTable
declared in the {addon.label} dataset.TableGeneration<F extends Field,T extends Table<F>> Provides the methods to generate aTableGenerationResult
instance.TableHelper<F extends Field,T extends Table<F>,S extends TableHelperSpec> Provides the methods to get theTable
declared in the {addon.label} dataset.TransferApplicationMappingHelper Provides the methods to get anApplicationMapping
instance for data transfer.XMLExportApplicationMappingHelper Provides the methods to get anApplicationMapping
instance for XML export.XMLImportApplicationMappingHelper Provides the methods to get anApplicationMapping
instance for XML import.XMLTableGeneration Extends theTableHelper
to generate anXMLTable
instance.XMLTableHelper Extends theTableHelper
to get theXMLTable
declared in the {addon.label} dataset. -
Class Summary Class Description ApplicationMappingHelperFactory Creates instances ofApplicationMappingHelper
.CSVTableHelperSpec Specifies the configuration used to get theCSVTable
declared in the {addon.label} dataset.EBXTableHelperSpec Specifies the configuration used to get theEBXTable
declared in the {addon.label} dataset.SpreadsheetTableHelperSpec Specifies the configuration used to get theSpreadsheetTable
declared in the {addon.label} dataset.SQLTableHelperSpec Specifies the configuration used to get theSQLTable
declared in the {addon.label} dataset.TableGenerationFactory Creates instances ofTableGeneration
.TableGenerationResult<C extends Field,T extends Table<C>> Defines table generation results.TableHelperFactory Creates instances ofTableHelper
.TableHelperSpec Provides the methods to get theTable
declared in the {addon.label} dataset.XMLTableHelperSpec Specifies the configuration used to get theXMLTable
declared in the {addon.label} dataset.