/[volute]/trunk/projects/theory/snapdm/build.xml
ViewVC logotype

Contents of /trunk/projects/theory/snapdm/build.xml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 127 - (show annotations)
Mon Mar 31 19:42:11 2008 UTC (12 years, 8 months ago) by gerard.lemson
File MIME type: text/xml
File size: 7298 byte(s)


1 <?xml version="1.0" ?>
2 <!DOCTYPE project [
3 <!ENTITY xsltOptions '
4 <factory name="net.sf.saxon.TransformerFactoryImpl" />
5 <outputproperty name="{http://xml.apache.org/xslt}indent-amount" value="2" />
6 '>
7 <!ENTITY buildJava SYSTEM "./build_java.xml">
8 ]>
9
10 <project name="Snap DM Transformer" default="makeAll" basedir=".">
11
12 <description>
13 Transformer tool for SNAP DM (UML model) in XML schemas and documentation
14 </description>
15
16 <!-- set global properties for this build -->
17
18 <!-- input files -->
19 <property name="domain_source" value="DomainModelWithTemplate.xml" />
20 <property name="snap_source" value="SNAP_Simulation_DM_LBO_1.xml" />
21
22 <!-- output files -->
23 <property name="domain_source_filtered" value="DomainModelWithTemplate_FILTER.xml" />
24 <property name="snap_source_checked" value="SNAP_Simulation_DM_CHECK.xml" />
25 <property name="snap_source_filtered" value="SNAP_Simulation_DM_FILTER.xml" />
26 <property name="snap_source_filtered_preGen" value="SNAP_Simulation_DM_FOR_GEN.xml" />
27 <property name="out_schema" value="SNAP-xmi.xsd" />
28 <property name="out_xhtml" value="SNAP-xsd.html" />
29
30 <!-- paths -->
31 <property name="input" location="./input" />
32 <property name="output" location="./output" />
33 <property name="res" location="./res" />
34
35 <property name="outputJava" location="${output}/java" />
36
37
38 <!-- java props -->
39 <property name="root" location="."/>
40
41 <property name="sources" location="./src"/>
42 <property name="sources.gen" location="${outputJava}/src"/>
43
44 <property name="libs" location="./libs"/>
45
46 <property name="root_package" value="org.ivoa"/>
47 <property name="model_package" value="org.ivoa.dm.model"/>
48
49 <!-- compile Sources -->
50 <property name="build" location="./build"/>
51 <property name="build.src" location="${build}/src"/>
52
53 <property name="build.gen" location="${build}/gen"/>
54
55 <!-- classpath -->
56 <path id="project.class.path">
57 <pathelement location="${libs}/commons-logging-1.1.jar"/>
58 <pathelement location="${libs}/log4j-1.2.15.jar"/>
59 </path>
60
61 <!-- Get properties -->
62 <property file="build.properties"/>
63 <fail unless="build.by" message="bad configuration in build.properties !" />
64
65
66 <!-- targets -->
67
68 <target name="makeAll" depends="cleanAll, processDomain, processSnap" description="make all transformations">
69
70 <echo>makeAll : done</echo>
71
72 </target>
73
74
75
76 <target name="processDomain">
77 <ant target="filterSource">
78 <property name="source" value="${domain_source}" />
79 <property name="source_filtered" value="${domain_source_filtered}" />
80 </ant>
81 </target>
82
83
84
85
86 <target name="processSnap">
87
88 <property name="source" value="${snap_source}" />
89 <ant target="checkSource">
90 <property name="source_checked" value="${snap_source_checked}" />
91 </ant>
92
93 <property name="source_filtered" value="${snap_source_filtered}" />
94
95 <ant target="filterSource" />
96 <ant target="genXSD" />
97 <ant target="genXHTML" />
98
99 <ant target="filterSourceGen">
100 <property name="source" value="${snap_source_filtered}" />
101 <property name="source_filtered" value="${snap_source_filtered_preGen}" />
102 </ant>
103
104 </target>
105
106
107 <target name="run_filterSourceGen">
108 <ant target="filterSourceGen">
109 <property name="source" value="${snap_source_filtered}" />
110 <property name="source_filtered" value="${snap_source_filtered_preGen}" />
111 </ant>
112 </target>
113
114 <target name="run_xml2jpa" depends="clean">
115 <echo>run_xml2jpa : starting filter on file ${output}/${source}</echo>
116
117 <ant target="filterSourceGen">
118 <property name="source" value="${snap_source_filtered}" />
119 <property name="source_filtered" value="${snap_source_filtered_preGen}" />
120 </ant>
121
122 <xslt force="true" reloadstylesheet="true"
123 in="${output}/${snap_source_filtered_preGen}"
124 out="${sources.gen}/javagen.log"
125 style="${res}/xml2jpa.xsl" >
126 &xsltOptions;
127 <param name="root_package" expression="${root_package}"/>
128 <param name="model_package" expression="${model_package}"/>
129 </xslt>
130
131 <echo>run_xml2jpa : done </echo>
132 </target>
133
134 <!-- generic targets -->
135
136 <!-- target checkSource : check xmi well formed tags in source document -->
137 <target name="checkSource" description="check that xmi is well formed">
138
139 <echo>checkSource : starting checks on file ${input}/${source}</echo>
140
141 <xslt force="true" reloadstylesheet="true"
142 in="${input}/${source}" out="${output}/${source_checked}"
143 style="${res}/xmiCheck.xsl">
144 &xsltOptions;
145 </xslt>
146
147 <echo>checkSource : done </echo>
148
149 </target>
150
151
152
153 <!-- target filterSource : remove all xmi:Extension tags in source document -->
154 <target name="filterSource" description="remove all xmi:Extension tags in source document">
155
156 <echo>filterSource : starting filter on file ${input}/${source}</echo>
157
158 <xslt force="true" reloadstylesheet="true"
159 in="${input}/${source}" out="${output}/${source_filtered}"
160 style="${res}/xmiFilter.xsl">
161 &xsltOptions;
162 </xslt>
163
164 <echo>filterSource : done </echo>
165
166 </target>
167
168
169
170
171
172
173 <!-- target filterSourceGen : GenTool preprocessor generating accordint to ivoaDMMetamodel.xsd -->
174 <target name="filterSourceGen" description="remove more tags in source document">
175
176 <echo>filterSourceGen : starting filter on file ${output}/${source}</echo>
177
178 <xslt force="true" reloadstylesheet="true"
179 in="${output}/${source}" out="${output}/${source_filtered}"
180 style="${res}/xmiPreProcessTool.xsl" >
181 &xsltOptions;
182 <param name="root_package" expression="${root_package}"/>
183 <param name="model_package" expression="${model_package}"/>
184 </xslt>
185
186 <echo>filterSourceGen : done </echo>
187
188 </target>
189
190
191 <!-- target genXSD : generates XML schemas from UML Model as xmi document -->
192 <target name="genXSD" description="generates XML schemas from UML Model as xmi document">
193
194 <echo>genXSD : starting generate XSD from file ${output}/${source_filtered}</echo>
195
196 <xslt force="true" reloadstylesheet="true"
197 in="${output}/${source_filtered}" out="${output}/${out_schema}"
198 style="${res}/xmi2xsd.xsl">
199 &xsltOptions;
200 </xslt>
201
202 <echo>genXSD : done </echo>
203
204 </target>
205
206
207 <!-- target genXHTML : generates XHTML documentation the XSD file created by genXSD -->
208 <target name="genXHTML" description="generates XHTML documentation the XSD file created by genXSD">
209
210 <echo>genXTHML : starting generate XHTML docs from file ${output}/${out_schema}</echo>
211
212 <xslt force="true" reloadstylesheet="true"
213 in="${output}/${out_schema}" out="${output}/${out_xhtml}"
214 style="${res}/schema2xhtml.xsl">
215 &xsltOptions;
216 </xslt>
217
218 <echo>genXHTML : done </echo>
219
220 </target>
221
222
223 <!-- include java code targets -->
224
225 &buildJava;
226
227
228 </project>

msdemlei@ari.uni-heidelberg.de
ViewVC Help
Powered by ViewVC 1.1.26