Difference between revisions of "Data Interchange DSL"

From OS.bee documentation
Jump to: navigation, search
(Created page with "Welcome to the Data Interchange DSL wiki! A general introduction and some high-level concepts for OSBP DSLs can be found in OSBP DSL Documentation. ==Purpose== The Data...")
 
(Blanked the page)
 
(45 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Welcome to the Data Interchange DSL wiki!
 
  
A general introduction and some high-level concepts for OSBP DSLs can be found in [[OSBP DSL Documentation]].
 
 
==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.
 
 
==Usage==
 
 
A datainterchange DSL model file ends with the <code>.data</code> extension, has the general form of
 
 
<nowiki>
 
(imports...)
 
 
package net.osbee.sample.<applicationname>.datainterchanges title "<TitleText>" {
 
    interchange <interchangename> persist file
 
    <fileformat> "<filepath>" [<further specifications>]
 
    beans {
 
        <entity relationships>
 
    }
 
}
 
</nowiki>
 
 
where:
 
 
* The <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.
 
*
 

Latest revision as of 06:47, 7 August 2017