Skip to main content

This CGIT instance is deprecated, and repositories have been moved to Gitlab or Github. See the repository descriptions for specific locations.

aboutsummaryrefslogtreecommitdiffstats
blob: b747df4390736d0267e725f049acc223e0b1151e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<!--
/********************************************************************************
 * Copyright (c) 2009 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 HTML file from the Table model -->

		<!-- Generate the HTML model from the Table model -->
		<am3.atl path="Transformations/Table2XXX/Table2TabularHTML.atl">
			<inModel name="IN" model="tableModel"/>
			<inModel name="Table" model="Table"/>
			<inModel name="HTML" model="HTML"/>
			<outModel name="OUT" model="htmlModel" metamodel="HTML"/>
		</am3.atl>
		<!--
			<am3.saveModel model="htmlModel" path="${outputFilesDirectoryPath}/${metricsName}-Html.xmi"/>
		-->

		<!-- Generate the XML model from the HTML model -->
		<am3.atl path="Transformations/Table2XXX/Extractors/HTML2XML.atl">
			<inModel name="IN" model="htmlModel"/>
			<inModel name="HTML" model="HTML"/>
			<inModel name="XML" model="XML"/>
			<outModel name="OUT" model="htmlXmlModel" metamodel="XML"/>
		</am3.atl>
		<!--
			<am3.saveModel model="htmlXmlModel" path="${outputFilesDirectoryPath}/${metricsName}-HtmlXml.xmi"/>
		-->

		<!-- Extract the HTML file from HTML XML model -->
		<am3.saveModel model="htmlXmlModel" path="${outputFilesDirectoryPath}/${metricsName}.html">
			<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 HTML metamodel -->
		<am3.loadModel modelHandler="EMF" name="HTML" metamodel="MOF" path="Metamodels/HTML.ecore" />

	</target>

</project>

Back to the top