blob: b9d75446e31929ee92aac8b09101eaac1fe172e4 [file] [log] [blame]
<!--
/********************************************************************************
* Copyright (c) 2009, 2019 INRIA.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v20.html
*
* Contributors:
* INRIA - Initial implementation
*
******************************************************************************/
-->
<!-- author: Hugo Bruneliere -->
<project name="MetricsVisualizationBuilder" default="buildVisualizations">
<property name="metricsName" value=""/>
<property name="metricsModelPath" value=""/>
<property name="outputFilesDirectoryPath" value=""/>
<target name="buildVisualizations" depends="loadMetamodels">
<!-- Load the Metrics model -->
<am3.loadModel modelHandler="EMF" name="metricsModel" metamodel="Metrics" path="${metricsModelPath}"/>
<!-- Generate the Table model from the Metrics model -->
<am3.atl path="Transformations/Metrics2Table.atl">
<inModel name="IN" model="metricsModel"/>
<inModel name="Metrics" model="Metrics"/>
<inModel name="Table" model="Table"/>
<outModel name="OUT" model="tableModel" metamodel="Table"/>
</am3.atl>
<!--
<am3.saveModel model="tableModel" path="${outputFilesDirectoryPath}/${metricsName}-Table.xmi"/>
-->
<!-- Generate the SVG Pie Chart file from the Table model (if requested) -->
<!-- Generate the SVG PieChart model from the Table model -->
<am3.atl path="Transformations/Table2XXX/Table2SVGPieChart.atl">
<inModel name="IN" model="tableModel"/>
<inModel name="Table" model="Table"/>
<inModel name="SVG" model="SVG"/>
<outModel name="OUT" model="svgPieChartModel" metamodel="SVG"/>
</am3.atl>
<!--
<am3.saveModel model="svgPieChartModel" path="${outputFilesDirectoryPath}/${metricsName}-SVGPieChart.xmi"/>
-->
<!-- Generate the XML model from the SVG PieChart model -->
<am3.atl path="Transformations/Table2XXX/Extractors/SVG2XML.atl">
<inModel name="IN" model="svgPieChartModel"/>
<inModel name="SVG" model="SVG"/>
<inModel name="XML" model="XML"/>
<outModel name="OUT" model="svgPieChartXmlModel" metamodel="XML"/>
</am3.atl>
<!--
<am3.saveModel model="svgPieChartXmlModel" path="${outputFilesDirectoryPath}/${metricsName}-SVGPieChartXml.xmi"/>
-->
<!-- Extract the SVG file from SVG PieChart XML model -->
<am3.saveModel model="svgPieChartXmlModel" path="${outputFilesDirectoryPath}/${metricsName}-PieChart.svg">
<extractor name="xml"/>
</am3.saveModel>
</target>
<target name="loadMetamodels">
<!-- Load Metrics metamodel -->
<am3.loadModel modelHandler="EMF" name="Metrics" metamodel="MOF" path="Metamodels/Metrics.ecore" />
<!-- Load Table metamodel -->
<am3.loadModel modelHandler="EMF" name="Table" metamodel="MOF" path="Metamodels/Table.ecore" />
<!-- Load XML metamodel -->
<am3.loadModel modelHandler="EMF" name="XML" metamodel="MOF" path="Metamodels/XML.ecore" />
<!-- Load SVG metamodel -->
<am3.loadModel modelHandler="EMF" name="SVG" metamodel="MOF" path="Metamodels/SVG.ecore" />
</target>
</project>