ontomde-core 1.0.6 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +3 -0
- data/Manifest.txt +95 -21
- data/README.txt +19 -1
- data/Rakefile +1 -1
- data/bin/ontomde-inspector +6 -0
- data/lib/ontomde-core/clone.rb +1 -1
- data/lib/ontomde-core/completion.rb +47 -0
- data/lib/ontomde-core/context.rb +32 -11
- data/lib/ontomde-core/converter-ea/XMI2RDFS.xslt +805 -0
- data/lib/ontomde-core/converter-ea/msxsl.exe +0 -0
- data/lib/ontomde-core/custom_method_missing.rb +24 -1
- data/lib/ontomde-core/fileLoader.rb +71 -14
- data/lib/ontomde-core/fileTypes.rb +7 -0
- data/lib/ontomde-core/helper.rb +141 -15
- data/lib/ontomde-core/inspector/loader.rb +69 -0
- data/lib/ontomde-core/inspector/rails/README +203 -0
- data/lib/ontomde-core/inspector/rails/Rakefile +10 -0
- data/lib/ontomde-core/inspector/rails/app/controllers/application.rb +10 -0
- data/lib/ontomde-core/inspector/rails/app/controllers/mtk_controller.rb +349 -0
- data/lib/ontomde-core/inspector/rails/app/helpers/application_helper.rb +3 -0
- data/lib/ontomde-core/inspector/rails/app/helpers/mtk_helper.rb +20 -0
- data/lib/ontomde-core/inspector/rails/app/views/layouts/mtk.rhtml +161 -0
- data/lib/ontomde-core/inspector/rails/app/views/mtk/clear.rhtml +5 -0
- data/lib/ontomde-core/inspector/rails/app/views/mtk/index.rhtml +1 -0
- data/lib/ontomde-core/inspector/rails/app/views/mtk/last_generated.rhtml +7 -0
- data/lib/ontomde-core/inspector/rails/app/views/mtk/model.html.erb +6 -0
- data/lib/ontomde-core/inspector/rails/app/views/mtk/not_found.rhtml +2 -0
- data/lib/ontomde-core/inspector/rails/app/views/mtk/search_form.rhtml +30 -0
- data/lib/ontomde-core/inspector/rails/app/views/mtk/search_result.rhtml +8 -0
- data/lib/ontomde-core/inspector/rails/app/views/mtk/setup_form.rhtml +42 -0
- data/lib/ontomde-core/inspector/rails/app/views/mtk/show.rhtml +172 -0
- data/lib/ontomde-core/inspector/rails/app/views/mtk/show_many.rhtml +25 -0
- data/lib/ontomde-core/inspector/rails/config/boot.rb +109 -0
- data/lib/ontomde-core/inspector/rails/config/database.yml +19 -0
- data/lib/ontomde-core/inspector/rails/config/environment.rb +60 -0
- data/lib/ontomde-core/inspector/rails/config/environments/development.rb +18 -0
- data/lib/ontomde-core/inspector/rails/config/environments/production.rb +19 -0
- data/lib/ontomde-core/inspector/rails/config/environments/test.rb +22 -0
- data/lib/ontomde-core/inspector/rails/config/initializers/inflections.rb +10 -0
- data/lib/ontomde-core/inspector/rails/config/initializers/mime_types.rb +5 -0
- data/lib/ontomde-core/inspector/rails/config/routes.rb +35 -0
- data/lib/ontomde-core/inspector/rails/doc/README_FOR_APP +2 -0
- data/lib/ontomde-core/inspector/rails/log/development.log +0 -0
- data/lib/ontomde-core/inspector/rails/log/production.log +0 -0
- data/lib/ontomde-core/inspector/rails/log/server.log +0 -0
- data/lib/ontomde-core/inspector/rails/log/test.log +0 -0
- data/lib/ontomde-core/inspector/rails/public/.htaccess +40 -0
- data/lib/ontomde-core/inspector/rails/public/404.html +30 -0
- data/lib/ontomde-core/inspector/rails/public/422.html +30 -0
- data/lib/ontomde-core/inspector/rails/public/500.html +30 -0
- data/lib/ontomde-core/inspector/rails/public/dispatch.cgi +10 -0
- data/lib/ontomde-core/inspector/rails/public/dispatch.fcgi +24 -0
- data/lib/ontomde-core/inspector/rails/public/dispatch.rb +10 -0
- data/lib/ontomde-core/inspector/rails/public/favicon.ico +0 -0
- data/lib/ontomde-core/inspector/rails/public/images/logoMDE.gif +0 -0
- data/lib/ontomde-core/inspector/rails/public/images/rails.png +0 -0
- data/lib/ontomde-core/inspector/rails/public/javascripts/application.js +2 -0
- data/lib/ontomde-core/inspector/rails/public/javascripts/controls.js +963 -0
- data/lib/ontomde-core/inspector/rails/public/javascripts/dragdrop.js +972 -0
- data/lib/ontomde-core/inspector/rails/public/javascripts/effects.js +1120 -0
- data/lib/ontomde-core/inspector/rails/public/javascripts/prototype.js +4225 -0
- data/lib/ontomde-core/inspector/rails/public/robots.txt +5 -0
- data/lib/ontomde-core/inspector/rails/script/about +3 -0
- data/lib/ontomde-core/inspector/rails/script/console +3 -0
- data/lib/ontomde-core/inspector/rails/script/destroy +3 -0
- data/lib/ontomde-core/inspector/rails/script/generate +3 -0
- data/lib/ontomde-core/inspector/rails/script/performance/benchmarker +3 -0
- data/lib/ontomde-core/inspector/rails/script/performance/profiler +3 -0
- data/lib/ontomde-core/inspector/rails/script/performance/request +3 -0
- data/lib/ontomde-core/inspector/rails/script/plugin +3 -0
- data/lib/ontomde-core/inspector/rails/script/process/inspector +3 -0
- data/lib/ontomde-core/inspector/rails/script/process/reaper +3 -0
- data/lib/ontomde-core/inspector/rails/script/process/spawner +3 -0
- data/lib/ontomde-core/inspector/rails/script/runner +3 -0
- data/lib/ontomde-core/inspector/rails/script/server +3 -0
- data/lib/ontomde-core/inspector/rails/test/test_helper.rb +38 -0
- data/lib/ontomde-core/inspector/rails/vendor/plugins/auto_complete/README +23 -0
- data/lib/ontomde-core/inspector/rails/vendor/plugins/auto_complete/Rakefile +22 -0
- data/lib/ontomde-core/inspector/rails/vendor/plugins/auto_complete/init.rb +2 -0
- data/lib/ontomde-core/inspector/rails/vendor/plugins/auto_complete/lib/auto_complete.rb +47 -0
- data/lib/ontomde-core/inspector/rails/vendor/plugins/auto_complete/lib/auto_complete_macros_helper.rb +143 -0
- data/lib/ontomde-core/inspector/rails/vendor/plugins/auto_complete/test/auto_complete_test.rb +67 -0
- data/lib/ontomde-core/inspector/setup_rails.sh +39 -0
- data/lib/ontomde-core/inspector.rb +21 -0
- data/lib/ontomde-core/meta.rb +6 -5
- data/lib/ontomde-core/resource.rb +6 -6
- data/lib/ontomde-core/resourceSet.rb +7 -6
- data/lib/ontomde-core/triplet.rb +2 -0
- data/lib/ontomde-core/version.rb +1 -1
- data/test/protege/test_demo.rb +1 -1
- data/test/test_context.rb +1 -1
- data/test/test_protected.rb +11 -11
- data/test/test_uri.rb +1 -1
- data/test/unit_test_crash.rb +1 -1
- metadata +105 -29
@@ -0,0 +1,805 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<xsl:stylesheet version="2.0" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:uml="http://schema.omg.org/spec/UML/2.1" xmlns:xmi="http://schema.omg.org/spec/XMI/2.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://uml/2#">
|
3
|
+
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
|
4
|
+
|
5
|
+
<!-- Create Defined and used Stereotypes for later creation of missing stereotype definitions -->
|
6
|
+
<xsl:key name="definedStereotypes" match="packagedElement[@xmi:type='uml:Stereotype']" use="@name"/>
|
7
|
+
<xsl:key name="usedStereotypes" match="*[@stereotype]" use="@stereotype" />
|
8
|
+
|
9
|
+
<!-- Profile -->
|
10
|
+
<xsl:template name="Profile" xmlns:uml="http://schema.omg.org/spec/UML/2.1/uml.xml">
|
11
|
+
<rdf:Description rdf:about="{@xmi:id}" ns0:name="{@name}">
|
12
|
+
<rdf:type rdf:resource="http://uml/2#Profile"/>
|
13
|
+
<ns0:visibility rdf:resource="http://uml/2#visibilityKind_public"/>
|
14
|
+
</rdf:Description>
|
15
|
+
<!-- Stereotype -->
|
16
|
+
<xsl:apply-templates select="packagedElement[@xmi:type='uml:Stereotype']"/>
|
17
|
+
</xsl:template>
|
18
|
+
<!-- Stereotype -->
|
19
|
+
<xsl:template name="Stereotype">
|
20
|
+
<xsl:variable name="id" select="string(translate(@xmi:id, ' ', ''))"/>
|
21
|
+
<rdf:Description rdf:about="{../@xmi:id}">
|
22
|
+
<ns0:ownedMember rdf:resource="{$id}"/>
|
23
|
+
</rdf:Description>
|
24
|
+
<rdf:Description rdf:about="{$id}" ns0:name="{@name}">
|
25
|
+
<rdf:type rdf:resource="http://uml/2#Stereotype"/>
|
26
|
+
<ns0:visibility rdf:resource="http://uml/2#visibilityKind_public"/>
|
27
|
+
</rdf:Description>
|
28
|
+
</xsl:template>
|
29
|
+
|
30
|
+
<!-- Add Stereotyped used but not defined -->
|
31
|
+
<xsl:template name="addStereotypeFromLabelIfDefinitionIsMissing">
|
32
|
+
<xsl:variable name="id" select="string(translate(., ' ', ''))"/>
|
33
|
+
<xsl:if test="not(key('definedStereotypes',$id))">
|
34
|
+
<rdf:Description rdf:about="{$id}" ns0:name="{.}">
|
35
|
+
<rdf:type rdf:resource="http://uml/2#Stereotype"/>
|
36
|
+
</rdf:Description>
|
37
|
+
</xsl:if>
|
38
|
+
</xsl:template>
|
39
|
+
|
40
|
+
<!-- GeneralClass -->
|
41
|
+
<xsl:template name="GeneralClass">
|
42
|
+
<!-- Documentation -->
|
43
|
+
<xsl:if test="//xmi:Extension//element[@xmi:idref = current()/@xmi:id]/properties/@documentation">
|
44
|
+
<xsl:call-template name="Comment">
|
45
|
+
<xsl:with-param name="body" select="//xmi:Extension//element[@xmi:idref = current()/@xmi:id]/properties/@documentation"/>
|
46
|
+
</xsl:call-template>
|
47
|
+
</xsl:if>
|
48
|
+
<!-- Stereotype -->
|
49
|
+
<rdf:Description rdf:about="{@xmi:id}" ns0:name="{@name}">
|
50
|
+
<xsl:if test="//xmi:Extension//element[@xmi:idref = current()/@xmi:id]/properties/@stereotype">
|
51
|
+
<ns0:appliedStereotype rdf:resource="{//xmi:Extension//element[@xmi:idref = current()/@xmi:id]/properties/@stereotype}"/>
|
52
|
+
</xsl:if>
|
53
|
+
<ns0:visibility rdf:resource="http://uml/2#visibilityKind_{@visibility}"/>
|
54
|
+
<xsl:if test="@isAbstract='true'">
|
55
|
+
<ns0:isAbstract>true</ns0:isAbstract>
|
56
|
+
</xsl:if>
|
57
|
+
</rdf:Description>
|
58
|
+
|
59
|
+
<!-- generalization -->
|
60
|
+
<xsl:apply-templates select="generalization"/>
|
61
|
+
<xsl:variable name="id" select="string(@xmi:id)"/>
|
62
|
+
<!-- ownedMember => uml:Realization -->
|
63
|
+
<xsl:for-each select="//packagedElement[@xmi:type='uml:Realization' and @client=$id]">
|
64
|
+
<rdf:Description rdf:about="{$id}">
|
65
|
+
<ns0:implementation rdf:resource="{@xmi:id}"/>
|
66
|
+
</rdf:Description>
|
67
|
+
<rdf:Description rdf:about="{@xmi:id}">
|
68
|
+
<rdf:type rdf:resource="http://uml/2#Implementation"/>
|
69
|
+
<ns0:visibility rdf:resource="http://uml/2#visibilityKind_public"/>
|
70
|
+
<ns0:client rdf:resource="{@client}"/>
|
71
|
+
<ns0:supplier rdf:resource="{@supplier}"/>
|
72
|
+
<ns0:realizingClassifier rdf:resource="{@realizingClassifier}"/>
|
73
|
+
<ns0:implementingClassifier rdf:resource="{@client}"/>
|
74
|
+
</rdf:Description>
|
75
|
+
</xsl:for-each>
|
76
|
+
<!-- ownedAttribute -->
|
77
|
+
<xsl:apply-templates select="ownedAttribute"/>
|
78
|
+
<!-- ownedOperation -->
|
79
|
+
<xsl:apply-templates select="ownedOperation"/>
|
80
|
+
</xsl:template>
|
81
|
+
<!-- Comment -->
|
82
|
+
<xsl:template name="Comment">
|
83
|
+
<xsl:param name="body"/>
|
84
|
+
<rdf:Description rdf:about="{@xmi:id}">
|
85
|
+
<xsl:call-template name="CommentDescription">
|
86
|
+
<xsl:with-param name="body" select="$body"/>
|
87
|
+
</xsl:call-template>
|
88
|
+
</rdf:Description>
|
89
|
+
</xsl:template>
|
90
|
+
<xsl:template name="CommentDescription">
|
91
|
+
<xsl:param name="body"/>
|
92
|
+
<ns0:ownedComment>
|
93
|
+
<rdf:Description rdf:about="_comment{@xmi:id}">
|
94
|
+
<rdf:type rdf:resource="http://uml/2#Comment"/>
|
95
|
+
<ns0:body>
|
96
|
+
<xsl:text disable-output-escaping="yes"><![CDATA[</xsl:text>
|
97
|
+
<xsl:value-of disable-output-escaping="yes" select="$body"/>
|
98
|
+
<xsl:text disable-output-escaping="yes">]]></xsl:text>
|
99
|
+
</ns0:body>
|
100
|
+
<ns0:annotatedElement rdf:resource="{../@xmi:id}"/>
|
101
|
+
</rdf:Description>
|
102
|
+
</ns0:ownedComment>
|
103
|
+
</xsl:template>
|
104
|
+
<!-- Package -->
|
105
|
+
<xsl:template name="Package">
|
106
|
+
<rdf:Description rdf:about="{@xmi:id}">
|
107
|
+
<rdf:type rdf:resource="http://uml/2#Package"/>
|
108
|
+
</rdf:Description>
|
109
|
+
<xsl:call-template name="GeneralClass"/>
|
110
|
+
</xsl:template>
|
111
|
+
<!-- Class -->
|
112
|
+
<xsl:template name="Class">
|
113
|
+
<rdf:Description rdf:about="{@xmi:id}">
|
114
|
+
<rdf:type rdf:resource="http://uml/2#Class"/>
|
115
|
+
</rdf:Description>
|
116
|
+
<xsl:call-template name="GeneralClass"/>
|
117
|
+
<!-- nestedClassifier -->
|
118
|
+
<xsl:apply-templates select="nestedClassifier"/>
|
119
|
+
</xsl:template>
|
120
|
+
<!-- Interface -->
|
121
|
+
<xsl:template name="Interface">
|
122
|
+
<rdf:Description rdf:about="{@xmi:id}">
|
123
|
+
<rdf:type rdf:resource="http://uml/2#Interface"/>
|
124
|
+
</rdf:Description>
|
125
|
+
<xsl:call-template name="GeneralClass"/>
|
126
|
+
</xsl:template>
|
127
|
+
<!-- Component -->
|
128
|
+
<xsl:template name="Component">
|
129
|
+
<rdf:Description rdf:about="{@xmi:id}">
|
130
|
+
<rdf:type rdf:resource="http://uml/2#Component"/>
|
131
|
+
</rdf:Description>
|
132
|
+
<xsl:call-template name="GeneralClass"/>
|
133
|
+
</xsl:template>
|
134
|
+
<!-- Signal -->
|
135
|
+
<xsl:template name="Signal">
|
136
|
+
<rdf:Description rdf:about="{@xmi:id}">
|
137
|
+
<rdf:type rdf:resource="http://uml/2#Signal"/>
|
138
|
+
</rdf:Description>
|
139
|
+
<xsl:call-template name="GeneralClass"/>
|
140
|
+
</xsl:template>
|
141
|
+
<!-- UseCase -->
|
142
|
+
<xsl:template name="UseCase">
|
143
|
+
<rdf:Description rdf:about="{@xmi:id}">
|
144
|
+
<rdf:type rdf:resource="http://uml/2#UseCase"/>
|
145
|
+
</rdf:Description>
|
146
|
+
<xsl:call-template name="GeneralClass"/>
|
147
|
+
</xsl:template>
|
148
|
+
<!-- Association -->
|
149
|
+
<xsl:template name="Association">
|
150
|
+
<rdf:Description rdf:about="{@xmi:id}">
|
151
|
+
<rdf:type rdf:resource="http://uml/2#Association"/>
|
152
|
+
<xsl:if test="@name">
|
153
|
+
<ns0:name>
|
154
|
+
<xsl:value-of select="@name"/>
|
155
|
+
</ns0:name>
|
156
|
+
</xsl:if>
|
157
|
+
<!-- Destination -->
|
158
|
+
<ns0:memberEnd rdf:resource="{memberEnd[1]/@xmi:idref}"/>
|
159
|
+
<!-- Source -->
|
160
|
+
<ns0:memberEnd rdf:resource="{memberEnd[2]/@xmi:idref}"/>
|
161
|
+
</rdf:Description>
|
162
|
+
<!-- Owner -->
|
163
|
+
<xsl:apply-templates select="ownedEnd"/>
|
164
|
+
</xsl:template>
|
165
|
+
<!-- Enumeration -->
|
166
|
+
<xsl:template name="Enumeration">
|
167
|
+
<!-- Documentation -->
|
168
|
+
<xsl:if test="//xmi:Extension//element[@xmi:idref = current()/@xmi:id]/properties/@documentation">
|
169
|
+
<xsl:call-template name="Comment">
|
170
|
+
<xsl:with-param name="body" select="//xmi:Extension//element[@xmi:idref = current()/@xmi:id]/properties/@documentation"/>
|
171
|
+
</xsl:call-template>
|
172
|
+
</xsl:if>
|
173
|
+
<rdf:Description rdf:about="{@xmi:id}" ns0:name="{@name}">
|
174
|
+
<rdf:type rdf:resource="http://uml/2#Enumeration"/>
|
175
|
+
<ns0:visibility rdf:resource="http://uml/2#visibilityKind_{@visibility}"/>
|
176
|
+
</rdf:Description>
|
177
|
+
<xsl:for-each select="ownedAttribute">
|
178
|
+
<!-- ownedLiteral -->
|
179
|
+
<xsl:if test="//xmi:Extension//attribute[@xmi:idref = current()/@xmi:id]/stereotype/@stereotype='enum'">
|
180
|
+
<xsl:call-template name="Literal"/>
|
181
|
+
</xsl:if>
|
182
|
+
<!-- ownedAttribute -->
|
183
|
+
<xsl:if test="not(//xmi:Extension//attribute[@xmi:idref = current()/@xmi:id]/stereotype/@stereotype='enum')">
|
184
|
+
<rdf:Description rdf:about="{../@xmi:id}">
|
185
|
+
<ns0:ownedAttribute rdf:resource="{@xmi:id}"/>
|
186
|
+
</rdf:Description>
|
187
|
+
<xsl:call-template name="Attribute"/>
|
188
|
+
</xsl:if>
|
189
|
+
</xsl:for-each>
|
190
|
+
<!-- ownedOperation -->
|
191
|
+
<xsl:apply-templates select="ownedOperation"/>
|
192
|
+
</xsl:template>
|
193
|
+
<!-- Attribute -->
|
194
|
+
<xsl:template name="Attribute">
|
195
|
+
<rdf:Description rdf:about="{@xmi:id}">
|
196
|
+
<rdf:type rdf:resource="http://uml/2#Property"/>
|
197
|
+
</rdf:Description>
|
198
|
+
<xsl:choose>
|
199
|
+
<xsl:when test="@association">
|
200
|
+
<xsl:variable name="connector" select="//xmi:Extension//connector[@xmi:idref = current()/@association]"/>
|
201
|
+
<xsl:variable name="thisEnd" select="$connector/source[role/@name=current()/@name]|$connector/target[role/@name=current()/@name]"/>
|
202
|
+
<xsl:variable name="otherEnd" select="$connector/source[not(role/@name=current()/@name)]|$connector/target[not(role/@name=current()/@name)]"/>
|
203
|
+
|
204
|
+
<!-- Documentation -->
|
205
|
+
<xsl:if test="$connector/documentation/@value">
|
206
|
+
<xsl:call-template name="Comment">
|
207
|
+
<xsl:with-param name="body" select="$connector/documentation/@value"/>
|
208
|
+
</xsl:call-template>
|
209
|
+
</xsl:if>
|
210
|
+
<xsl:if test="@name">
|
211
|
+
<rdf:Description rdf:about="{@xmi:id}" ns0:name="{@name}"/>
|
212
|
+
</xsl:if>
|
213
|
+
<xsl:if test="@isDerived='true'">
|
214
|
+
<rdf:Description rdf:about="{@xmi:id}" ns0:isDerived="true" />
|
215
|
+
</xsl:if>
|
216
|
+
<xsl:if test="@isOrdered='true'">
|
217
|
+
<rdf:Description rdf:about="{@xmi:id}" ns0:isOrdered="true"/>
|
218
|
+
</xsl:if>
|
219
|
+
<!-- TaggedValue isUnique -->
|
220
|
+
<xsl:choose>
|
221
|
+
<xsl:when test="contains($thisEnd/style/@value,'AllowDuplicates=1')">
|
222
|
+
<rdf:Description rdf:about="{@xmi:id}">
|
223
|
+
<ns0:isUnique>false</ns0:isUnique>
|
224
|
+
</rdf:Description>
|
225
|
+
</xsl:when>
|
226
|
+
<xsl:otherwise>
|
227
|
+
<rdf:Description rdf:about="{@xmi:id}">
|
228
|
+
<ns0:isUnique>true</ns0:isUnique>
|
229
|
+
</rdf:Description>
|
230
|
+
</xsl:otherwise>
|
231
|
+
</xsl:choose>
|
232
|
+
<rdf:Description rdf:about="{@xmi:id}">
|
233
|
+
<ns0:visibility rdf:resource="http://uml/2#visibilityKind_{@visibility}"/>
|
234
|
+
<!-- Stereotype -->
|
235
|
+
<xsl:if test="$thisEnd/role/@stereotype">
|
236
|
+
<ns0:appliedStereotype rdf:resource="{$thisEnd/role/@stereotype}"/>
|
237
|
+
</xsl:if>
|
238
|
+
<ns0:association rdf:resource="{@association}"/>
|
239
|
+
<ns0:aggregation rdf:resource="http://uml/2#aggregationKind_{$connector/source/type/@aggregation}"/>
|
240
|
+
</rdf:Description>
|
241
|
+
<xsl:variable name="qual" select="$otherEnd/constraints/@qualifier"/>
|
242
|
+
<xsl:if test="$qual">
|
243
|
+
<rdf:Description rdf:about="{@xmi:id}">
|
244
|
+
<ns0:qualifier rdf:resource="_qualifier{@xmi:id}"/>
|
245
|
+
</rdf:Description>
|
246
|
+
<rdf:Description rdf:about="_qualifier{@xmi:id}" ns0:name="{substring-before($qual, ':')}" ns0:isUnique="true">
|
247
|
+
<rdf:type rdf:resource="http://uml/2#Property"/>
|
248
|
+
<ns0:type rdf:resource="EAJava_{substring-after($qual, ':')}"/>
|
249
|
+
<ns0:visibility rdf:resource="http://uml/2#visibilityKind_private"/>
|
250
|
+
<ns0:aggregation rdf:resource="http://uml/2#aggregationKind_none"/>
|
251
|
+
<ns0:associationEnd rdf:resource="{@xmi:id}"/>
|
252
|
+
</rdf:Description>
|
253
|
+
</xsl:if>
|
254
|
+
<xsl:if test="$thisEnd/modifiers/@changeable='frozen'">
|
255
|
+
<!-- TODO : not in testsuite -->
|
256
|
+
<rdf:Description rdf:about="{@xmi:id}" ns0:isReadOnly="true"/>
|
257
|
+
</xsl:if>
|
258
|
+
<rdf:Description rdf:about="{@xmi:id}">
|
259
|
+
<ns0:lowerValue rdf:resource="_lowerValue{@xmi:id}"/>
|
260
|
+
<ns0:upperValue rdf:resource="_upperValue{@xmi:id}"/>
|
261
|
+
</rdf:Description>
|
262
|
+
<!-- <xsl:variable name="card" select="string($connector/target/type/@multiplicity)"/>
|
263
|
+
|
264
|
+
<xsl:variable name="lower" select="string(substring-before($card, '..'))"/>
|
265
|
+
<xsl:variable name="upper" select="string(substring-after($card, '..'))"/>
|
266
|
+
-->
|
267
|
+
<rdf:Description rdf:about="_lowerValue{@xmi:id}">
|
268
|
+
<rdf:type rdf:resource="http://uml/2#LiteralUnlimitedNatural"/>
|
269
|
+
<ns0:value>
|
270
|
+
<xsl:value-of select="lowerValue/@value"/>
|
271
|
+
</ns0:value>
|
272
|
+
</rdf:Description>
|
273
|
+
<rdf:Description rdf:about="_upperValue{@xmi:id}">
|
274
|
+
<rdf:type rdf:resource="http://uml/2#LiteralUnlimitedNatural"/>
|
275
|
+
<ns0:value>
|
276
|
+
<xsl:value-of select="upperValue/@value"/>
|
277
|
+
</ns0:value>
|
278
|
+
</rdf:Description>
|
279
|
+
</xsl:when>
|
280
|
+
<xsl:otherwise>
|
281
|
+
<xsl:variable name="attribute" select="//xmi:Extension//attribute[@xmi:idref = current()/@xmi:id]"/>
|
282
|
+
<!-- Documentation -->
|
283
|
+
<xsl:if test="$attribute/documentation/@value">
|
284
|
+
<xsl:call-template name="Comment">
|
285
|
+
<xsl:with-param name="body" select="$attribute/documentation/@value"/>
|
286
|
+
</xsl:call-template>
|
287
|
+
</xsl:if>
|
288
|
+
<xsl:if test="@name">
|
289
|
+
<rdf:Description rdf:about="{@xmi:id}" ns0:name="{@name}"/>
|
290
|
+
</xsl:if>
|
291
|
+
<xsl:if test="@isStatic='true'">
|
292
|
+
<rdf:Description rdf:about="{@xmi:id}">
|
293
|
+
<ns0:isStatic>true</ns0:isStatic>
|
294
|
+
</rdf:Description>
|
295
|
+
</xsl:if>
|
296
|
+
<xsl:if test="@isDerived='true'">
|
297
|
+
<rdf:Description rdf:about="{@xmi:id}">
|
298
|
+
<ns0:isDerived>true</ns0:isDerived>
|
299
|
+
</rdf:Description>
|
300
|
+
</xsl:if>
|
301
|
+
<xsl:if test="@isOrdered='true'">
|
302
|
+
<rdf:Description rdf:about="{@xmi:id}">
|
303
|
+
<ns0:isOrdered>true</ns0:isOrdered>
|
304
|
+
</rdf:Description>
|
305
|
+
</xsl:if>
|
306
|
+
<!-- TaggedValue isUnique -->
|
307
|
+
<xsl:choose>
|
308
|
+
<xsl:when test="$attribute/properties/@duplicates='1'">
|
309
|
+
<rdf:Description rdf:about="{@xmi:id}">
|
310
|
+
<ns0:isUnique>false</ns0:isUnique>
|
311
|
+
</rdf:Description>
|
312
|
+
</xsl:when>
|
313
|
+
<xsl:otherwise>
|
314
|
+
<rdf:Description rdf:about="{@xmi:id}">
|
315
|
+
<ns0:isUnique>true</ns0:isUnique>
|
316
|
+
</rdf:Description>
|
317
|
+
</xsl:otherwise>
|
318
|
+
</xsl:choose>
|
319
|
+
<rdf:Description rdf:about="{@xmi:id}">
|
320
|
+
<ns0:visibility rdf:resource="http://uml/2#visibilityKind_{@visibility}"/>
|
321
|
+
</rdf:Description>
|
322
|
+
<!-- Stereotype -->
|
323
|
+
<xsl:if test="$attribute/stereotype/@stereotype">
|
324
|
+
<rdf:Description rdf:about="{@xmi:id}">
|
325
|
+
<ns0:appliedStereotype rdf:resource="{$attribute/stereotype/@stereotype}"/>
|
326
|
+
</rdf:Description>
|
327
|
+
</xsl:if>
|
328
|
+
<rdf:Description rdf:about="{@xmi:id}">
|
329
|
+
<ns0:lowerValue rdf:resource="{lowerValue/@xmi:id}"/>
|
330
|
+
<ns0:upperValue rdf:resource="{upperValue/@xmi:id}"/>
|
331
|
+
</rdf:Description>
|
332
|
+
<rdf:Description rdf:about="{lowerValue/@xmi:id}">
|
333
|
+
<rdf:type rdf:resource="http://uml/2#{substring-after(lowerValue/@xmi:type, ':')}"/>
|
334
|
+
<ns0:value>
|
335
|
+
<xsl:value-of select="lowerValue/@value"/>
|
336
|
+
</ns0:value>
|
337
|
+
</rdf:Description>
|
338
|
+
<rdf:Description rdf:about="{upperValue/@xmi:id}">
|
339
|
+
<rdf:type rdf:resource="http://uml/2#{substring-after(upperValue/@xmi:type, ':')}"/>
|
340
|
+
<ns0:value>
|
341
|
+
<xsl:value-of select="upperValue/@value"/>
|
342
|
+
</ns0:value>
|
343
|
+
</rdf:Description>
|
344
|
+
</xsl:otherwise>
|
345
|
+
</xsl:choose>
|
346
|
+
<xsl:if test="type">
|
347
|
+
<rdf:Description rdf:about="{@xmi:id}">
|
348
|
+
<ns0:type rdf:resource="{type/@xmi:idref}"/>
|
349
|
+
</rdf:Description>
|
350
|
+
</xsl:if>
|
351
|
+
</xsl:template>
|
352
|
+
<!-- Literal -->
|
353
|
+
<xsl:template name="Literal">
|
354
|
+
<!-- Documentation -->
|
355
|
+
<xsl:if test="//xmi:Extension//attribute[@xmi:idref = current()/@xmi:id]/documentation/@value">
|
356
|
+
<xsl:call-template name="Comment">
|
357
|
+
<xsl:with-param name="body" select="//xmi:Extension//attribute[@xmi:idref = current()/@xmi:id]/documentation/@value"/>
|
358
|
+
</xsl:call-template>
|
359
|
+
</xsl:if>
|
360
|
+
<rdf:Description rdf:about="{../@xmi:id}">
|
361
|
+
<ns0:ownedLiteral rdf:resource="{@xmi:id}"/>
|
362
|
+
</rdf:Description>
|
363
|
+
<rdf:Description rdf:about="{@xmi:id}" ns0:name="{@name}">
|
364
|
+
<rdf:type rdf:resource="http://uml/2#EnumerationLiteral"/>
|
365
|
+
<ns0:visibility rdf:resource="http://uml/2#visibilityKind_{@visibility}"/>
|
366
|
+
<ns0:enumeration rdf:resource="{../@xmi:id}"/>
|
367
|
+
</rdf:Description>
|
368
|
+
</xsl:template>
|
369
|
+
<!-- ownedEnd -->
|
370
|
+
<xsl:template name="ownedEnd">
|
371
|
+
<xsl:variable name="connector" select="//xmi:Extension//connector[@xmi:idref = current()/@association]"/>
|
372
|
+
<rdf:Description rdf:about="{@xmi:id}">
|
373
|
+
<rdf:type rdf:resource="http://uml/2#Property"/>
|
374
|
+
<xsl:if test="@name">
|
375
|
+
<ns0:name>
|
376
|
+
<xsl:value-of select="@name"/>
|
377
|
+
</ns0:name>
|
378
|
+
</xsl:if>
|
379
|
+
<xsl:if test="@isDerived='true'">
|
380
|
+
<ns0:isDerived>true</ns0:isDerived>
|
381
|
+
</xsl:if>
|
382
|
+
<xsl:if test="@isOrdered='true'">
|
383
|
+
<ns0:isOrdered>true</ns0:isOrdered>
|
384
|
+
</xsl:if>
|
385
|
+
</rdf:Description>
|
386
|
+
|
387
|
+
<!-- TaggedValue isUnique -->
|
388
|
+
<xsl:choose>
|
389
|
+
<xsl:when test="contains($connector/source/style/@value,'AllowDuplicates=1')">
|
390
|
+
<rdf:Description rdf:about="{@xmi:id}">
|
391
|
+
<ns0:isUnique>false</ns0:isUnique>
|
392
|
+
</rdf:Description>
|
393
|
+
</xsl:when>
|
394
|
+
<xsl:otherwise>
|
395
|
+
<rdf:Description rdf:about="{@xmi:id}">
|
396
|
+
<ns0:isUnique>true</ns0:isUnique>
|
397
|
+
</rdf:Description>
|
398
|
+
</xsl:otherwise>
|
399
|
+
</xsl:choose>
|
400
|
+
<rdf:Description rdf:about="{@xmi:id}">
|
401
|
+
<ns0:visibility rdf:resource="http://uml/2#visibilityKind_{@visibility}"/>
|
402
|
+
</rdf:Description>
|
403
|
+
<rdf:Description rdf:about="{@xmi:id}">
|
404
|
+
<ns0:association rdf:resource="{@association}"/>
|
405
|
+
</rdf:Description>
|
406
|
+
<rdf:Description rdf:about="{@xmi:id}">
|
407
|
+
<ns0:aggregation rdf:resource="http://uml/2#aggregationKind_{@aggregation}"/>
|
408
|
+
</rdf:Description>
|
409
|
+
<rdf:Description rdf:about="{@xmi:id}">
|
410
|
+
<ns0:lowerValue rdf:resource="_lowerValue{@xmi:id}"/>
|
411
|
+
</rdf:Description>
|
412
|
+
<rdf:Description rdf:about="_lowerValue{@xmi:id}">
|
413
|
+
<rdf:type rdf:resource="http://uml/2#LiteralUnlimitedNatural"/>
|
414
|
+
</rdf:Description>
|
415
|
+
<rdf:Description rdf:about="_lowerValue{@xmi:id}">
|
416
|
+
<ns0:value>
|
417
|
+
<xsl:value-of select="lowerValue/@value"/>
|
418
|
+
</ns0:value>
|
419
|
+
</rdf:Description>
|
420
|
+
<rdf:Description rdf:about="{@xmi:id}">
|
421
|
+
<ns0:upperValue rdf:resource="_upperValue{@xmi:id}"/>
|
422
|
+
</rdf:Description>
|
423
|
+
<rdf:Description rdf:about="_upperValue{@xmi:id}">
|
424
|
+
<rdf:type rdf:resource="http://uml/2#LiteralUnlimitedNatural"/>
|
425
|
+
</rdf:Description>
|
426
|
+
<rdf:Description rdf:about="_upperValue{@xmi:id}">
|
427
|
+
<ns0:value>
|
428
|
+
<xsl:value-of select="upperValue/@value"/>
|
429
|
+
</ns0:value>
|
430
|
+
</rdf:Description>
|
431
|
+
<xsl:if test="type">
|
432
|
+
<rdf:Description rdf:about="{@xmi:id}">
|
433
|
+
<ns0:type rdf:resource="{type/@xmi:idref}"/>
|
434
|
+
</rdf:Description>
|
435
|
+
</xsl:if>
|
436
|
+
</xsl:template>
|
437
|
+
<!-- Operation -->
|
438
|
+
<xsl:template name="Operation">
|
439
|
+
<!-- Documentation -->
|
440
|
+
<xsl:if test="//xmi:Extension//operation[@xmi:idref = current()/@xmi:id]/documentation/@value">
|
441
|
+
<xsl:call-template name="Comment">
|
442
|
+
<xsl:with-param name="body" select="//xmi:Extension//operation[@xmi:idref = current()/@xmi:id]/documentation/@value"/>
|
443
|
+
</xsl:call-template>
|
444
|
+
</xsl:if>
|
445
|
+
<rdf:Description rdf:about="{@xmi:id}" ns0:name="{@name}">
|
446
|
+
<rdf:type rdf:resource="http://uml/2#Operation"/>
|
447
|
+
<ns0:visibility rdf:resource="http://uml/2#visibilityKind_{@visibility}"/>
|
448
|
+
</rdf:Description>
|
449
|
+
<!-- Stereotype -->
|
450
|
+
<xsl:if test="//xmi:Extension//operation[@xmi:idref = current()/@xmi:id]/stereotype/@stereotype">
|
451
|
+
<rdf:Description rdf:about="{@xmi:id}">
|
452
|
+
<ns0:appliedStereotype rdf:resource="{//xmi:Extension//operation[@xmi:idref = current()/@xmi:id]/stereotype/@stereotype}"/>
|
453
|
+
</rdf:Description>
|
454
|
+
</xsl:if>
|
455
|
+
<xsl:if test="@isAbstract='true'">
|
456
|
+
<rdf:Description rdf:about="{@xmi:id}">
|
457
|
+
<ns0:isAbstract>true</ns0:isAbstract>
|
458
|
+
</rdf:Description>
|
459
|
+
</xsl:if>
|
460
|
+
<xsl:if test="@isStatic='true'">
|
461
|
+
<rdf:Description rdf:about="{@xmi:id}">
|
462
|
+
<ns0:isStatic>true</ns0:isStatic>
|
463
|
+
</rdf:Description>
|
464
|
+
</xsl:if>
|
465
|
+
<!-- ownedParameter -->
|
466
|
+
<xsl:variable name="method" select="."/>
|
467
|
+
<xsl:apply-templates select="ownedParameter"/>
|
468
|
+
<!-- raisedException -->
|
469
|
+
<xsl:variable name="id" select="string(@xmi:id)"/>
|
470
|
+
|
471
|
+
<xsl:for-each select="//xmi:Extension//operation[@xmi:idref = current()/@xmi:id]/tags/tag[@name='throws']">
|
472
|
+
<xsl:variable name="exceptionName" select="current()"/>
|
473
|
+
<xsl:variable name="classRaised" select="//packagedElement[@xmi:type='uml:Class' and @name=current()/@value]/@xmi:id"/>
|
474
|
+
<xsl:choose>
|
475
|
+
<xsl:when test="$classRaised">
|
476
|
+
<rdf:Description rdf:about="{$id}">
|
477
|
+
<ns0:raisedException rdf:resource="{$classRaised}"/>
|
478
|
+
</rdf:Description>
|
479
|
+
</xsl:when>
|
480
|
+
<xsl:otherwise>
|
481
|
+
<!-- Method raised an exception but we were not able to find it in model -->
|
482
|
+
<!-- We are going to create a class for this exception with a meaningful name so user knows what to fix -->
|
483
|
+
<!-- Class will be stored in the same package as the one containing our method -->
|
484
|
+
<!-- TODO: support case when method is in an inner class -->
|
485
|
+
<xsl:variable name="gid" select="string($method/@xmi:id)"/>
|
486
|
+
<rdf:Description rdf:about="{$id}">
|
487
|
+
<ns0:raisedException rdf:resource="{$method/@xmi:id}_{generate-id($exceptionName)}"/>
|
488
|
+
</rdf:Description>
|
489
|
+
<rdf:Description rdf:about="{$method/../../@xmi:id}">
|
490
|
+
<ns0:ownedMember rdf:resource="{$method/@xmi:id}_{generate-id($exceptionName)}"/>
|
491
|
+
</rdf:Description>
|
492
|
+
<rdf:Description rdf:about="{$method/@xmi:id}_{generate-id($exceptionName)}">
|
493
|
+
<rdf:type rdf:resource="http://uml/2#Class"/>
|
494
|
+
<ns0:name>FIX_UML_MODEL_unknown_exception_<xsl:value-of select="$exceptionName"/>_thown_by_<xsl:value-of select="$method/@name"/></ns0:name>
|
495
|
+
</rdf:Description>
|
496
|
+
</xsl:otherwise>
|
497
|
+
</xsl:choose>
|
498
|
+
</xsl:for-each>
|
499
|
+
</xsl:template>
|
500
|
+
<!-- Parameter -->
|
501
|
+
<xsl:template name="Parameter">
|
502
|
+
<!-- Documentation -->
|
503
|
+
<xsl:if test="//xmi:Extension//parameter[@xmi:idref = current()/@xmi:id]/documentation/@value">
|
504
|
+
<xsl:call-template name="Comment">
|
505
|
+
<xsl:with-param name="body" select="//xmi:Extension//parameter[@xmi:idref = current()/@xmi:id]/documentation/@value"/>
|
506
|
+
</xsl:call-template>
|
507
|
+
</xsl:if>
|
508
|
+
<rdf:Description rdf:about="{@xmi:id}" ns0:name="{@name}">
|
509
|
+
<rdf:type rdf:resource="http://uml/2#Parameter"/>
|
510
|
+
<ns0:direction rdf:resource="http://uml/2#parameterDirectionKind_{@direction}"/>
|
511
|
+
<xsl:if test="@type">
|
512
|
+
<ns0:type rdf:resource="{@type}"/>
|
513
|
+
</xsl:if>
|
514
|
+
</rdf:Description>
|
515
|
+
<!-- BUG Export XMI EA
|
516
|
+
<xsl:if test="not(@type)">
|
517
|
+
<xsl:if test="//xmi:Extension//parameter[@xmi:idref = current()/@xmi:id]/properties/@type != 'void'">
|
518
|
+
<rdf:Description rdf:about="{@xmi:id}">
|
519
|
+
<ns0:type rdf:resource="_{//xmi:Extension//parameter[@xmi:idref = current()/@xmi:id]/properties/@type}DataType"/>
|
520
|
+
</rdf:Description>
|
521
|
+
</xsl:if>
|
522
|
+
|
523
|
+
</xsl:if>
|
524
|
+
-->
|
525
|
+
</xsl:template>
|
526
|
+
<!-- xmi:XMI -->
|
527
|
+
<xsl:template match="xmi:XMI">
|
528
|
+
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:uml="http://schema.omg.org/spec/UML/2.1" xmlns:xmi="http://schema.omg.org/spec/XMI/2.1">
|
529
|
+
<!-- ownedMember -->
|
530
|
+
<xsl:apply-templates select="uml:Model"/>
|
531
|
+
|
532
|
+
<!-- list every stereotype used and call template which will add it if EA has forgotten to do so -->
|
533
|
+
<xsl:for-each select="//*[@stereotype][generate-id()=generate-id(key('usedStereotypes',@stereotype)[1])]/@stereotype">
|
534
|
+
<xsl:call-template name="addStereotypeFromLabelIfDefinitionIsMissing" />
|
535
|
+
</xsl:for-each>
|
536
|
+
</rdf:RDF>
|
537
|
+
</xsl:template>
|
538
|
+
<!-- uml:Model -->
|
539
|
+
<xsl:template match="uml:Model">
|
540
|
+
<!-- root model element is removed because it breaks incremental loading -->
|
541
|
+
<!-- (sub-packages are directly linked to model when in a fragment export -->
|
542
|
+
<!--
|
543
|
+
<rdf:Description rdf:about="_{@name}" ns0:name="{@name}">
|
544
|
+
<rdf:type rdf:resource="http://uml/2#Model"/>
|
545
|
+
<ns0:visibility rdf:resource="http://uml/2#visibilityKind_{@visibility}"/>
|
546
|
+
</rdf:Description>
|
547
|
+
-->
|
548
|
+
<!-- uml:Profile -->
|
549
|
+
<xsl:apply-templates select="uml:Profile" xmlns:uml="http://schema.omg.org/spec/UML/2.1/uml.xml"/>
|
550
|
+
<!-- ownedMember -->
|
551
|
+
<xsl:apply-templates select="packagedElement"/>
|
552
|
+
</xsl:template>
|
553
|
+
|
554
|
+
<xsl:template name="ownedMember" >
|
555
|
+
<rdf:Description rdf:about="{../@xmi:id}">
|
556
|
+
<ns0:ownedMember rdf:resource="{@xmi:id}"/>
|
557
|
+
</rdf:Description>
|
558
|
+
</xsl:template>
|
559
|
+
|
560
|
+
<xsl:template match="packagedElement[@xmi:type='uml:StateMachine']">
|
561
|
+
<xsl:call-template name="ownedMember"/>
|
562
|
+
<xsl:if test="//xmi:Extension//element[@xmi:idref = current()/@xmi:id]/properties/@documentation">
|
563
|
+
<xsl:call-template name="Comment">
|
564
|
+
<xsl:with-param name="body" select="//xmi:Extension//element[@xmi:idref = current()/@xmi:id]/properties/@documentation"/>
|
565
|
+
</xsl:call-template>
|
566
|
+
</xsl:if>
|
567
|
+
|
568
|
+
<rdf:Description rdf:about="{@xmi:id}" ns0:name="{@name}">
|
569
|
+
<rdf:type rdf:resource="http://uml/2#StateMachine"/>
|
570
|
+
<xsl:for-each select="region">
|
571
|
+
<ns0:region>
|
572
|
+
<rdf:Description rdf:about="{@xmi:id}" ns0:name="{@name}">
|
573
|
+
<rdf:type rdf:resource="http://uml/2#Region"/>
|
574
|
+
<xsl:for-each select="subvertex">
|
575
|
+
<ns0:subvertex>
|
576
|
+
<xsl:call-template name="vertex"/>
|
577
|
+
</ns0:subvertex>
|
578
|
+
</xsl:for-each>
|
579
|
+
<xsl:for-each select="transition">
|
580
|
+
<ns0:transition>
|
581
|
+
<xsl:call-template name="transition"/>
|
582
|
+
</ns0:transition>
|
583
|
+
</xsl:for-each>
|
584
|
+
<xsl:if test="//xmi:Extension//element[@xmi:idref = current()/@xmi:id]/properties/@documentation">
|
585
|
+
<xsl:call-template name="CommentDescription">
|
586
|
+
<xsl:with-param name="body" select="//xmi:Extension//element[@xmi:idref = current()/@xmi:id]/properties/@documentation"/>
|
587
|
+
</xsl:call-template>
|
588
|
+
</xsl:if>
|
589
|
+
</rdf:Description>
|
590
|
+
</ns0:region>
|
591
|
+
</xsl:for-each>
|
592
|
+
</rdf:Description>
|
593
|
+
</xsl:template>
|
594
|
+
|
595
|
+
<xsl:template name="vertex">
|
596
|
+
<rdf:Description rdf:about="{@xmi:id}" ns0:name="{@name}">
|
597
|
+
<xsl:choose>
|
598
|
+
<xsl:when test="@xmi:type='uml:FinalState'">
|
599
|
+
<rdf:type rdf:resource="http://uml/2#FinalState"/>
|
600
|
+
</xsl:when>
|
601
|
+
<xsl:when test="@xmi:type='uml:Pseudostate'">
|
602
|
+
<rdf:type rdf:resource="http://uml/2#Pseudostate"/>
|
603
|
+
<xsl:if test="@kind='choice'">
|
604
|
+
<ns0:kind rdf:resource="http://uml/2#pseudostateKind_choice"/>
|
605
|
+
</xsl:if>
|
606
|
+
<xsl:if test="@kind='initial'">
|
607
|
+
<ns0:kind rdf:resource="http://uml/2#pseudostateKind_initial"/>
|
608
|
+
</xsl:if>
|
609
|
+
<xsl:if test="@kind='fork'">
|
610
|
+
<ns0:kind rdf:resource="http://uml/2#pseudostateKind_fork"/>
|
611
|
+
</xsl:if>
|
612
|
+
<!-- EA does not have pseudo state join -->
|
613
|
+
<xsl:if test="@kind='join'">
|
614
|
+
<ns0:kind rdf:resource="http://uml/2#pseudostateKind_join"/>
|
615
|
+
</xsl:if>
|
616
|
+
</xsl:when>
|
617
|
+
<xsl:otherwise>
|
618
|
+
<rdf:type rdf:resource="http://uml/2#State"/>
|
619
|
+
</xsl:otherwise>
|
620
|
+
</xsl:choose>
|
621
|
+
<xsl:if test="//xmi:Extension//element[@xmi:idref = current()/@xmi:id]/properties/@documentation">
|
622
|
+
<xsl:call-template name="CommentDescription">
|
623
|
+
<xsl:with-param name="body" select="//xmi:Extension//element[@xmi:idref = current()/@xmi:id]/properties/@documentation"/>
|
624
|
+
</xsl:call-template>
|
625
|
+
</xsl:if>
|
626
|
+
</rdf:Description>
|
627
|
+
</xsl:template>
|
628
|
+
|
629
|
+
<xsl:template name="transition">
|
630
|
+
<rdf:Description rdf:about="{@xmi:id}">
|
631
|
+
<rdf:type rdf:resource="http://uml/2#Transition"/>
|
632
|
+
<xsl:if test="@name">
|
633
|
+
<ns0:name><xsl:value-of select="@name"/></ns0:name>
|
634
|
+
</xsl:if>
|
635
|
+
<ns0:source rdf:resource="{@source}"/>
|
636
|
+
<ns0:target rdf:resource="{@target}"/>
|
637
|
+
<!--
|
638
|
+
<xsl:if test="//xmi:Extension//attribute[@xmi:idref = current()/@xmi:id]/documentation/@value">
|
639
|
+
<xsl:call-template name="CommentDescription">
|
640
|
+
<xsl:with-param name="body" select="//xmi:Extension//attribute[@xmi:idref = current()/@xmi:id]/documentation/@value"/>
|
641
|
+
</xsl:call-template>
|
642
|
+
</xsl:if>
|
643
|
+
-->
|
644
|
+
</rdf:Description>
|
645
|
+
</xsl:template>
|
646
|
+
<!-- ownedMember => uml:Package -->
|
647
|
+
<xsl:template match="packagedElement[@xmi:type='uml:Package']">
|
648
|
+
<xsl:choose>
|
649
|
+
<xsl:when test="../@xmi:id">
|
650
|
+
<xsl:call-template name="ownedMember"/>
|
651
|
+
</xsl:when>
|
652
|
+
<xsl:otherwise>
|
653
|
+
<!-- ignore root package -->
|
654
|
+
<!--
|
655
|
+
<rdf:Description rdf:about="_{../@name}">
|
656
|
+
<ns0:ownedMember rdf:resource="{@xmi:id}"/>
|
657
|
+
</rdf:Description>
|
658
|
+
-->
|
659
|
+
</xsl:otherwise>
|
660
|
+
</xsl:choose>
|
661
|
+
<xsl:call-template name="Package"/>
|
662
|
+
<!-- ownedMember -->
|
663
|
+
<xsl:apply-templates select="packagedElement"/>
|
664
|
+
</xsl:template>
|
665
|
+
<!-- ownedMember => uml:Class -->
|
666
|
+
<xsl:template match="packagedElement[@xmi:type='uml:Class']">
|
667
|
+
<xsl:call-template name="ownedMember"/>
|
668
|
+
<xsl:call-template name="Class"/>
|
669
|
+
</xsl:template>
|
670
|
+
<!-- ownedMember => uml:Interface -->
|
671
|
+
<xsl:template match="packagedElement[@xmi:type='uml:Interface']">
|
672
|
+
<xsl:call-template name="ownedMember"/>
|
673
|
+
<xsl:call-template name="Interface"/>
|
674
|
+
</xsl:template>
|
675
|
+
<!-- ownedMember => uml:Component -->
|
676
|
+
<xsl:template match="packagedElement[@xmi:type='uml:Component']">
|
677
|
+
<xsl:call-template name="ownedMember"/>
|
678
|
+
<xsl:call-template name="Component"/>
|
679
|
+
</xsl:template>
|
680
|
+
|
681
|
+
<!-- ownedMember => uml:Enumeration -->
|
682
|
+
<xsl:template match="packagedElement[@xmi:type='uml:Enumeration']">
|
683
|
+
<xsl:call-template name="ownedMember"/>
|
684
|
+
<xsl:call-template name="Enumeration"/>
|
685
|
+
</xsl:template>
|
686
|
+
<!-- ownedMember => uml:Signal -->
|
687
|
+
<xsl:template match="packagedElement[@xmi:type='uml:Signal']">
|
688
|
+
<xsl:call-template name="ownedMember"/>
|
689
|
+
<xsl:call-template name="Signal"/>
|
690
|
+
</xsl:template>
|
691
|
+
<!-- ownedMember => uml:UseCase -->
|
692
|
+
<xsl:template match="packagedElement[@xmi:type='uml:UseCase']">
|
693
|
+
<xsl:call-template name="ownedMember"/>
|
694
|
+
<xsl:call-template name="UseCase"/>
|
695
|
+
</xsl:template>
|
696
|
+
<!-- ownedMember => uml:Association -->
|
697
|
+
<xsl:template match="packagedElement[@xmi:type='uml:Association']">
|
698
|
+
<xsl:call-template name="ownedMember"/>
|
699
|
+
<xsl:call-template name="Association"/>
|
700
|
+
</xsl:template>
|
701
|
+
<!-- ownedMember => uml:PrimitiveType -->
|
702
|
+
<xsl:template match="packagedElement[@xmi:type='uml:PrimitiveType']">
|
703
|
+
<xsl:call-template name="ownedMember"/>
|
704
|
+
<rdf:Description rdf:about="{@xmi:id}" ns0:name="{@name}">
|
705
|
+
<rdf:type rdf:resource="http://uml/2#DataType"/>
|
706
|
+
<ns0:visibility rdf:resource="http://uml/2#visibilityKind_{@visibility}"/>
|
707
|
+
</rdf:Description>
|
708
|
+
</xsl:template>
|
709
|
+
<!-- ownedAttribute => uml:Property-->
|
710
|
+
<xsl:template match="ownedAttribute[@xmi:type='uml:Property']">
|
711
|
+
<rdf:Description rdf:about="{../@xmi:id}">
|
712
|
+
<ns0:ownedAttribute rdf:resource="{@xmi:id}"/>
|
713
|
+
</rdf:Description>
|
714
|
+
<xsl:call-template name="Attribute"/>
|
715
|
+
</xsl:template>
|
716
|
+
<!-- ownedEnd => uml:Property-->
|
717
|
+
<xsl:template match="ownedEnd[@xmi:type='uml:Property']">
|
718
|
+
<rdf:Description rdf:about="{../@xmi:id}">
|
719
|
+
<ns0:ownedEnd rdf:resource="{@xmi:id}"/>
|
720
|
+
</rdf:Description>
|
721
|
+
<xsl:call-template name="ownedEnd"/>
|
722
|
+
</xsl:template>
|
723
|
+
<!-- ownedOperation -->
|
724
|
+
<xsl:template match="ownedOperation">
|
725
|
+
<rdf:Description rdf:about="{../@xmi:id}">
|
726
|
+
<ns0:ownedOperation rdf:resource="{@xmi:id}"/>
|
727
|
+
</rdf:Description>
|
728
|
+
<xsl:call-template name="Operation"/>
|
729
|
+
</xsl:template>
|
730
|
+
<!-- ownedParameter -->
|
731
|
+
<xsl:template match="ownedParameter">
|
732
|
+
<xsl:if test="not(@type = 'EAJava_void')">
|
733
|
+
<rdf:Description rdf:about="{../@xmi:id}">
|
734
|
+
<ns0:ownedParameter rdf:resource="{@xmi:id}"/>
|
735
|
+
</rdf:Description>
|
736
|
+
<xsl:if test="@direction = 'return'">
|
737
|
+
<!-- returnTypeCardinality -->
|
738
|
+
<xsl:if test="//xmi:Extension//operation[@xmi:idref = current()/../@xmi:id]/tags/tag[@name='returnTypeCardinality']">
|
739
|
+
<rdf:Description rdf:about="{@xmi:id}">
|
740
|
+
<ns0:lowerValue rdf:resource="_lowerValue{@xmi:id}"/>
|
741
|
+
<ns0:upperValue rdf:resource="_upperValue{@xmi:id}"/>
|
742
|
+
</rdf:Description>
|
743
|
+
<xsl:variable name="card" select="string(//xmi:Extension//operation[@xmi:idref = current()/../@xmi:id]/tags/tag[@name='returnTypeCardinality']/@value)"/>
|
744
|
+
<xsl:variable name="lower" select="string(substring-before($card, '..'))"/>
|
745
|
+
<xsl:variable name="upper" select="string(substring-after($card, '..'))"/>
|
746
|
+
<rdf:Description rdf:about="_lowerValue{@xmi:id}">
|
747
|
+
<rdf:type rdf:resource="http://uml/2#LiteralUnlimitedNatural"/>
|
748
|
+
<ns0:value>
|
749
|
+
<xsl:value-of select="$lower"/>
|
750
|
+
<xsl:if test="not($lower)">
|
751
|
+
<xsl:value-of select="$card"/>
|
752
|
+
</xsl:if>
|
753
|
+
</ns0:value>
|
754
|
+
</rdf:Description>
|
755
|
+
<rdf:Description rdf:about="_upperValue{@xmi:id}">
|
756
|
+
<rdf:type rdf:resource="http://uml/2#LiteralUnlimitedNatural"/>
|
757
|
+
<ns0:value>
|
758
|
+
<xsl:value-of select="$upper"/>
|
759
|
+
<xsl:if test="not($upper)">
|
760
|
+
<xsl:value-of select="$card"/>
|
761
|
+
</xsl:if>
|
762
|
+
</ns0:value>
|
763
|
+
</rdf:Description>
|
764
|
+
</xsl:if>
|
765
|
+
<!-- returnTypeIsOrdered -->
|
766
|
+
<xsl:if test="//xmi:Extension//operation[@xmi:idref = current()/../@xmi:id]/tags/tag[@name='returnTypeIsOrdered']">
|
767
|
+
<rdf:Description rdf:about="{@xmi:id}">
|
768
|
+
<ns0:isOrdered>true</ns0:isOrdered>
|
769
|
+
</rdf:Description>
|
770
|
+
</xsl:if>
|
771
|
+
</xsl:if>
|
772
|
+
<xsl:call-template name="Parameter"/>
|
773
|
+
</xsl:if>
|
774
|
+
</xsl:template>
|
775
|
+
<!-- generalization -->
|
776
|
+
<xsl:template match="generalization">
|
777
|
+
<rdf:Description rdf:about="{../@xmi:id}">
|
778
|
+
<ns0:generalization rdf:resource="{@xmi:id}"/>
|
779
|
+
</rdf:Description>
|
780
|
+
<rdf:Description rdf:about="{@xmi:id}">
|
781
|
+
<rdf:type rdf:resource="http://uml/2#Generalization"/>
|
782
|
+
<ns0:general rdf:resource="{@general}"/>
|
783
|
+
</rdf:Description>
|
784
|
+
</xsl:template>
|
785
|
+
<!-- nestedClassifier -->
|
786
|
+
<xsl:template match="nestedClassifier">
|
787
|
+
<rdf:Description rdf:about="{../@xmi:id}">
|
788
|
+
<ns0:nestedClassifier rdf:resource="{@xmi:id}"/>
|
789
|
+
</rdf:Description>
|
790
|
+
<xsl:call-template name="Class"/>
|
791
|
+
</xsl:template>
|
792
|
+
<!-- ######################## -->
|
793
|
+
<!-- uml:Profile -->
|
794
|
+
<xsl:template match="uml:Profile" xmlns:uml="http://schema.omg.org/spec/UML/2.1/uml.xml">
|
795
|
+
<xsl:call-template name="Profile"/>
|
796
|
+
</xsl:template>
|
797
|
+
<!-- uml:Profile -->
|
798
|
+
<xsl:template match="uml:Profile">
|
799
|
+
|
800
|
+
</xsl:template>
|
801
|
+
<!-- ownedMember => uml:Stereotype -->
|
802
|
+
<xsl:template match="packagedElement[@xmi:type='uml:Stereotype']">
|
803
|
+
<xsl:call-template name="Stereotype"/>
|
804
|
+
</xsl:template>
|
805
|
+
</xsl:stylesheet>
|