Difference between revisions of "Datainterchange DSL"
Line 1: | Line 1: | ||
− | A general introduction and some high-level concepts for OSBP DSLs can be found in [[ | + | A general introduction and some high-level concepts for OSBP DSLs can be found in [[OSBP DSL Documentation]]. |
==Purpose== | ==Purpose== |
Revision as of 16:09, 2 August 2017
A general introduction and some high-level concepts for OSBP DSLs can be found in OSBP DSL Documentation.
Contents
- 1 Purpose
- 2 Overview
- 3 Data Interchange Model File
- 3.1 Reserved Keywords
- 3.1.1 package
- 3.1.2 import
- 3.1.3 interchange
- 3.1.4 describedBy
- 3.1.5 merge
- 3.1.6 persist
- 3.1.7 remove
- 3.1.8 elementSize
- 3.1.9 file -> CSV | EDI | XML
- 3.1.10 report
- 3.1.11 delimiter
- 3.1.12 indent
- 3.1.13 quoteCharacter
- 3.1.14 skipLines
- 3.1.15 strict
- 3.1.16 beans
- 3.1.17 entity
- 3.1.18 createOn
- 3.1.19 element
- 3.1.20 expression -> assign | copy | with...as
- 3.1.21 format
- 3.1.22 keys -> key
- 3.1.23 list
- 3.1.24 mapping -> map...to
- 3.1.25 lookup
- 3.1.26 marker
- 3.1 Reserved Keywords
- 4 Configuration Settings / Smooks Framework (A small introduction)
- 5 Annotations
- 6 Comments
- 7 Smooks (Extended)
- 8 WorkerThread (Runnable)
- 9 TriggerView & Executorservice
- 10 DSL Inferrer
- 11 DSL Scope Provider
- 12 DSL Proposal Provider
- 13 DSL Validator
- 14 Copyright Notice
Purpose
The Data Interchange DSL (datainterchange for short) is made for defining data exchange models that can be used to import data from various formats (CSV, XML, EDI, etc.), map the data to entities, store them into database, or export them back into other formats.
You only need to define the relationship between the file and the bean, not the import / export process themselves. Once defined, these models can be used in e.g. action DSL to define actions which, when triggered, execute the actual import / export process, which are generated automatically by the OSBP based on the model.
Overview
As shown in Figure 1, the DSL inferrer will generate various views and In/Export component according to model described by datainterchange DSL (and action DSL, in the case of ActionButtons). The action buttons, when clicked, will trigger their corresponding In/Export processes by putting WorkerThreadRunnable jobs into the executor job pool within the TriggerView (prefixed with datainterchang name), buttons (and toolbar / menus containing them) are further included in the perspective.
The main semantic elements of the Compex Data Interchange DSL are the following:
-
package
- - specify the datainterchange package, which acts as a namespace. It should have the form
net.osbee.sample.<applicationname>.datainterchanges
by convention.
- - specify the datainterchange package, which acts as a namespace. It should have the form
- titletext
- - the name of the datainterchange package. This name will be used for code generation and should thus be unique if there are multiple datainterchange packages.
- interchangename
Data Interchange Model File
Datainterchange DSL model files end with the .data
extension. Data Interchange models may be split into several .data
files, as long as they have the same package declaration.
package net.osbee.sample.<applicationname>.datainterchanges title "<titletext>" {
interchange <interchangename> persist file
<fileformat> "<filepath>" [<further specifications>]
beans {
<entity relationships>
}
}
Reserved Keywords
In the following we’ll dive deeper into the description and the usage of Datainterchange related and reserved keywords.
package
Datainterchange DSL model files must start with a package declaration. Packages are the root element of the Entity DSL grammar. All interchange
units have to be defined in the package.
import
interchange
describedBy
merge
persist
remove
elementSize
file -> CSV | EDI | XML
report
delimiter
indent
quoteCharacter
skipLines
strict
beans
entity
createOn
element
expression -> assign | copy | with...as
format
keys -> key
list
mapping -> map...to
lookup
marker
Configuration Settings / Smooks Framework (A small introduction)
Annotations
Comments
Smooks (Extended)
just links???
WorkerThread (Runnable)
TriggerView & Executorservice
DSL Inferrer
DSL Scope Provider
DSL Proposal Provider
DSL Validator
Copyright Notice
All rights are reserved by Compex Systemhaus GmbH. In particular, duplications, translations, microfilming, saving and processing in electronic systems are protected by copyright. Use of this manual is only authorized with the permission of Compex Systemhaus GmbH. Infringements of the law shall be punished in accordance with civil and penal laws. We have taken utmost care in putting together texts and images. Nevertheless, the possibility of errors cannot be completely ruled out. The Figures and information in this manual are only given as approximations unless expressly indicated as binding. Amendments to the manual due to amendments to the standard software remain reserved. Please note that the latest amendments to the manual can be accessed through our helpdesk at any time. The contractually agreed regulations of the licensing and maintenance of the standard software shall apply with regard to liability for any errors in the documentation. Guarantees, particularly guarantees of quality or durability can only be assumed for the manual insofar as its quality or durability are expressly stipulated as guaranteed. If you would like to make a suggestion, the Compex Team would be very pleased to hear from you.
(c) 2016-2024 Compex Systemhaus GmbH