ontomde-uml2 1.0.6 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. data/Manifest.txt +38 -22
  2. data/README.txt +21 -2
  3. data/Rakefile +1 -1
  4. data/bin/ontomde-umlToProtege +4 -0
  5. data/lib/ontomde-uml2.rb +19 -17
  6. data/lib/ontomde-uml2/UMLdatatypeMapping.rb +441 -0
  7. data/lib/ontomde-uml2/autoImplement.rb +170 -166
  8. data/lib/ontomde-uml2/check.rb +1 -1
  9. data/lib/ontomde-uml2/component.rb +45 -0
  10. data/lib/ontomde-uml2/createAndAdd.rb +32 -20
  11. data/lib/ontomde-uml2/dotDiagram.rb +1 -1
  12. data/lib/ontomde-uml2/kb.rb +4 -0
  13. data/lib/ontomde-uml2/kb/MYMODEL_kb.pprj +2377 -0
  14. data/lib/ontomde-uml2/kb/MYMODEL_kb.rdf +2 -0
  15. data/lib/ontomde-uml2/kb/MYMODEL_kb.rdfs +441 -0
  16. data/lib/ontomde-uml2/kb/MYMODEL_meta.pprj +874 -0
  17. data/lib/ontomde-uml2/kb/command.rb +143 -0
  18. data/lib/ontomde-uml2/kb/datatypeMapping.rb +99 -0
  19. data/lib/ontomde-uml2/kb/protege.rb +687 -0
  20. data/lib/ontomde-uml2/multipleInheritance.rb +1 -1
  21. data/lib/ontomde-uml2/salvageErrors.rb +1 -1
  22. data/lib/ontomde-uml2/select.rb +83 -5
  23. data/lib/ontomde-uml2/shortcut.rb +23 -8
  24. data/lib/ontomde-uml2/uml2.pprj +943 -0
  25. data/lib/ontomde-uml2/uml2.rb +62 -29
  26. data/lib/ontomde-uml2/uml2.rdf +768 -0
  27. data/lib/ontomde-uml2/uml2.rdfs +3233 -0
  28. data/lib/ontomde-uml2/umlx.rb +31 -9
  29. data/lib/ontomde-uml2/version.rb +1 -1
  30. data/lib/ontomde-uml2/versionSignature.rb +1 -1
  31. data/lib/ontomde-uml2/xsd.pprj +1063 -0
  32. data/lib/ontomde-uml2/xsd.rdf +2 -0
  33. data/lib/ontomde-uml2/xsd.rdfs +17 -0
  34. data/test/_test_dot.rb +1 -1
  35. data/test/_test_perf.rb +1 -1
  36. data/test/test_base.rb +1 -1
  37. data/test/test_clone.rb +5 -5
  38. data/test/test_misc.rb +3 -3
  39. metadata +47 -29
@@ -0,0 +1,2 @@
1
+ <?xml version='1.0' encoding='UTF-8'?>
2
+ <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"/>
@@ -0,0 +1,17 @@
1
+ <?xml version='1.0' encoding='UTF-8'?>
2
+ <!DOCTYPE rdf:RDF [
3
+ <!ENTITY rdf 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'>
4
+ <!ENTITY a 'http://protege.stanford.edu/system#'>
5
+ <!ENTITY xsd 'http://ft/xsd#'>
6
+ <!ENTITY rdfs 'http://www.w3.org/2000/01/rdf-schema#'>
7
+ ]>
8
+ <rdf:RDF xmlns:rdf="&rdf;"
9
+ xmlns:a="&a;"
10
+ xmlns:xsd="&xsd;"
11
+ xmlns:rdfs="&rdfs;">
12
+ <rdfs:Class rdf:about="&xsd;xsd"
13
+ a:role="abstract"
14
+ rdfs:label="xsd:xsd">
15
+ <rdfs:subClassOf rdf:resource="&rdfs;Resource"/>
16
+ </rdfs:Class>
17
+ </rdf:RDF>
@@ -8,7 +8,7 @@ class TC_uml_dot_tc1 < Test::Unit::TestCase
8
8
  def setup
9
9
  return if !@@model.nil?
10
10
  log.debug "Chargement du meta-modele UML2"
11
- @@model=Crdf_Model.new
11
+ @@model=Crdf_Repository.new
12
12
  @@model.loadUml2
13
13
  log.debug "Chargement du modele"
14
14
  @@model.loadModelFromFile("#{File.dirname(__FILE__)}/model/simple2.emx.nt")
@@ -18,7 +18,7 @@ def test_perf_SID
18
18
  log.debug "scale_cpu=#{scale_cpu.utime}"
19
19
 
20
20
  cpu=Benchmark.measure {
21
- model=Crdf_Model.new
21
+ model=Crdf_Repository.new
22
22
 
23
23
  model.loadUml2
24
24
  log.debug "Chargement du SID"
@@ -8,7 +8,7 @@ class Test_ontomde_base < Test::Unit::TestCase
8
8
  def setup
9
9
  return if !@@model.nil?
10
10
  log.debug "Chargement du meta-modele UML2"
11
- @@model=Crdf_Model.new
11
+ @@model=Crdf_Repository.new
12
12
  @@model.loadUml2
13
13
  log.debug "Chargement du modele"
14
14
  @@model.loadModelFromFile("#{File.dirname(__FILE__)}/model/simple2.emx.nt")
@@ -6,7 +6,7 @@ class TC_unit_test_clone < Test::Unit::TestCase
6
6
  def setup
7
7
  if(@@model==nil)
8
8
  log.debug 'Chargement du meta-modele UML2'
9
- @@model=Crdf_Model.new
9
+ @@model=Crdf_Repository.new
10
10
  @@model.loadUml2
11
11
  log.debug 'Chargement du modele simple2.emx.nt'
12
12
  @@model.loadModelFromFile("#{File.dirname(__FILE__)}/model/simple2.emx.nt")
@@ -38,11 +38,11 @@ def test_clone_set_add
38
38
  c2=c1.rdfx_clone
39
39
  assert(!c2.nil?)
40
40
  #log.debug "B) #{model_length_initial} ---> #{@@model.length} (+#{@@model.length-model_length_initial})"
41
- assert(c1.rdf_model.length > model_length_initial)
42
- assert(c1.rdf_model==c2.rdf_model)
41
+ assert(c1.rdf_Repository.length > model_length_initial)
42
+ assert(c1.rdf_Repository==c2.rdf_Repository)
43
43
  # 21 : valeur de reference (a verifier)
44
- log.debug c1.rdf_model.length - model_length_initial
45
- assert(c1.rdf_model.length - model_length_initial == 23)
44
+ log.debug c1.rdf_Repository.length - model_length_initial
45
+ assert(c1.rdf_Repository.length - model_length_initial == 23)
46
46
 
47
47
  #log.debug "C) c2.to_s=\"#{c2.to_s}\""
48
48
  assert(c2.to_s=='ClassDeTest')
@@ -2,7 +2,7 @@
2
2
  require 'ontomde-uml2'
3
3
  #require 'ontomde-core/clone.rb'
4
4
 
5
- #class Crdf_Model
5
+ #class Crdf_Repository
6
6
  #{ include Uml2
7
7
  #e0ind
8
8
 
@@ -39,7 +39,7 @@ module DumpUML
39
39
 
40
40
  instance_variables.each {
41
41
  |iv|
42
- if (iv!='@rdf_model')
42
+ if (iv!='@rdf_Repository')
43
43
  f.write('\/\/ variable '+iv+"-->#{instance_variable_get(iv).to_s}\n")
44
44
  end
45
45
  }
@@ -72,7 +72,7 @@ class TC_MyTest < Test::Unit::TestCase
72
72
  def setup
73
73
  if(@@model==nil)
74
74
  log.info 'Chargement du meta-modele UML2'
75
- @@model=Crdf_Model.new
75
+ @@model=Crdf_Repository.new
76
76
  @@model.loadUml2
77
77
  log.info 'Chargement du modele sid'
78
78
  @@model.loadModelFromFile("#{File.dirname(__FILE__)}/model/SID.emx.nt")
metadata CHANGED
@@ -1,30 +1,31 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ontomde-uml2
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.6
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
- - Stephane (Pierre) Carrie
7
+ - Orange-labs BIZZ/CIL/SAM
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-03-25 00:00:00 +01:00
12
+ date: 2008-08-08 00:00:00 +02:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: ontomde-core
17
+ type: :runtime
17
18
  version_requirement:
18
19
  version_requirements: !ruby/object:Gem::Requirement
19
20
  requirements:
20
21
  - - "="
21
22
  - !ruby/object:Gem::Version
22
- version: 1.0.6
23
+ version: 2.0.0
23
24
  version:
24
- description: "ontoMDE-uml2 contains UML2 meta-model and helper files to manipulate a UML2 model. ontoMDE-uml2 uses ontoMDA-core which provides core fonctionalities for loading a model in RDF/RDFS format. ontoMDE-UML2 is used by ontoMDE-java which contains rules for generating java Code. == FEATURES/PROBLEMS: * UML2 meta-model definition in RDFS format * Ruby helper methods for handling a UML2 model. * UML Stereotype handling helpers. * UML predefined enumerations handling helper. * UML model manipulations helpers (add interface implementations, transform multiple inheritance into single inheritance, ...) == SYNOPSIS: require 'ontomde-uml2'"
25
+ description: "ontoMDE-uml2 contains UML2 meta-model and helper files to manipulate a UML2 model. ontoMDE-uml2 uses ontoMDE-core which provides core fonctionalities for loading a model in RDF/RDFS format. ontoMDE-UML2 is used by ontoMDE-java which contains rules for generating java Code. ontoMDE contains primitives for converting a UML2 model into a Prot\xE9g\xE9 2000 RDF/RDFS model. UML2 classes are converted into RDFS classes to allow data instances to be created. This feature is used heavily for providing editors for creating tests data for programs. == FEATURES/PROBLEMS: * UML2 meta-model definition in RDFS format * Ruby helper methods for handling a UML2 model. * UML Stereotype handling helpers. * UML predefined enumerations handling helper. * UML model manipulations helpers (add interface implementations, transform multiple inheritance into single inheritance, ...) UML2 to Protege 2000 features: * single and incremental use. * transparent update of name changes from source to target mode. * class * abstract class * interface * enumerated types * generalization links * implementation links * property, association, composition and aggregation * single and multivalued properties * mandatory fields (cardinaly=0 or >0) * UML documentation notes export to Protege 2000 for easy reference."
25
26
  email: stephanepierre.carrie -nospam- @orange-ftgroup.com
26
- executables: []
27
-
27
+ executables:
28
+ - ontomde-umlToProtege
28
29
  extensions: []
29
30
 
30
31
  extra_rdoc_files:
@@ -36,41 +37,58 @@ files:
36
37
  - Manifest.txt
37
38
  - README.txt
38
39
  - Rakefile
40
+ - bin/ontomde-umlToProtege
39
41
  - lib/ontomde-uml2.rb
40
- - lib/ontomde-uml2/uml2.rdfs.nt.completion.rb
41
- - lib/ontomde-uml2/version.rb
42
+ - lib/ontomde-uml2/UMLdatatypeMapping.rb
43
+ - lib/ontomde-uml2/autoImplement.rb
42
44
  - lib/ontomde-uml2/cardinality.rb
43
45
  - lib/ontomde-uml2/check.rb
44
- - lib/ontomde-uml2/uml2.rdfs.nt
45
- - lib/ontomde-uml2/dotDiagram.rb
46
- - lib/ontomde-uml2/nt_old_to_nt_new.sh
46
+ - lib/ontomde-uml2/component.rb
47
47
  - lib/ontomde-uml2/createAndAdd.rb
48
- - lib/ontomde-uml2/enumerated.rb
49
- - lib/ontomde-uml2/select.rb
50
- - lib/ontomde-uml2/salvageErrors.rb
51
- - lib/ontomde-uml2/multipleInheritance.rb
52
- - lib/ontomde-uml2/uml2.rb
53
- - lib/ontomde-uml2/owner.rb
54
- - lib/ontomde-uml2/versionSignature.rb
55
48
  - lib/ontomde-uml2/depencies.rb
49
+ - lib/ontomde-uml2/dotDiagram.rb
50
+ - lib/ontomde-uml2/enumerated.rb
56
51
  - lib/ontomde-uml2/extension.rb
57
- - lib/ontomde-uml2/umlx.rb
58
- - lib/ontomde-uml2/autoImplement.rb
59
52
  - lib/ontomde-uml2/helper.rb
53
+ - lib/ontomde-uml2/kb.rb
54
+ - lib/ontomde-uml2/kb/MYMODEL_kb.pprj
55
+ - lib/ontomde-uml2/kb/MYMODEL_kb.rdf
56
+ - lib/ontomde-uml2/kb/MYMODEL_kb.rdfs
57
+ - lib/ontomde-uml2/kb/MYMODEL_meta.pprj
58
+ - lib/ontomde-uml2/kb/command.rb
59
+ - lib/ontomde-uml2/kb/datatypeMapping.rb
60
+ - lib/ontomde-uml2/kb/protege.rb
61
+ - lib/ontomde-uml2/multipleInheritance.rb
62
+ - lib/ontomde-uml2/nt_old_to_nt_new.sh
63
+ - lib/ontomde-uml2/owner.rb
64
+ - lib/ontomde-uml2/salvageErrors.rb
65
+ - lib/ontomde-uml2/select.rb
60
66
  - lib/ontomde-uml2/shortcut.rb
67
+ - lib/ontomde-uml2/uml2.pprj
68
+ - lib/ontomde-uml2/uml2.rb
69
+ - lib/ontomde-uml2/uml2.rdf
70
+ - lib/ontomde-uml2/uml2.rdfs
71
+ - lib/ontomde-uml2/uml2.rdfs.nt
72
+ - lib/ontomde-uml2/uml2.rdfs.nt.completion.rb
73
+ - lib/ontomde-uml2/umlx.rb
74
+ - lib/ontomde-uml2/version.rb
75
+ - lib/ontomde-uml2/versionSignature.rb
76
+ - lib/ontomde-uml2/xsd.pprj
77
+ - lib/ontomde-uml2/xsd.rdf
78
+ - lib/ontomde-uml2/xsd.rdfs
79
+ - test/_test_dot.rb
61
80
  - test/_test_perf.rb
62
- - test/test_misc.rb
63
- - test/test_base.rb
64
- - test/test_ontomde-uml2.rb
81
+ - test/model/.project
65
82
  - test/model/SID.emx
66
83
  - test/model/SID.emx.nt
67
- - test/model/simple2WithProfile.emx
68
- - test/model/simple2.emx
69
84
  - test/model/SID.uml2
70
- - test/model/.project
85
+ - test/model/simple2.emx
71
86
  - test/model/simple2.emx.nt
87
+ - test/model/simple2WithProfile.emx
88
+ - test/test_base.rb
72
89
  - test/test_clone.rb
73
- - test/_test_dot.rb
90
+ - test/test_misc.rb
91
+ - test/test_ontomde-uml2.rb
74
92
  has_rdoc: true
75
93
  homepage: http://ontomde.rubyforge.org
76
94
  post_install_message:
@@ -96,7 +114,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
96
114
  requirements: []
97
115
 
98
116
  rubyforge_project: ontomde
99
- rubygems_version: 1.0.1
117
+ rubygems_version: 1.2.0
100
118
  signing_key:
101
119
  specification_version: 2
102
120
  summary: OntoMDE UML2 handling cartridge