lutaml 0.7.7 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (111) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +7 -6
  3. data/.rubocop.yml +1 -0
  4. data/LUTAML.adoc +372 -0
  5. data/Makefile +2 -0
  6. data/bin/console +5 -0
  7. data/bin/folder_yaml2lutaml.sh +6 -0
  8. data/bin/plantuml2lutaml +59 -0
  9. data/bin/yaml2lutaml +144 -0
  10. data/exe/lutaml-sysml +20 -0
  11. data/exe/lutaml-wsd2uml +59 -0
  12. data/exe/lutaml-yaml2uml +144 -0
  13. data/lib/lutaml/express/README.adoc +55 -0
  14. data/lib/lutaml/express/parsers/exp.rb +21 -0
  15. data/lib/lutaml/express/version.rb +7 -0
  16. data/lib/lutaml/express.rb +9 -0
  17. data/lib/lutaml/parser.rb +7 -0
  18. data/lib/lutaml/sysml/README.md +40 -0
  19. data/lib/lutaml/sysml/allocate.rb +8 -0
  20. data/lib/lutaml/sysml/allocated.rb +7 -0
  21. data/lib/lutaml/sysml/binding_connector.rb +7 -0
  22. data/lib/lutaml/sysml/block.rb +27 -0
  23. data/lib/lutaml/sysml/constraint_block.rb +12 -0
  24. data/lib/lutaml/sysml/copy.rb +6 -0
  25. data/lib/lutaml/sysml/derive_requirement.rb +7 -0
  26. data/lib/lutaml/sysml/nested_connector_end.rb +11 -0
  27. data/lib/lutaml/sysml/refine.rb +7 -0
  28. data/lib/lutaml/sysml/requirement.rb +34 -0
  29. data/lib/lutaml/sysml/requirement_related.rb +7 -0
  30. data/lib/lutaml/sysml/satisfy.rb +7 -0
  31. data/lib/lutaml/sysml/test_case.rb +22 -0
  32. data/lib/lutaml/sysml/trace.rb +7 -0
  33. data/lib/lutaml/sysml/verify.rb +6 -0
  34. data/lib/lutaml/sysml/version.rb +5 -0
  35. data/lib/lutaml/sysml/xmi_file.rb +417 -0
  36. data/lib/lutaml/sysml.rb +10 -0
  37. data/lib/lutaml/uml/README.adoc +44 -0
  38. data/lib/lutaml/uml/abstraction.rb +11 -0
  39. data/lib/lutaml/uml/activity.rb +11 -0
  40. data/lib/lutaml/uml/actor.rb +19 -0
  41. data/lib/lutaml/uml/association.rb +43 -0
  42. data/lib/lutaml/uml/behavior.rb +11 -0
  43. data/lib/lutaml/uml/class.rb +83 -0
  44. data/lib/lutaml/uml/classifier.rb +11 -0
  45. data/lib/lutaml/uml/connector.rb +21 -0
  46. data/lib/lutaml/uml/constraint.rb +12 -0
  47. data/lib/lutaml/uml/constructor_end.rb +16 -0
  48. data/lib/lutaml/uml/data_type.rb +75 -0
  49. data/lib/lutaml/uml/dependency.rb +21 -0
  50. data/lib/lutaml/uml/diagram.rb +8 -0
  51. data/lib/lutaml/uml/document.rb +81 -0
  52. data/lib/lutaml/uml/enum.rb +45 -0
  53. data/lib/lutaml/uml/event.rb +12 -0
  54. data/lib/lutaml/uml/final_state.rb +11 -0
  55. data/lib/lutaml/uml/formatter/base.rb +67 -0
  56. data/lib/lutaml/uml/formatter/graphviz.rb +334 -0
  57. data/lib/lutaml/uml/formatter.rb +21 -0
  58. data/lib/lutaml/uml/has_attributes.rb +14 -0
  59. data/lib/lutaml/uml/has_members.rb +30 -0
  60. data/lib/lutaml/uml/instance.rb +17 -0
  61. data/lib/lutaml/uml/model.rb +13 -0
  62. data/lib/lutaml/uml/node/base.rb +21 -0
  63. data/lib/lutaml/uml/node/class_node.rb +57 -0
  64. data/lib/lutaml/uml/node/class_relationship.rb +14 -0
  65. data/lib/lutaml/uml/node/document.rb +18 -0
  66. data/lib/lutaml/uml/node/field.rb +34 -0
  67. data/lib/lutaml/uml/node/has_name.rb +15 -0
  68. data/lib/lutaml/uml/node/has_type.rb +15 -0
  69. data/lib/lutaml/uml/node/method.rb +29 -0
  70. data/lib/lutaml/uml/node/method_argument.rb +16 -0
  71. data/lib/lutaml/uml/node/relationship.rb +28 -0
  72. data/lib/lutaml/uml/opaque_behavior.rb +11 -0
  73. data/lib/lutaml/uml/operation.rb +31 -0
  74. data/lib/lutaml/uml/package.rb +53 -0
  75. data/lib/lutaml/uml/parsers/attribute.rb +70 -0
  76. data/lib/lutaml/uml/parsers/dsl.rb +413 -0
  77. data/lib/lutaml/uml/parsers/dsl_preprocessor.rb +59 -0
  78. data/lib/lutaml/uml/parsers/dsl_transform.rb +27 -0
  79. data/lib/lutaml/uml/parsers/yaml.rb +46 -0
  80. data/lib/lutaml/uml/port.rb +8 -0
  81. data/lib/lutaml/uml/primitive_type.rb +14 -0
  82. data/lib/lutaml/uml/property.rb +27 -0
  83. data/lib/lutaml/uml/pseudostate.rb +11 -0
  84. data/lib/lutaml/uml/realization.rb +11 -0
  85. data/lib/lutaml/uml/region.rb +12 -0
  86. data/lib/lutaml/uml/serializers/association.rb +58 -0
  87. data/lib/lutaml/uml/serializers/base.rb +16 -0
  88. data/lib/lutaml/uml/serializers/class.rb +29 -0
  89. data/lib/lutaml/uml/serializers/top_element_attribute.rb +14 -0
  90. data/lib/lutaml/uml/serializers/yaml_view.rb +18 -0
  91. data/lib/lutaml/uml/state.rb +12 -0
  92. data/lib/lutaml/uml/state_machine.rb +12 -0
  93. data/lib/lutaml/uml/top_element.rb +58 -0
  94. data/lib/lutaml/uml/top_element_attribute.rb +39 -0
  95. data/lib/lutaml/uml/transition.rb +12 -0
  96. data/lib/lutaml/uml/trigger.rb +12 -0
  97. data/lib/lutaml/uml/value.rb +31 -0
  98. data/lib/lutaml/uml/version.rb +7 -0
  99. data/lib/lutaml/uml/vertex.rb +11 -0
  100. data/lib/lutaml/uml.rb +13 -0
  101. data/lib/lutaml/version.rb +1 -1
  102. data/lib/lutaml/xmi/README.adoc +24 -0
  103. data/lib/lutaml/xmi/parsers/xml.rb +600 -0
  104. data/lib/lutaml/xmi/version.rb +5 -0
  105. data/lib/lutaml/xmi.rb +7 -0
  106. data/lib/lutaml/xml/lutaml_path/document_wrapper.rb +45 -0
  107. data/lib/lutaml/xml/mapper.rb +448 -0
  108. data/lib/lutaml/xml/parsers/xml.rb +57 -0
  109. data/lib/lutaml/xml.rb +9 -0
  110. data/lutaml.gemspec +8 -3
  111. metadata +192 -16
@@ -0,0 +1,59 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ #
5
+ # Script to convert plantuml files into LutaML syntax
6
+ # Usage: bin/plantuml2lutaml /path/to/plantuml.wsd
7
+
8
+ file_path = ARGV[0]
9
+ FILE_NAME = File.basename(file_path, ".wsd")
10
+ wsd_file = File.new(ARGV[0])
11
+
12
+ def sync_puts(line, level = 0)
13
+ $stdout.puts("#{''.rjust(level)}#{line}")
14
+ $stdout.flush
15
+ end
16
+
17
+ SKIPPED_LINES_REGEXP = /^(@startuml|'\*{7}|note|@enduml|\!|'\/)/
18
+ COMMENT_START = /\/'/
19
+ COMMENT_END = /'\//
20
+ ASSOCIATION_MAPPINGS = {
21
+ /-\|>/ => ",inheritance",
22
+ /<\|-/ => "inheritance,",
23
+ /->/ => ",direct",
24
+ /<-/ => "direct,",
25
+ }.freeze
26
+
27
+ in_comment_block = false
28
+
29
+ def transform_line(line)
30
+ line = line.gsub(/^\s*'/, '** ').gsub(/\|[\sa-zA-Z]+$/, '').gsub(/\r/, '')
31
+ return sync_puts(line, 2) if ASSOCIATION_MAPPINGS.keys.none? { |key| line =~ key }
32
+
33
+ owner_type, member_type = ASSOCIATION_MAPPINGS.detect { |(key, _value)| line =~ key }.last.split(",")
34
+ blocks = line.split(" ")
35
+ owner = blocks.first
36
+ member = blocks.last
37
+ sync_puts("association {", 2)
38
+ sync_puts("owner #{owner}", 4)
39
+ sync_puts("member #{member}", 4)
40
+ sync_puts("owner_type #{owner_type}", 4) if !owner_type.to_s.empty?
41
+ sync_puts("member_type #{member_type}", 4) if !member_type.to_s.empty?
42
+ sync_puts("}", 2)
43
+ end
44
+
45
+ sync_puts("diagram #{FILE_NAME} {")
46
+ wsd_file.readlines.each do |line|
47
+ if line.match?(COMMENT_START)
48
+ in_comment_block = true
49
+ end
50
+
51
+ if line.match?(COMMENT_END)
52
+ in_comment_block = false
53
+ end
54
+
55
+ next if in_comment_block || line =~ SKIPPED_LINES_REGEXP
56
+
57
+ transform_line(line)
58
+ end
59
+ sync_puts("}")
@@ -0,0 +1,144 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ #
5
+ # Script to convert datamodel yaml files into LutaML syntax
6
+ # Usage: bin/yaml2lutaml /path/to/datamodel/view/file.yml
7
+
8
+ require "yaml"
9
+
10
+ view_yaml = YAML.safe_load(File.read(ARGV[0]))
11
+ models_path = File.expand_path("../../models", ARGV[0])
12
+
13
+ def sync_puts(line, level = 0)
14
+ $stdout.puts("#{''.rjust(level)}#{line}")
15
+ $stdout.flush
16
+ end
17
+
18
+ encountered_relations = Hash.new { |h, key| h[key] = [] }
19
+ # relations:
20
+ # - target: AttributeProfile
21
+ # relationship:
22
+ # source:
23
+ # type: aggregation
24
+ # attribute:
25
+ # addressClassProfile:
26
+ # target:
27
+ # type: direct
28
+ # attribute:
29
+ # attributeProfile:
30
+ # cardinality:
31
+ # min: 0
32
+ # max: '*'
33
+ def process_association(owner, values, encountered_relations)
34
+ target_name = values["target"]
35
+ return if encountered_relations[owner].include?(target_name)
36
+
37
+ encountered_relations[owner].push(target_name)
38
+ sync_puts("association {", 2)
39
+
40
+ relationship_block = values["relationship"] || {}
41
+
42
+ if relationship_block["source"] && relationship_block["source"]["type"]
43
+ source = relationship_block["source"]
44
+ sync_puts("owner_type #{source['type']}", 4)
45
+ if source["attribute"]
46
+ source_attribute_name = source["attribute"].keys.first
47
+ owner += "##{source_attribute_name}"
48
+ if source["attribute"][source_attribute_name] && source["attribute"][source_attribute_name]["cardinality"]
49
+ cardinality = source["attribute"][source_attribute_name]["cardinality"]
50
+ owner += " [#{cardinality['min']}..#{cardinality['max']}]"
51
+ end
52
+ end
53
+ end
54
+ sync_puts("owner #{owner}", 4)
55
+
56
+ member = target_name
57
+ if relationship_block["target"]
58
+ target = relationship_block["target"]
59
+ type = target["type"] || "direct"
60
+ sync_puts("member_type #{type}", 4)
61
+ if target["attribute"]
62
+ target_attribute_name = target["attribute"].keys.first
63
+ member += "##{target_attribute_name}"
64
+ if target["attribute"][target_attribute_name] && target["attribute"][target_attribute_name]["cardinality"]
65
+ cardinality = target["attribute"][target_attribute_name]["cardinality"]
66
+ member += " [#{cardinality['min']}..#{cardinality['max']}]"
67
+ end
68
+ end
69
+ else
70
+ sync_puts("member_type direct", 4)
71
+ end
72
+ sync_puts("member #{member}", 4)
73
+
74
+ sync_puts("}", 2)
75
+ end
76
+ sync_puts("diagram #{File.basename(ARGV[0], 'yml')[0..-2]} {")
77
+ sync_puts("title '#{view_yaml['title']}'", 2)
78
+ sync_puts("caption '#{view_yaml['caption']}'", 2)
79
+
80
+ # Class associations notations
81
+ view_yaml["relations"]&.each do |values|
82
+ process_association(values["source"], values, encountered_relations)
83
+ end
84
+
85
+ view_yaml["imports"].keys.each do |entry|
86
+ import = YAML.safe_load(File.read(File.join(models_path, "#{entry}.yml")))
87
+ import_name = import["name"] || File.basename(entry)
88
+ # Class notation
89
+ sync_puts("#{import['modelType']} #{import_name} {", 2)
90
+ if import["definition"]
91
+ definition = <<~TEXT
92
+ definition {
93
+ #{import['definition']}
94
+ }
95
+ TEXT
96
+ sync_puts(definition, 4)
97
+ end
98
+ import["values"]&.each_pair do |key, values|
99
+ result_string = key
100
+ if values["definition"]
101
+ result_string += <<~TEXT
102
+ {
103
+ definition {
104
+ #{values['definition']}
105
+ }
106
+ }
107
+ TEXT
108
+ end
109
+ sync_puts(result_string, 4)
110
+ end
111
+ import["attributes"]&.each_pair do |key, values|
112
+ definition = values["definition"]
113
+ cardinality = if values["cardinality"]
114
+ cardinality_val = values["cardinality"]
115
+ "[#{cardinality_val['min']}..#{cardinality_val['max']}]"
116
+ else
117
+ ""
118
+ end
119
+ result_string = "+#{key}"
120
+ if values["type"]
121
+ result_string += ": #{values['type']}"
122
+ end
123
+ if cardinality
124
+ result_string += " #{cardinality}"
125
+ end
126
+ if definition
127
+ result_string += <<~TEXT
128
+ {
129
+ definition
130
+ #{definition}
131
+ end definition
132
+ }
133
+ TEXT
134
+ end
135
+ sync_puts(result_string, 4)
136
+ end
137
+ sync_puts("}", 2)
138
+
139
+ # Associations notations
140
+ import["relations"]&.each do |values|
141
+ process_association(import_name, values, encountered_relations)
142
+ end
143
+ end
144
+ sync_puts("}")
@@ -0,0 +1,55 @@
1
+ image:https://img.shields.io/gem/v/lutaml-express.svg["Gem Version", link="https://rubygems.org/gems/lutaml-express"]
2
+ // image:https://codeclimate.com/github/lutaml/lutaml-express/badges/gpa.svg["Code Climate", link="https://codeclimate.com/github/lutaml/lutaml-express"]
3
+ image:https://github.com/lutaml/lutaml-express/workflows/rake/badge.svg["Build Status", link="https://github.com/lutaml/lutaml-express/actions?workflow=rake"]
4
+
5
+ = lutaml-express
6
+
7
+ == Functionality
8
+
9
+ Gem-extention for lutaml, works with EXPRESS files
10
+
11
+ === Installation
12
+
13
+ With bundler:
14
+
15
+ [source,ruby]
16
+ ----
17
+ # Gemfile
18
+ gem "lutaml-express"
19
+ ----
20
+
21
+ Then in console:
22
+
23
+ [source,console]
24
+ ----
25
+ $ bundle
26
+ ----
27
+
28
+ With RubyGems:
29
+
30
+ [source,console]
31
+ ----
32
+ $ gem install lutaml-express
33
+ ----
34
+
35
+ === Usage
36
+
37
+ [source,ruby]
38
+ ----
39
+ Lutaml::Express::Parsers::Exp.parse(File.new('/path/to/file.exp')) # => Expressir::Model::Repository
40
+ ----
41
+
42
+ == Development
43
+
44
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
45
+
46
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
47
+
48
+ ## Contributing
49
+
50
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/lutaml-express. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/lutaml-express/blob/master/CODE_OF_CONDUCT.md).
51
+
52
+
53
+ == Code of Conduct
54
+
55
+ Everyone interacting in the Lutaml::Uml project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/lutaml-express/blob/master/CODE_OF_CONDUCT.md).
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'expressir'
4
+ require 'expressir/express/parser'
5
+
6
+ module Lutaml
7
+ module Express
8
+ module Parsers
9
+ # Class for parsing .exp schema files into Expressir::Model::Repository
10
+ class Exp
11
+ # @param [String] io - file object with path to .exp file
12
+ # [Hash] options - options for parsing
13
+ #
14
+ # @return [Expressir::Model::Repository]
15
+ def self.parse(io, options = {})
16
+ Expressir::Express::Parser.from_file(io.path)
17
+ end
18
+ end
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Lutaml
4
+ module Express
5
+ VERSION = "0.2.1"
6
+ end
7
+ end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "lutaml/express/version"
4
+ require "lutaml/express/parsers/exp"
5
+
6
+ module Lutaml
7
+ module Express
8
+ end
9
+ end
data/lib/lutaml/parser.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  require "lutaml/express"
2
2
  require "lutaml/uml"
3
3
  require "lutaml/xmi"
4
+ require "lutaml/xml"
4
5
  require "lutaml/uml/lutaml_path/document_wrapper"
5
6
  require "lutaml/express/lutaml_path/document_wrapper"
6
7
  require "expressir/express/cache"
@@ -44,6 +45,8 @@ module Lutaml
44
45
  Expressir::Express::Cache.from_file(file_list.first.path)
45
46
  when "xmi"
46
47
  file_list.map { |file| Lutaml::XMI::Parsers::XML.parse(file) }
48
+ when "xml"
49
+ file_list.map { |file| Lutaml::Xml::Parsers::Xml.parse(file) }
47
50
  when "lutaml"
48
51
  file_list.map { |file| Lutaml::Uml::Parsers::Dsl.parse(file) }
49
52
  when "yml"
@@ -60,6 +63,10 @@ module Lutaml
60
63
  return Lutaml::Express::LutamlPath::DocumentWrapper.new(document)
61
64
  end
62
65
 
66
+ if parse_type == "xml"
67
+ return Lutaml::Xml::LutamlPath::DocumentWrapper.new(document)
68
+ end
69
+
63
70
  Lutaml::Uml::LutamlPath::DocumentWrapper.new(document)
64
71
  end
65
72
  end
@@ -0,0 +1,40 @@
1
+ # Lutaml::Sysml
2
+
3
+ Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/lutaml/sysml`. To experiment with that code, run `bin/console` for an interactive prompt.
4
+
5
+ TODO: Delete this and the text above, and describe your gem
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ ```ruby
12
+ gem 'lutaml-sysml'
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ $ bundle install
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install lutaml-sysml
22
+
23
+ ## Usage
24
+
25
+ TODO: Write usage instructions here
26
+
27
+ ## Development
28
+
29
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
+
31
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
+
33
+ ## Contributing
34
+
35
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/lutaml-sysml. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/lutaml-sysml/blob/master/CODE_OF_CONDUCT.md).
36
+
37
+
38
+ ## Code of Conduct
39
+
40
+ Everyone interacting in the Lutaml::Sysml project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/lutaml-sysml/blob/master/CODE_OF_CONDUCT.md).
@@ -0,0 +1,8 @@
1
+ module Lutaml::SysMl
2
+
3
+
4
+ class Allocate < Lutaml::Uml::Abstraction
5
+ attr_accessor :base_abstraction
6
+ end
7
+
8
+ end
@@ -0,0 +1,7 @@
1
+ module Lutaml::SysMl
2
+
3
+ class Allocated < Lutaml::Uml::TopElement
4
+ attr_accessor :base_named_element, :allocated_from, :allocated_to
5
+ end
6
+
7
+ end
@@ -0,0 +1,7 @@
1
+ module Lutaml::SysMl
2
+
3
+ class BindingConnector < Lutaml::Uml::Connector
4
+ attr_accessor :base_connector
5
+ end
6
+
7
+ end
@@ -0,0 +1,27 @@
1
+ module Lutaml::SysMl
2
+
3
+ class Block < Lutaml::Uml::Class
4
+ attr_accessor :base_class
5
+ def initialize
6
+ @xmi_id = nil
7
+ @nested_classifier = []
8
+ @stereotype = []
9
+ @namespace = nil
10
+ end
11
+
12
+ def name
13
+ if base_class != nil and base_class.name != nil
14
+ return base_class.name
15
+ end
16
+ return nil
17
+ end
18
+
19
+ def full_name
20
+ if base_class != nil and base_class.name != nil
21
+ return base_class.full_name
22
+ end
23
+ return nil
24
+ end
25
+ end
26
+
27
+ end
@@ -0,0 +1,12 @@
1
+ module Lutaml::SysMl
2
+
3
+ class ConstraintBlock < Block
4
+ def initialize
5
+ @xmi_id = nil
6
+ @nested_classifier = []
7
+ @stereotype = []
8
+ @namespace = nil
9
+ end
10
+ end
11
+
12
+ end
@@ -0,0 +1,6 @@
1
+ module Lutaml::SysMl
2
+
3
+ class Copy < Trace
4
+ end
5
+
6
+ end
@@ -0,0 +1,7 @@
1
+ module Lutaml::SysMl
2
+
3
+ class DeriveRequirement < Lutaml::Uml::TopElement
4
+ attr_accessor :base_abstraction
5
+ end
6
+
7
+ end
@@ -0,0 +1,11 @@
1
+ module Lutaml::SysMl
2
+
3
+ class NestedConnectorEnd < Lutaml::Uml::ConnectorEnd
4
+ attr_accessor :base_connectorend, :property_path
5
+ def initialize
6
+ @property_path = []
7
+ end
8
+ end
9
+
10
+
11
+ end
@@ -0,0 +1,7 @@
1
+ module Lutaml::SysMl
2
+
3
+ class Refine < Lutaml::Uml::TopElement
4
+ attr_accessor :base_abstraction
5
+ end
6
+
7
+ end
@@ -0,0 +1,34 @@
1
+ module Lutaml::Sysml
2
+
3
+ class Requirement < Lutaml::Uml::Class
4
+ attr_accessor :id, :text, :base_class, :refined_by, :traced_to, :derived_from, :satisfied_by
5
+ def initialize
6
+ @xmi_id = nil
7
+ @id = nil
8
+ @nested_classifier = []
9
+ @stereotype = []
10
+ @namespace = nil
11
+ end
12
+ def name
13
+ if base_class != nil and base_class.name != nil
14
+ return base_class.name
15
+ end
16
+ return nil
17
+ end
18
+ def full_name
19
+ if base_class != nil and base_class.name != nil
20
+ return base_class.full_name
21
+ end
22
+ return nil
23
+ end
24
+ ## def name
25
+ ## if base_class != nil and base_class.name != nil
26
+ ## base_class.name
27
+ ## else
28
+ ## nil
29
+ ## end
30
+ ## end
31
+ ## def full_name
32
+ ## get_base_class_full_name ( self )
33
+ ## end
34
+ end
@@ -0,0 +1,7 @@
1
+ module Lutaml::SysMl
2
+
3
+ class RequirementRelated < Lutaml::Uml::TopElement
4
+ attr_accessor :base_named_element, :satisfies, :refines
5
+ end
6
+
7
+ end
@@ -0,0 +1,7 @@
1
+ module Lutaml::SysMl
2
+
3
+ class Satisfy < Trace
4
+ attr_accessor :base_realization
5
+ end
6
+
7
+ end
@@ -0,0 +1,22 @@
1
+ module Lutaml::SysMl
2
+
3
+ class TestCase < Lutaml::Uml::TopElement
4
+ attr_accessor :base_behavior, :verifies
5
+
6
+ def name
7
+ if base_behavior != nil and base_behavior.name != nil
8
+ return base_behavior.name
9
+ end
10
+ return nil
11
+ end
12
+
13
+ def full_name
14
+ if base_behavior != nil and base_behavior.name != nil
15
+ return base_behavior.full_name
16
+ end
17
+ return nil
18
+ end
19
+
20
+ end
21
+
22
+ end
@@ -0,0 +1,7 @@
1
+ module Lutaml::SysMl
2
+
3
+ class Trace < Lutaml::Uml::TopElement
4
+ attr_accessor :base_abstraction
5
+ end
6
+
7
+ end
@@ -0,0 +1,6 @@
1
+ module Lutaml::SysMl
2
+
3
+ class Verify < Trace
4
+ end
5
+
6
+ end
@@ -0,0 +1,5 @@
1
+ module Lutaml
2
+ module Sysml
3
+ VERSION = "0.1.0"
4
+ end
5
+ end