| <?php require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/app.class.php"); require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/nav.class.php"); require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/menu.class.php"); $App = new App(); $Nav = new Nav(); $Menu = new Menu(); include($App->getProjectCommon()); # All on the same line to unclutter the user's desktop' |
| |
| #***************************************************************************** |
| # |
| # AMW_SQL2KM3_doc.php |
| # |
| # Author: Marcos Didonet Del Fabro |
| # Date: 2005-06-20 |
| # |
| # Description: Type your page comments here - these are not sent to the browser |
| # |
| # |
| #**************************************************************************** |
| |
| # |
| # Begin: page-specific settings. Change these. |
| $pageTitle = "Translating SQL into KM3 using AMW and ATL"; |
| $pageKeywords = ""; |
| $pageAuthor = "Marcos Didonet Del Fabro"; |
| |
| # Paste your HTML content between the EOHTML markers! |
| $html = <<<EOHTML |
| |
| <!-- Main part --> |
| <div id="midcolumn"> |
| <table width="100%"> |
| <tr> |
| <td width="50%"> |
| <h1>$pageTitle</h1> |
| </td> |
| </tr> |
| </table> |
| |
| <p> |
| This example contains a weaving model between a SQL DDL (Data Definition Language) metamodel and a KM3 metamodel. |
| The weaving model is used to produce an ATL transformation that translates SQL DDL models |
| into KM3 models. We used an SQL extracted from <a href="http://www.mantisbt.org/">Mantis</a> bug tracker. |
| |
| </p> |
| |
| <h2>Instructions</h2> |
| |
| <h4>Loading the weaving model into AMW:</h4> |
| The weaving model (models/mw_sql_km3.ecore) must be loaded using the wizard to be able to |
| create the metadata file in the workspace. |
| <br/> There are two metamodel extensions that need to be loaded : "mw_base_ext" and |
| "metamodels/mmw_sql_km3". |
| The complete weaving metamodel is saved at metamodels/mmw_sql_km3.ecore</br> |
| This step is not necessary to execute the transformations. |
| <br/> |
| <i>Left metamodel:</i> metamodels/SQLDDL.ecore.</br> |
| <i>Right metamodel:</i> metamodels/KM3.ecore. |
| |
| <h4>Executing the transformations</h4> |
| |
| <p/> |
| There is an Ant Script (scripts/executeAll.xml) that takes the models/mantis.sql file, |
| and automatically produces a KM3 file. |
| It executes the following actions: |
| <ul class="midlist"> |
| <li> |
| injects the mantis.sql file into the SQL model (models/mantis-SQLDDL.ecore) conforming to |
| metamodels/SQLDDL.ecore metamodel, |
| </li> |
| <li> |
| the weaving model (models/mw_sql_km3.ecore) contains links between the metamodels/SQLDDL.ecore metamodel and |
| the metamodels/KM3.ecore metamodel, |
| </li> |
| <li> |
| executes the ATL HOT (hot/AMWtoATL_SQL2KM3.atl) that takes the weaving model mw_sql_km3.ecore as input |
| and produces the ATL model (output/SQL2KM3.ecore) conforming to the ATL metamodel, |
| </li> |
| <li> |
| extracts the ATL model into an ATL file (output/SQL2KM3.atl), |
| </li> |
| <li> |
| executes the ATL transformation (SQL2KM3.atl). This transformation takes the mantis-SQLDDL.ecore model as input |
| and produces the KM3 model (models/mantis-KM3.ecore) as output, |
| </li> |
| <li> |
| extracts the KM3 model (mantis-KM3.ecore) into a KM3 file (models/mantis-KM3.km3). |
| </li> |
| </ul> |
| |
| <p/> |
| <b>Remarks:</b></br> |
| <ul class="midlist"> |
| <li> |
| The HOT and the SQL2KM3 transformations can be executed separatedly as well. |
| Each transformartion has a predefined "launch configuration" file. <br/> |
| </li> |
| <li> |
| There are Ant scripts to execute the injection of .sql files (SQLDDLInjector.xml) and |
| the extraction of ATL models(ATLExtractor.xml). The files in the scripts/ folder are mandatory |
| files to execute the Ant Scripts. |
| </li> |
| <li> |
| When the ATL model is extracted into SQL2KM3.atl, the SQL2KM3.asm file is generated by the |
| ATL engine. It is possible that the executeAll.xml script tries to execute the transformation |
| before it is extracted (in the first time the script is executed), |
| causing an error. To solve this issue the script needs to be executed a second time. |
| </li> |
| </ul> |
| <p/> |
| |
| </div> |
| |
| EOHTML; |
| |
| |
| # Generate the web page |
| $App->generatePage($theme, $Menu, $Nav, $pageAuthor, $pageKeywords, $pageTitle, $html); |
| ?> |