Difference between revisions of "Data Interchange DSL"

From OS.bee documentation
Jump to: navigation, search
(Blanked the page)
 
(31 intermediate revisions by 2 users not shown)
Line 1: Line 1:
A general introduction and some high-level concepts for OSBP DSLs can be found in [[OSBP DSL Documentation]].
 
  
Please note that you can only make use of the Datainterchange DSL by downloading its packages from the [http://dev.osbee.org/free-download/ download section] of our [http://dev.osbee.org/home/ website].
 
 
==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==
 
 
[[File:Datainterchange.png|center|''Figure 1 - Data Interchange Structure.'']]
 
 
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:
 
 
* <code>package</code>
 
::- specify the datainterchange package, which acts as a namespace. It should have the form <code>net.osbee.sample.<applicationname>.datainterchanges</code> by convention.
 
* 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 <code>.data</code> extension. Data Interchange models may be split into several <code>.data</code> files, as long as they have the same package declaration.
 
 
<syntaxhighlight lang="java">
 
package net.osbee.sample.<applicationname>.datainterchanges title "<titletext>" {
 
    interchange <interchangename> persist file
 
    <fileformat> "<filepath>" [<further specifications>]
 
    beans {
 
        <entity relationships>
 
    }
 
}
 
</syntaxhighlight>
 
 
 
===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 <code>interchange</code> 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====
 
 
==Enums==
 
 
==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 ==
 
{{Copyright Notice}}
 

Latest revision as of 06:47, 7 August 2017