ontomde-core 2.0.0 → 2.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/Manifest.txt +6 -7
- data/lib/ontomde-core/completion.rb +4 -4
- data/lib/ontomde-core/converter-ea/{XMI2RDFS.xslt → 7_1_829/XMI2RDFS.xslt} +39 -34
- data/lib/ontomde-core/converter-ea/7_1_829/XMI2RDFS_step2.xslt +24 -0
- data/lib/ontomde-core/converter-ea/7_1_833/XMI2RDFS.xslt +817 -0
- data/lib/ontomde-core/converter-ea/7_1_833/XMI2RDFS_step2.xslt +24 -0
- data/lib/ontomde-core/converter-ea/7_5_843/XMI2RDFS.xslt +817 -0
- data/lib/ontomde-core/converter-ea/7_5_843/XMI2RDFS_step2.xslt +24 -0
- data/lib/ontomde-core/customERB.rb +1 -1
- data/lib/ontomde-core/custom_method_missing.rb +6 -6
- data/lib/ontomde-core/fileLoader.rb +49 -34
- data/lib/ontomde-core/fileTypes.rb +10 -10
- data/lib/ontomde-core/helper.rb +46 -21
- data/lib/ontomde-core/inspector.rb +2 -2
- data/lib/ontomde-core/log.rb +1 -1
- data/lib/ontomde-core/meta.rb +15 -15
- data/lib/ontomde-core/resource.rb +12 -10
- data/lib/ontomde-core/resourceSet.rb +3 -1
- data/lib/ontomde-core/triplet.rb +2 -0
- data/lib/ontomde-core/version.rb +1 -1
- metadata +8 -9
- data/lib/ontomde-core/inspector/rails/vendor/plugins/auto_complete/README +0 -23
- data/lib/ontomde-core/inspector/rails/vendor/plugins/auto_complete/Rakefile +0 -22
- data/lib/ontomde-core/inspector/rails/vendor/plugins/auto_complete/init.rb +0 -2
- data/lib/ontomde-core/inspector/rails/vendor/plugins/auto_complete/lib/auto_complete.rb +0 -47
- data/lib/ontomde-core/inspector/rails/vendor/plugins/auto_complete/lib/auto_complete_macros_helper.rb +0 -143
- data/lib/ontomde-core/inspector/rails/vendor/plugins/auto_complete/test/auto_complete_test.rb +0 -67
data/Manifest.txt
CHANGED
@@ -9,7 +9,12 @@ lib/ontomde-core/bootstrap_rdfs.rb
|
|
9
9
|
lib/ontomde-core/clone.rb
|
10
10
|
lib/ontomde-core/completion.rb
|
11
11
|
lib/ontomde-core/context.rb
|
12
|
-
lib/ontomde-core/converter-ea/XMI2RDFS.xslt
|
12
|
+
lib/ontomde-core/converter-ea/7_1_829/XMI2RDFS.xslt
|
13
|
+
lib/ontomde-core/converter-ea/7_1_829/XMI2RDFS_step2.xslt
|
14
|
+
lib/ontomde-core/converter-ea/7_1_833/XMI2RDFS.xslt
|
15
|
+
lib/ontomde-core/converter-ea/7_1_833/XMI2RDFS_step2.xslt
|
16
|
+
lib/ontomde-core/converter-ea/7_5_843/XMI2RDFS.xslt
|
17
|
+
lib/ontomde-core/converter-ea/7_5_843/XMI2RDFS_step2.xslt
|
13
18
|
lib/ontomde-core/converter-ea/msxsl.exe
|
14
19
|
lib/ontomde-core/customERB.rb
|
15
20
|
lib/ontomde-core/custom_method_missing.rb
|
@@ -82,12 +87,6 @@ lib/ontomde-core/inspector/rails/script/process/spawner
|
|
82
87
|
lib/ontomde-core/inspector/rails/script/runner
|
83
88
|
lib/ontomde-core/inspector/rails/script/server
|
84
89
|
lib/ontomde-core/inspector/rails/test/test_helper.rb
|
85
|
-
lib/ontomde-core/inspector/rails/vendor/plugins/auto_complete/README
|
86
|
-
lib/ontomde-core/inspector/rails/vendor/plugins/auto_complete/Rakefile
|
87
|
-
lib/ontomde-core/inspector/rails/vendor/plugins/auto_complete/init.rb
|
88
|
-
lib/ontomde-core/inspector/rails/vendor/plugins/auto_complete/lib/auto_complete.rb
|
89
|
-
lib/ontomde-core/inspector/rails/vendor/plugins/auto_complete/lib/auto_complete_macros_helper.rb
|
90
|
-
lib/ontomde-core/inspector/rails/vendor/plugins/auto_complete/test/auto_complete_test.rb
|
91
90
|
lib/ontomde-core/inspector/setup_rails.sh
|
92
91
|
lib/ontomde-core/log.rb
|
93
92
|
lib/ontomde-core/meta.rb
|
@@ -2,7 +2,7 @@
|
|
2
2
|
class Class
|
3
3
|
def getAddedMethods(base=nil)
|
4
4
|
begin
|
5
|
-
b=
|
5
|
+
b=''
|
6
6
|
|
7
7
|
cmd="#{self.name}.new(::Crdf_Repository.new(),'abc')"
|
8
8
|
c=eval cmd
|
@@ -30,7 +30,7 @@ def getCompletionFile(&loadModules)
|
|
30
30
|
c=Class.new
|
31
31
|
|
32
32
|
puts <<TPL
|
33
|
-
module #{o.name.gsub(/^C/,
|
33
|
+
module #{o.name.gsub(/^C/,'M') }#{o.getAddedMethods.collect {|m|
|
34
34
|
%{
|
35
35
|
def #{m.to_s} ; end}
|
36
36
|
}}
|
@@ -39,9 +39,9 @@ TPL
|
|
39
39
|
}
|
40
40
|
end
|
41
41
|
|
42
|
-
require
|
42
|
+
require 'erb'
|
43
43
|
getCompletionFile {
|
44
44
|
require 'ontomde-uml2'
|
45
45
|
m=Crdf_Repository.new
|
46
46
|
m.loadUml2
|
47
|
-
}
|
47
|
+
}
|
@@ -5,6 +5,11 @@
|
|
5
5
|
<!-- Create Defined and used Stereotypes for later creation of missing stereotype definitions -->
|
6
6
|
<xsl:key name="definedStereotypes" match="packagedElement[@xmi:type='uml:Stereotype']" use="@name"/>
|
7
7
|
<xsl:key name="usedStereotypes" match="*[@stereotype]" use="@stereotype" />
|
8
|
+
<xsl:key name="ExtensionElementIdRef" match="//xmi:Extension//element" use="@xmi:idref"/>
|
9
|
+
<xsl:key name="ExtensionAttributeIdRef" match="//xmi:Extension//attribute" use="@xmi:idref"/>
|
10
|
+
<xsl:key name="ExtensionConnectorIdRef" match="//xmi:Extension//connector" use="@xmi:idref"/>
|
11
|
+
<xsl:key name="ExtensionOperationIdRef" match="//xmi:Extension//operation" use="@xmi:idref"/>
|
12
|
+
<xsl:key name="ExtensionParameterIdRef" match="//xmi:Extension//parameter" use="@xmi:idref"/>
|
8
13
|
|
9
14
|
<!-- Profile -->
|
10
15
|
<xsl:template name="Profile" xmlns:uml="http://schema.omg.org/spec/UML/2.1/uml.xml">
|
@@ -40,15 +45,15 @@
|
|
40
45
|
<!-- GeneralClass -->
|
41
46
|
<xsl:template name="GeneralClass">
|
42
47
|
<!-- Documentation -->
|
43
|
-
<xsl:if test="
|
48
|
+
<xsl:if test="key('ExtensionElementIdRef',current()/@xmi:id)/properties/@documentation">
|
44
49
|
<xsl:call-template name="Comment">
|
45
|
-
<xsl:with-param name="body" select="
|
50
|
+
<xsl:with-param name="body" select="key('ExtensionElementIdRef',current()/@xmi:id)/properties/@documentation"/>
|
46
51
|
</xsl:call-template>
|
47
52
|
</xsl:if>
|
48
53
|
<!-- Stereotype -->
|
49
54
|
<rdf:Description rdf:about="{@xmi:id}" ns0:name="{@name}">
|
50
|
-
<xsl:if test="
|
51
|
-
<ns0:appliedStereotype rdf:resource="{
|
55
|
+
<xsl:if test="key('ExtensionElementIdRef',current()/@xmi:id)/properties/@stereotype">
|
56
|
+
<ns0:appliedStereotype rdf:resource="{key('ExtensionElementIdRef',current()/@xmi:id)/properties/@stereotype}"/>
|
52
57
|
</xsl:if>
|
53
58
|
<ns0:visibility rdf:resource="http://uml/2#visibilityKind_{@visibility}"/>
|
54
59
|
<xsl:if test="@isAbstract='true'">
|
@@ -165,9 +170,9 @@
|
|
165
170
|
<!-- Enumeration -->
|
166
171
|
<xsl:template name="Enumeration">
|
167
172
|
<!-- Documentation -->
|
168
|
-
<xsl:if test="
|
173
|
+
<xsl:if test="key('ExtensionElementIdRef',current()/@xmi:id)/properties/@documentation">
|
169
174
|
<xsl:call-template name="Comment">
|
170
|
-
<xsl:with-param name="body" select="
|
175
|
+
<xsl:with-param name="body" select="key('ExtensionElementIdRef',current()/@xmi:id)/properties/@documentation"/>
|
171
176
|
</xsl:call-template>
|
172
177
|
</xsl:if>
|
173
178
|
<rdf:Description rdf:about="{@xmi:id}" ns0:name="{@name}">
|
@@ -176,11 +181,11 @@
|
|
176
181
|
</rdf:Description>
|
177
182
|
<xsl:for-each select="ownedAttribute">
|
178
183
|
<!-- ownedLiteral -->
|
179
|
-
<xsl:if test="
|
184
|
+
<xsl:if test="key('ExtensionAttributeIdRef',current()/@xmi:id)/stereotype/@stereotype='enum'">
|
180
185
|
<xsl:call-template name="Literal"/>
|
181
186
|
</xsl:if>
|
182
187
|
<!-- ownedAttribute -->
|
183
|
-
<xsl:if test="not(
|
188
|
+
<xsl:if test="not(key('ExtensionAttributeIdRef',current()/@xmi:id)/stereotype/@stereotype='enum')">
|
184
189
|
<rdf:Description rdf:about="{../@xmi:id}">
|
185
190
|
<ns0:ownedAttribute rdf:resource="{@xmi:id}"/>
|
186
191
|
</rdf:Description>
|
@@ -197,7 +202,7 @@
|
|
197
202
|
</rdf:Description>
|
198
203
|
<xsl:choose>
|
199
204
|
<xsl:when test="@association">
|
200
|
-
<xsl:variable name="connector" select="
|
205
|
+
<xsl:variable name="connector" select="key('ExtensionConnectorIdRef',current()/@association)"/>
|
201
206
|
<xsl:variable name="thisEnd" select="$connector/source[role/@name=current()/@name]|$connector/target[role/@name=current()/@name]"/>
|
202
207
|
<xsl:variable name="otherEnd" select="$connector/source[not(role/@name=current()/@name)]|$connector/target[not(role/@name=current()/@name)]"/>
|
203
208
|
|
@@ -278,7 +283,7 @@
|
|
278
283
|
</rdf:Description>
|
279
284
|
</xsl:when>
|
280
285
|
<xsl:otherwise>
|
281
|
-
<xsl:variable name="attribute" select="
|
286
|
+
<xsl:variable name="attribute" select="key('ExtensionAttributeIdRef',current()/@xmi:id)"/>
|
282
287
|
<!-- Documentation -->
|
283
288
|
<xsl:if test="$attribute/documentation/@value">
|
284
289
|
<xsl:call-template name="Comment">
|
@@ -352,9 +357,9 @@
|
|
352
357
|
<!-- Literal -->
|
353
358
|
<xsl:template name="Literal">
|
354
359
|
<!-- Documentation -->
|
355
|
-
<xsl:if test="
|
360
|
+
<xsl:if test="key('ExtensionAttributeIdRef',current()/@xmi:id)/documentation/@value">
|
356
361
|
<xsl:call-template name="Comment">
|
357
|
-
<xsl:with-param name="body" select="
|
362
|
+
<xsl:with-param name="body" select="key('ExtensionAttributeIdRef', current()/@xmi:id)/documentation/@value"/>
|
358
363
|
</xsl:call-template>
|
359
364
|
</xsl:if>
|
360
365
|
<rdf:Description rdf:about="{../@xmi:id}">
|
@@ -368,7 +373,7 @@
|
|
368
373
|
</xsl:template>
|
369
374
|
<!-- ownedEnd -->
|
370
375
|
<xsl:template name="ownedEnd">
|
371
|
-
<xsl:variable name="connector" select="
|
376
|
+
<xsl:variable name="connector" select="key('ExtensionConnectorIdRef',current()/@association)"/>
|
372
377
|
<rdf:Description rdf:about="{@xmi:id}">
|
373
378
|
<rdf:type rdf:resource="http://uml/2#Property"/>
|
374
379
|
<xsl:if test="@name">
|
@@ -437,9 +442,9 @@
|
|
437
442
|
<!-- Operation -->
|
438
443
|
<xsl:template name="Operation">
|
439
444
|
<!-- Documentation -->
|
440
|
-
<xsl:if test="
|
445
|
+
<xsl:if test="key('ExtensionOperationIdRef',current()/@xmi:id)/documentation/@value">
|
441
446
|
<xsl:call-template name="Comment">
|
442
|
-
<xsl:with-param name="body" select="
|
447
|
+
<xsl:with-param name="body" select="key('ExtensionOperationIdRef',current()/@xmi:id)/documentation/@value"/>
|
443
448
|
</xsl:call-template>
|
444
449
|
</xsl:if>
|
445
450
|
<rdf:Description rdf:about="{@xmi:id}" ns0:name="{@name}">
|
@@ -447,9 +452,9 @@
|
|
447
452
|
<ns0:visibility rdf:resource="http://uml/2#visibilityKind_{@visibility}"/>
|
448
453
|
</rdf:Description>
|
449
454
|
<!-- Stereotype -->
|
450
|
-
<xsl:if test="
|
455
|
+
<xsl:if test="key('ExtensionOperationIdRef',current()/@xmi:id)/stereotype/@stereotype">
|
451
456
|
<rdf:Description rdf:about="{@xmi:id}">
|
452
|
-
<ns0:appliedStereotype rdf:resource="{
|
457
|
+
<ns0:appliedStereotype rdf:resource="{key('ExtensionOperationIdRef',current()/@xmi:id)/stereotype/@stereotype}"/>
|
453
458
|
</rdf:Description>
|
454
459
|
</xsl:if>
|
455
460
|
<xsl:if test="@isAbstract='true'">
|
@@ -468,7 +473,7 @@
|
|
468
473
|
<!-- raisedException -->
|
469
474
|
<xsl:variable name="id" select="string(@xmi:id)"/>
|
470
475
|
|
471
|
-
<xsl:for-each select="
|
476
|
+
<xsl:for-each select="key('ExtensionOperationIdRef',current()/@xmi:id)/tags/tag[@name='throws']">
|
472
477
|
<xsl:variable name="exceptionName" select="current()"/>
|
473
478
|
<xsl:variable name="classRaised" select="//packagedElement[@xmi:type='uml:Class' and @name=current()/@value]/@xmi:id"/>
|
474
479
|
<xsl:choose>
|
@@ -491,7 +496,7 @@
|
|
491
496
|
</rdf:Description>
|
492
497
|
<rdf:Description rdf:about="{$method/@xmi:id}_{generate-id($exceptionName)}">
|
493
498
|
<rdf:type rdf:resource="http://uml/2#Class"/>
|
494
|
-
<ns0:name>FIX_UML_MODEL_unknown_exception_<xsl:value-of select="$exceptionName"/>
|
499
|
+
<ns0:name>FIX_UML_MODEL_unknown_exception_<xsl:value-of select="$exceptionName"/>_thrown_by_<xsl:value-of select="$method/@name"/></ns0:name>
|
495
500
|
</rdf:Description>
|
496
501
|
</xsl:otherwise>
|
497
502
|
</xsl:choose>
|
@@ -500,9 +505,9 @@
|
|
500
505
|
<!-- Parameter -->
|
501
506
|
<xsl:template name="Parameter">
|
502
507
|
<!-- Documentation -->
|
503
|
-
<xsl:if test="
|
508
|
+
<xsl:if test="key('ExtensionParameterIdRef',current()/@xmi:id)/documentation/@value">
|
504
509
|
<xsl:call-template name="Comment">
|
505
|
-
<xsl:with-param name="body" select="
|
510
|
+
<xsl:with-param name="body" select="key('ExtensionParameterIdRef',current()/@xmi:id)/documentation/@value"/>
|
506
511
|
</xsl:call-template>
|
507
512
|
</xsl:if>
|
508
513
|
<rdf:Description rdf:about="{@xmi:id}" ns0:name="{@name}">
|
@@ -514,9 +519,9 @@
|
|
514
519
|
</rdf:Description>
|
515
520
|
<!-- BUG Export XMI EA
|
516
521
|
<xsl:if test="not(@type)">
|
517
|
-
<xsl:if test="
|
522
|
+
<xsl:if test="key('ExtensionParameterIdRef',current()/@xmi:id)/properties/@type != 'void'">
|
518
523
|
<rdf:Description rdf:about="{@xmi:id}">
|
519
|
-
<ns0:type rdf:resource="_{
|
524
|
+
<ns0:type rdf:resource="_{key('ExtensionParameterIdRef',current()/@xmi:id)/properties/@type}DataType"/>
|
520
525
|
</rdf:Description>
|
521
526
|
</xsl:if>
|
522
527
|
|
@@ -559,9 +564,9 @@
|
|
559
564
|
|
560
565
|
<xsl:template match="packagedElement[@xmi:type='uml:StateMachine']">
|
561
566
|
<xsl:call-template name="ownedMember"/>
|
562
|
-
<xsl:if test="
|
567
|
+
<xsl:if test="key('ExtensionElementIdRef',current()/@xmi:id)/properties/@documentation">
|
563
568
|
<xsl:call-template name="Comment">
|
564
|
-
<xsl:with-param name="body" select="
|
569
|
+
<xsl:with-param name="body" select="key('ExtensionElementIdRef',current()/@xmi:id)/properties/@documentation"/>
|
565
570
|
</xsl:call-template>
|
566
571
|
</xsl:if>
|
567
572
|
|
@@ -581,9 +586,9 @@
|
|
581
586
|
<xsl:call-template name="transition"/>
|
582
587
|
</ns0:transition>
|
583
588
|
</xsl:for-each>
|
584
|
-
<xsl:if test="
|
589
|
+
<xsl:if test="key('ExtensionElementIdRef',current()/@xmi:id)/properties/@documentation">
|
585
590
|
<xsl:call-template name="CommentDescription">
|
586
|
-
<xsl:with-param name="body" select="
|
591
|
+
<xsl:with-param name="body" select="key('ExtensionElementIdRef',current()/@xmi:id)/properties/@documentation"/>
|
587
592
|
</xsl:call-template>
|
588
593
|
</xsl:if>
|
589
594
|
</rdf:Description>
|
@@ -618,9 +623,9 @@
|
|
618
623
|
<rdf:type rdf:resource="http://uml/2#State"/>
|
619
624
|
</xsl:otherwise>
|
620
625
|
</xsl:choose>
|
621
|
-
<xsl:if test="
|
626
|
+
<xsl:if test="key('ExtensionElementIdRef',current()/@xmi:id)/properties/@documentation">
|
622
627
|
<xsl:call-template name="CommentDescription">
|
623
|
-
<xsl:with-param name="body" select="
|
628
|
+
<xsl:with-param name="body" select="key('ExtensionElementIdRef',current()/@xmi:id)/properties/@documentation"/>
|
624
629
|
</xsl:call-template>
|
625
630
|
</xsl:if>
|
626
631
|
</rdf:Description>
|
@@ -635,9 +640,9 @@
|
|
635
640
|
<ns0:source rdf:resource="{@source}"/>
|
636
641
|
<ns0:target rdf:resource="{@target}"/>
|
637
642
|
<!--
|
638
|
-
<xsl:if test="
|
643
|
+
<xsl:if test="key('ExtensionAttributeIdRef',current()/@xmi:id)/documentation/@value">
|
639
644
|
<xsl:call-template name="CommentDescription">
|
640
|
-
<xsl:with-param name="body" select="
|
645
|
+
<xsl:with-param name="body" select="key('ExtensionAttributeIdRef',current()/@xmi:id)/documentation/@value"/>
|
641
646
|
</xsl:call-template>
|
642
647
|
</xsl:if>
|
643
648
|
-->
|
@@ -735,12 +740,12 @@
|
|
735
740
|
</rdf:Description>
|
736
741
|
<xsl:if test="@direction = 'return'">
|
737
742
|
<!-- returnTypeCardinality -->
|
738
|
-
<xsl:if test="
|
743
|
+
<xsl:if test="key('ExtensionOperationIdRef',current()/../@xmi:id)/tags/tag[@name='returnTypeCardinality']">
|
739
744
|
<rdf:Description rdf:about="{@xmi:id}">
|
740
745
|
<ns0:lowerValue rdf:resource="_lowerValue{@xmi:id}"/>
|
741
746
|
<ns0:upperValue rdf:resource="_upperValue{@xmi:id}"/>
|
742
747
|
</rdf:Description>
|
743
|
-
<xsl:variable name="card" select="string(
|
748
|
+
<xsl:variable name="card" select="string(key('ExtensionOperationIdRef',current()/../@xmi:id)/tags/tag[@name='returnTypeCardinality']/@value)"/>
|
744
749
|
<xsl:variable name="lower" select="string(substring-before($card, '..'))"/>
|
745
750
|
<xsl:variable name="upper" select="string(substring-after($card, '..'))"/>
|
746
751
|
<rdf:Description rdf:about="_lowerValue{@xmi:id}">
|
@@ -763,7 +768,7 @@
|
|
763
768
|
</rdf:Description>
|
764
769
|
</xsl:if>
|
765
770
|
<!-- returnTypeIsOrdered -->
|
766
|
-
<xsl:if test="
|
771
|
+
<xsl:if test="key('ExtensionOperationIdRef',current()/../@xmi:id)/tags/tag[@name='returnTypeIsOrdered']">
|
767
772
|
<rdf:Description rdf:about="{@xmi:id}">
|
768
773
|
<ns0:isOrdered>true</ns0:isOrdered>
|
769
774
|
</rdf:Description>
|
@@ -0,0 +1,24 @@
|
|
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
|
+
|
6
|
+
<xsl:template match="*|@*">
|
7
|
+
<xsl:copy>
|
8
|
+
<xsl:apply-templates select="@*"/>
|
9
|
+
<xsl:apply-templates select="node()"/>
|
10
|
+
</xsl:copy>
|
11
|
+
</xsl:template>
|
12
|
+
<xsl:template match="@rdf:about[starts-with(.,'EA')]">
|
13
|
+
<xsl:attribute name="rdf:about">
|
14
|
+
<xsl:value-of select="concat('http://EA#',.)"/>
|
15
|
+
</xsl:attribute>
|
16
|
+
</xsl:template>
|
17
|
+
<xsl:template match="@rdf:resource[starts-with(.,'EA')]">
|
18
|
+
<xsl:attribute name="rdf:resource">
|
19
|
+
<xsl:value-of select="concat('http://EA#',.)"/>
|
20
|
+
</xsl:attribute>
|
21
|
+
</xsl:template>
|
22
|
+
|
23
|
+
|
24
|
+
</xsl:stylesheet>
|