lutaml 0.9.32 → 0.9.34

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 (55) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +8 -0
  3. data/bin/plantuml2lutaml +1 -1
  4. data/bin/yaml2lutaml +6 -4
  5. data/exe/lutaml-wsd2uml +1 -1
  6. data/exe/lutaml-yaml2uml +6 -4
  7. data/lib/lutaml/command_line.rb +3 -3
  8. data/lib/lutaml/formatter/base.rb +3 -3
  9. data/lib/lutaml/formatter/graphviz.rb +10 -10
  10. data/lib/lutaml/sysml/block.rb +1 -1
  11. data/lib/lutaml/sysml/constraint_block.rb +1 -1
  12. data/lib/lutaml/sysml/nested_connector_end.rb +1 -1
  13. data/lib/lutaml/sysml/requirement.rb +41 -33
  14. data/lib/lutaml/sysml/xmi_file.rb +382 -355
  15. data/lib/lutaml/uml/actor.rb +1 -1
  16. data/lib/lutaml/uml/association.rb +5 -5
  17. data/lib/lutaml/uml/connector.rb +1 -1
  18. data/lib/lutaml/uml/constructor_end.rb +1 -1
  19. data/lib/lutaml/uml/dependency.rb +1 -1
  20. data/lib/lutaml/uml/document.rb +0 -1
  21. data/lib/lutaml/uml/formatter/base.rb +2 -2
  22. data/lib/lutaml/uml/formatter/graphviz.rb +10 -10
  23. data/lib/lutaml/uml/has_members.rb +4 -4
  24. data/lib/lutaml/uml/instance.rb +1 -1
  25. data/lib/lutaml/uml/model.rb +1 -1
  26. data/lib/lutaml/uml/node/class_node.rb +1 -1
  27. data/lib/lutaml/uml/operation.rb +2 -2
  28. data/lib/lutaml/uml/package.rb +2 -2
  29. data/lib/lutaml/uml/parsers/dsl.rb +7 -4
  30. data/lib/lutaml/uml/parsers/dsl_preprocessor.rb +6 -3
  31. data/lib/lutaml/uml/property.rb +4 -4
  32. data/lib/lutaml/uml/top_element.rb +2 -2
  33. data/lib/lutaml/uml/top_element_attribute.rb +1 -1
  34. data/lib/lutaml/uml/value.rb +2 -2
  35. data/lib/lutaml/version.rb +1 -1
  36. data/lib/lutaml/xmi/liquid_drops/association_drop.rb +11 -2
  37. data/lib/lutaml/xmi/liquid_drops/attribute_drop.rb +2 -2
  38. data/lib/lutaml/xmi/liquid_drops/connector_drop.rb +40 -0
  39. data/lib/lutaml/xmi/liquid_drops/data_type_drop.rb +3 -2
  40. data/lib/lutaml/xmi/liquid_drops/diagram_drop.rb +1 -1
  41. data/lib/lutaml/xmi/liquid_drops/enum_drop.rb +1 -1
  42. data/lib/lutaml/xmi/liquid_drops/enum_owned_literal_drop.rb +1 -1
  43. data/lib/lutaml/xmi/liquid_drops/generalization_attribute_drop.rb +1 -1
  44. data/lib/lutaml/xmi/liquid_drops/generalization_drop.rb +1 -1
  45. data/lib/lutaml/xmi/liquid_drops/klass_drop.rb +3 -2
  46. data/lib/lutaml/xmi/liquid_drops/operation_drop.rb +1 -1
  47. data/lib/lutaml/xmi/liquid_drops/package_drop.rb +1 -1
  48. data/lib/lutaml/xmi/liquid_drops/root_drop.rb +1 -1
  49. data/lib/lutaml/xmi/liquid_drops/source_target_drop.rb +36 -0
  50. data/lib/lutaml/xmi/parsers/xmi_base.rb +41 -19
  51. data/lib/lutaml/xmi/parsers/xml.rb +24 -29
  52. data/lib/lutaml/xmi.rb +0 -1
  53. data/lutaml.gemspec +2 -10
  54. metadata +6 -103
  55. data/lib/lutaml/xmi/version.rb +0 -5
@@ -7,7 +7,7 @@
7
7
  module Lutaml
8
8
  module Uml
9
9
  class Actor < Classifier
10
- def initialize
10
+ def initialize # rubocop:disable Lint/MissingSuper
11
11
  @name = nil
12
12
  @xmi_id = nil
13
13
  @stereotype = []
@@ -19,24 +19,24 @@ module Lutaml
19
19
  :action
20
20
 
21
21
  # TODO: move to Parslet::Transform
22
- def members=(value)
22
+ def members=(value) # rubocop:disable Metrics/AbcSize,Metrics/CyclomaticComplexity,Metrics/MethodLength,Metrics/PerceivedComplexity
23
23
  value.group_by { |member| member.keys.first }
24
24
  .each do |(type, group)|
25
- if %w[owner_end member_end].include?(type)
25
+ if %w[owner_end member_end].include?(type) # rubocop:disable Performance/CollectionLiteralInLoop
26
26
  group.each do |member|
27
27
  member.each_pair do |key, member_value|
28
- public_send(:"#{associtaion_type(key)}=", member_value)
28
+ public_send(:"#{association_type(key)}=", member_value)
29
29
  end
30
30
  end
31
31
  next
32
32
  end
33
33
  attribute_value = group.map(&:values).flatten
34
34
  if attribute_value.length == 1 && !attribute_value.first.is_a?(Hash)
35
- next public_send(:"#{associtaion_type(type)}=",
35
+ next public_send(:"#{association_type(type)}=",
36
36
  attribute_value.first)
37
37
  end
38
38
 
39
- public_send(:"#{associtaion_type(type)}=", attribute_value)
39
+ public_send(:"#{association_type(type)}=", attribute_value)
40
40
  end
41
41
  end
42
42
  end
@@ -8,7 +8,7 @@ module Lutaml
8
8
  class Connector < TopElement
9
9
  attr_accessor :kind, :connector_end
10
10
 
11
- def initialize
11
+ def initialize # rubocop:disable Lint/MissingSuper
12
12
  @name = nil
13
13
  @xmi_id = nil
14
14
  @xmi_uuid = nil
@@ -8,7 +8,7 @@ module Lutaml
8
8
  class ConnectorEnd < TopElement
9
9
  attr_accessor :role, :part_with_port, :connector
10
10
 
11
- def initialize
11
+ def initialize # rubocop:disable Lint/MissingSuper
12
12
  @role = nil
13
13
  end
14
14
  end
@@ -8,7 +8,7 @@ module Lutaml
8
8
  class Dependency < TopElement
9
9
  attr_accessor :client, :supplier
10
10
 
11
- def initialize
11
+ def initialize # rubocop:disable Lint/MissingSuper
12
12
  @name = nil
13
13
  @xmi_id = nil
14
14
  @xmi_uuid = nil
@@ -20,7 +20,6 @@ module Lutaml
20
20
  :fidelity,
21
21
  :fontname,
22
22
  :comments
23
- attr_reader :packages
24
23
 
25
24
  # rubocop:disable Rails/ActiveRecordAliases
26
25
  def initialize(attributes = {})
@@ -8,7 +8,7 @@ module Lutaml
8
8
  module Formatter
9
9
  class Base
10
10
  class << self
11
- def inherited(subclass)
11
+ def inherited(subclass) # rubocop:disable Lint/MissingSuper
12
12
  Formatter.all << subclass
13
13
  end
14
14
 
@@ -39,7 +39,7 @@ module Lutaml
39
39
  @type = value.to_s.strip.downcase.to_sym
40
40
  end
41
41
 
42
- def format(node)
42
+ def format(node) # rubocop:disable Metrics/CyclomaticComplexity
43
43
  case node
44
44
  when Node::Field then format_field(node)
45
45
  when Node::Method then format_method(node)
@@ -41,7 +41,7 @@ module Lutaml
41
41
  cmapx
42
42
  ].freeze
43
43
 
44
- def initialize(attributes = {})
44
+ def initialize(attributes = {}) # rubocop:disable Metrics/MethodLength
45
45
  super
46
46
 
47
47
  @graph = Attributes.new
@@ -88,7 +88,7 @@ module Lutaml
88
88
  .gsub("]", "&#93;")
89
89
  end
90
90
 
91
- def format_field(node)
91
+ def format_field(node) # rubocop:disable Metrics/AbcSize,Metrics/MethodLength
92
92
  symbol = ACCESS_SYMBOLS[node.visibility]
93
93
  result = "#{symbol}#{node.name}"
94
94
  if node.type
@@ -104,7 +104,7 @@ module Lutaml
104
104
  result
105
105
  end
106
106
 
107
- def format_method(node)
107
+ def format_method(node) # rubocop:disable Metrics/AbcSize,Metrics/CyclomaticComplexity,Metrics/MethodLength
108
108
  symbol = ACCESS_SYMBOLS[node.access]
109
109
  result = "#{symbol} #{node.name}"
110
110
  if node.arguments
@@ -130,7 +130,7 @@ module Lutaml
130
130
  %{#{graph_parent_name} -> #{graph_node_name}#{graph_attributes}}
131
131
  end
132
132
 
133
- def generate_graph_relationship_attributes(node)
133
+ def generate_graph_relationship_attributes(node) # rubocop:disable Metrics/AbcSize,Metrics/CyclomaticComplexity,Metrics/MethodLength,Metrics/PerceivedComplexity
134
134
  attributes = Attributes.new
135
135
  if %w[dependency realizes].include?(node.member_end_type)
136
136
  attributes["style"] = "dashed"
@@ -197,7 +197,7 @@ module Lutaml
197
197
  "#{res} #{cardinality['min']}..#{cardinality['max']}"
198
198
  end
199
199
 
200
- def format_member_rows(members, hide_members)
200
+ def format_member_rows(members, hide_members) # rubocop:disable Metrics/AbcSize,Metrics/CyclomaticComplexity
201
201
  unless !hide_members && members&.length&.positive?
202
202
  return <<~HEREDOC.chomp
203
203
  <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0">
@@ -218,7 +218,7 @@ module Lutaml
218
218
  field_table
219
219
  end
220
220
 
221
- def format_class(node, hide_members)
221
+ def format_class(node, hide_members) # rubocop:disable Metrics/AbcSize
222
222
  name = ["<B>#{node.name}</B>"]
223
223
  name.unshift("«#{node.keyword}»") if node.keyword
224
224
  name_html = <<~HEREDOC
@@ -246,7 +246,7 @@ module Lutaml
246
246
  HEREDOC
247
247
  end
248
248
 
249
- def format_document(node)
249
+ def format_document(node) # rubocop:disable Metrics/AbcSize,Metrics/CyclomaticComplexity,Metrics/MethodLength,Metrics/PerceivedComplexity
250
250
  @fontname = node.fontname || DEFAULT_CLASS_FONT
251
251
  @node["fontname"] = "#{@fontname}-bold"
252
252
 
@@ -270,8 +270,8 @@ module Lutaml
270
270
  associations = node.classes.map(&:associations).compact.flatten +
271
271
  node.associations
272
272
  if node.groups
273
- associations = sort_by_document_groupping(node.groups,
274
- associations)
273
+ associations = sort_by_document_grouping(node.groups,
274
+ associations)
275
275
  end
276
276
  classes_names = node.classes.map(&:name)
277
277
  associations = associations.map do |assoc_node|
@@ -302,7 +302,7 @@ module Lutaml
302
302
 
303
303
  protected
304
304
 
305
- def sort_by_document_groupping(groups, associations)
305
+ def sort_by_document_grouping(groups, associations) # rubocop:disable Metrics/CyclomaticComplexity,Metrics/MethodLength,Metrics/PerceivedComplexity
306
306
  result = []
307
307
  groups.each do |batch|
308
308
  batch.each do |group_name|
@@ -6,22 +6,22 @@ module Lutaml
6
6
  class UnknownMemberTypeError < StandardError; end
7
7
 
8
8
  # TODO: move to Parslet::Transform
9
- def members=(value)
9
+ def members=(value) # rubocop:disable Metrics/AbcSize
10
10
  value.group_by { |member| member.keys.first }
11
11
  .each do |(type, group)|
12
12
  attribute_value = group.map(&:values).flatten
13
13
  if attribute_value.length == 1 && !attribute_value.first.is_a?(Hash)
14
- next public_send(:"#{associtaion_type(type)}=",
14
+ next public_send(:"#{association_type(type)}=",
15
15
  attribute_value.first)
16
16
  end
17
17
 
18
- public_send(:"#{associtaion_type(type)}=", attribute_value)
18
+ public_send(:"#{association_type(type)}=", attribute_value)
19
19
  end
20
20
  end
21
21
 
22
22
  private
23
23
 
24
- def associtaion_type(type)
24
+ def association_type(type)
25
25
  return type if respond_to?(:"#{type}=")
26
26
 
27
27
  raise(UnknownMemberTypeError, "Unknown member type: #{type}")
@@ -5,7 +5,7 @@ module Lutaml
5
5
  class Instance < TopElement
6
6
  attr_accessor :classifier, :slot
7
7
 
8
- def initialize
8
+ def initialize # rubocop:disable Lint/MissingSuper
9
9
  @name = nil
10
10
  @xmi_id = nil
11
11
  @xmi_uuid = nil
@@ -5,7 +5,7 @@ module Lutaml
5
5
  class Model < Package
6
6
  attr_accessor :viewpoint
7
7
 
8
- def initialize
8
+ def initialize # rubocop:disable Lint/MissingSuper
9
9
  @contents = []
10
10
  end
11
11
  end
@@ -19,7 +19,7 @@ module Lutaml
19
19
  @modifier = value.to_s # TODO: Validate?
20
20
  end
21
21
 
22
- def members=(value)
22
+ def members=(value) # rubocop:disable Metrics/MethodLength
23
23
  @members = value.to_a.map do |member|
24
24
  type = member.to_a[0][0] # TODO: This is dumb
25
25
  attributes = member.to_a[0][1]
@@ -6,8 +6,8 @@ module Lutaml
6
6
  include HasAttributes
7
7
  include HasMembers
8
8
 
9
- attr_accessor :definition,
10
- :name,
9
+ attr_reader :definition
10
+ attr_accessor :name,
11
11
  :return_type,
12
12
  :parameter_type
13
13
 
@@ -6,9 +6,9 @@ module Lutaml
6
6
  include HasAttributes
7
7
 
8
8
  attr_accessor :imports, :contents
9
- attr_reader :classes, :enums, :data_types, :children_packages
9
+ attr_reader :data_types, :children_packages
10
10
 
11
- def initialize(attributes)
11
+ def initialize(attributes) # rubocop:disable Lint/MissingSuper
12
12
  update_attributes(attributes)
13
13
  @children_packages ||= packages.map do |pkg|
14
14
  [pkg, pkg.packages, pkg.packages.map(&:children_packages)]
@@ -74,7 +74,8 @@ module Lutaml
74
74
  rule(:spaces) { match("\s").repeat(1) }
75
75
  rule(:spaces?) { spaces.maybe }
76
76
  rule(:whitespace) do
77
- (match("\s") | match(" ") | match("\r?\n") | match("\r") | str(";")).repeat(1)
77
+ (match("\s") | match(" ") | match("\r?\n") | match("\r") | str(";"))
78
+ .repeat(1)
78
79
  end
79
80
  rule(:whitespace?) { whitespace.maybe }
80
81
  rule(:name) { match["a-zA-Z0-9 _-"].repeat(1) }
@@ -83,7 +84,8 @@ module Lutaml
83
84
  spaces? >> str("**") >> (newline.absent? >> any).repeat.as(:comments)
84
85
  end
85
86
  rule(:comment_multiline_definition) do
86
- spaces? >> str("*|") >> (str("|*").absent? >> any).repeat.as(:comments) >> whitespace? >> str("|*")
87
+ spaces? >> str("*|") >> (str("|*").absent? >> any)
88
+ .repeat.as(:comments) >> whitespace? >> str("|*")
87
89
  end
88
90
  rule(:class_name_chars) { match('(?:[a-zA-Z0-9 _-]|\:|\.)').repeat(1) }
89
91
  rule(:class_name) do
@@ -206,7 +208,7 @@ module Lutaml
206
208
 
207
209
  rule(:association_keyword) { kw_association >> spaces }
208
210
 
209
- %w[owner member].each do |association_end_type|
211
+ %w[owner member].each do |association_end_type| # rubocop:disable Metrics/BlockLength
210
212
  rule("#{association_end_type}_cardinality") do
211
213
  spaces? >>
212
214
  str("[") >>
@@ -303,7 +305,8 @@ module Lutaml
303
305
  str("definition") >>
304
306
  whitespace? >>
305
307
  str("{") >>
306
- ((str("\\") >> any) | (str("}").absent? >> any)).repeat.maybe.as(:definition) >>
308
+ ((str("\\") >> any) | (str("}").absent? >> any))
309
+ .repeat.maybe.as(:definition) >>
307
310
  str("}")
308
311
  end
309
312
 
@@ -38,7 +38,7 @@ module Lutaml
38
38
  line.gsub(%r{//.*}, "")
39
39
  end
40
40
 
41
- def process_include_line(include_root, line)
41
+ def process_include_line(include_root, line) # rubocop:disable Metrics/MethodLength
42
42
  include_path_match = line.match(/^\s*include\s+(.+)/)
43
43
  return line if include_path_match.nil? || line =~ /^\s\*\*/
44
44
 
@@ -51,8 +51,11 @@ module Lutaml
51
51
  process_comment_line(line)
52
52
  end
53
53
  rescue Errno::ENOENT
54
- puts("No such file or directory @ rb_sysopen - #{path_to_file}, \
55
- include file paths need to be supplied relative to the main document")
54
+ puts(
55
+ "No such file or directory @ rb_sysopen - #{path_to_file}, " \
56
+ "include file paths need to be supplied relative to the main " \
57
+ "document",
58
+ )
56
59
  end
57
60
  end
58
61
  end
@@ -3,14 +3,14 @@
3
3
  module Lutaml
4
4
  module Uml
5
5
  class Property < TopElement
6
- attr_accessor :type,
6
+ attr_accessor :type, # rubocop:disable Naming/MethodName
7
7
  :aggregation,
8
8
  :association,
9
9
  :is_derived,
10
10
  :lowerValue,
11
11
  :upperValue
12
12
 
13
- def initialize
13
+ def initialize # rubocop:disable Lint/MissingSuper
14
14
  @name = nil
15
15
  @xmi_id = nil
16
16
  @xmi_uuid = nil
@@ -19,8 +19,8 @@ module Lutaml
19
19
  @namespace = nil
20
20
  @is_derived = false
21
21
  @visibility = "public"
22
- @lowerValue = "1"
23
- @upperValue = "1"
22
+ @lowerValue = "1" # rubocop:disable Naming/VariableName
23
+ @upperValue = "1" # rubocop:disable Naming/VariableName
24
24
  end
25
25
  end
26
26
  end
@@ -5,8 +5,8 @@ module Lutaml
5
5
  class TopElement
6
6
  include HasAttributes
7
7
 
8
+ attr_reader :definition
8
9
  attr_accessor :name,
9
- :definition,
10
10
  :xmi_id,
11
11
  :xmi_uuid,
12
12
  :namespace,
@@ -24,7 +24,7 @@ module Lutaml
24
24
  end
25
25
  # rubocop:enable Rails/ActiveRecordAliases
26
26
 
27
- def full_name
27
+ def full_name # rubocop:disable Metrics/MethodLength
28
28
  if name == nil
29
29
  return nil
30
30
  end
@@ -6,12 +6,12 @@ module Lutaml
6
6
  include HasAttributes
7
7
  include HasMembers
8
8
 
9
+ attr_reader :definition
9
10
  attr_accessor :name,
10
11
  :visibility,
11
12
  :type,
12
13
  :id,
13
14
  :xmi_id,
14
- :definition,
15
15
  :contain,
16
16
  :static,
17
17
  :cardinality,
@@ -6,8 +6,8 @@ module Lutaml
6
6
  include HasAttributes
7
7
  include HasMembers
8
8
 
9
- attr_accessor :definition,
10
- :name,
9
+ attr_reader :definition
10
+ attr_accessor :name,
11
11
  :id,
12
12
  :type
13
13
 
@@ -1,3 +1,3 @@
1
1
  module Lutaml
2
- VERSION = "0.9.32".freeze
2
+ VERSION = "0.9.34".freeze
3
3
  end
@@ -5,7 +5,7 @@ module Lutaml
5
5
  class AssociationDrop < Liquid::Drop
6
6
  include Parsers::XMIBase
7
7
 
8
- def initialize( # rubocop:disable Lint/MissingSuper,Metrics/ParameterLists
8
+ def initialize( # rubocop:disable Lint/MissingSuper,Metrics/ParameterLists,Metrics/MethodLength
9
9
  xmi_id:,
10
10
  member_end:,
11
11
  member_end_type:,
@@ -14,7 +14,8 @@ module Lutaml
14
14
  member_end_xmi_id:,
15
15
  owner_end:,
16
16
  owner_end_xmi_id:,
17
- definition:
17
+ definition:,
18
+ options:
18
19
  )
19
20
  @xmi_id = xmi_id
20
21
  @member_end = member_end
@@ -25,6 +26,9 @@ module Lutaml
25
26
  @owner_end = owner_end
26
27
  @owner_end_xmi_id = owner_end_xmi_id
27
28
  @definition = definition
29
+ @options = options
30
+ @xmi_root_model = options[:xmi_root_model]
31
+ @id_name_mapping = options[:id_name_mapping]
28
32
  end
29
33
 
30
34
  def xmi_id
@@ -62,6 +66,11 @@ module Lutaml
62
66
  def definition
63
67
  @definition
64
68
  end
69
+
70
+ def connector
71
+ connector = fetch_connector(@xmi_id)
72
+ ::Lutaml::XMI::ConnectorDrop.new(connector)
73
+ end
65
74
  end
66
75
  end
67
76
  end
@@ -9,7 +9,7 @@ module Lutaml
9
9
  @model = model
10
10
  @options = options
11
11
  @xmi_root_model = options[:xmi_root_model]
12
- @xmi_cache = options[:xmi_cache]
12
+ @id_name_mapping = options[:id_name_mapping]
13
13
 
14
14
  uml_type = @model.uml_type
15
15
  @uml_type_idref = uml_type.idref if uml_type
@@ -31,7 +31,7 @@ module Lutaml
31
31
  @uml_type_idref
32
32
  end
33
33
 
34
- def is_derived # rubocop:disable Naming/PredicateName
34
+ def is_derived # rubocop:disable Naming/PredicateName,Naming/PredicatePrefix
35
35
  @model.is_derived
36
36
  end
37
37
 
@@ -0,0 +1,40 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Lutaml
4
+ module XMI
5
+ class ConnectorDrop < Liquid::Drop
6
+ include Parsers::XMIBase
7
+
8
+ def initialize(model, options = {}) # rubocop:disable Lint/MissingSuper
9
+ @model = model
10
+ @options = options
11
+ @xmi_root_model = options[:xmi_root_model]
12
+ @id_name_mapping = options[:id_name_mapping]
13
+ end
14
+
15
+ def idref
16
+ @model.idref
17
+ end
18
+
19
+ def name
20
+ @model.name
21
+ end
22
+
23
+ def type
24
+ @model&.properties&.ea_type
25
+ end
26
+
27
+ def documentation
28
+ @model&.documentation&.value
29
+ end
30
+
31
+ def source
32
+ ::Lutaml::XMI::SourceTargetDrop.new(@model.source)
33
+ end
34
+
35
+ def target
36
+ ::Lutaml::XMI::SourceTargetDrop.new(@model.target)
37
+ end
38
+ end
39
+ end
40
+ end
@@ -9,7 +9,7 @@ module Lutaml
9
9
  @model = model
10
10
  @options = options
11
11
  @xmi_root_model = options[:xmi_root_model]
12
- @xmi_cache = options[:xmi_cache]
12
+ @id_name_mapping = options[:id_name_mapping]
13
13
 
14
14
  @owned_attributes = model&.owned_attribute&.select do |attr|
15
15
  attr.type?("uml:Property")
@@ -77,6 +77,7 @@ module Lutaml
77
77
  owner_end: owner_end,
78
78
  owner_end_xmi_id: xmi_id,
79
79
  definition: definition,
80
+ options: @options,
80
81
  )
81
82
  end
82
83
  end.compact
@@ -97,7 +98,7 @@ module Lutaml
97
98
  end
98
99
  end
99
100
 
100
- def is_abstract # rubocop:disable Naming/PredicateName
101
+ def is_abstract # rubocop:disable Naming/PredicateName,Naming/PredicatePrefix
101
102
  doc_node_attribute_value(@model.id, "isAbstract")
102
103
  end
103
104
 
@@ -9,7 +9,7 @@ module Lutaml
9
9
  @model = model
10
10
  @options = options
11
11
  @xmi_root_model = options[:xmi_root_model]
12
- @xmi_cache = options[:xmi_cache]
12
+ @id_name_mapping = options[:id_name_mapping]
13
13
  end
14
14
 
15
15
  def xmi_id
@@ -9,7 +9,7 @@ module Lutaml
9
9
  @model = model
10
10
  @options = options
11
11
  @xmi_root_model = options[:xmi_root_model]
12
- @xmi_cache = options[:xmi_cache]
12
+ @id_name_mapping = options[:id_name_mapping]
13
13
 
14
14
  @owned_literals = model&.owned_literal&.select do |owned_literal|
15
15
  owned_literal.type? "uml:EnumerationLiteral"
@@ -9,7 +9,7 @@ module Lutaml
9
9
  @model = model
10
10
  @options = options
11
11
  @xmi_root_model = options[:xmi_root_model]
12
- @xmi_cache = options[:xmi_cache]
12
+ @id_name_mapping = options[:id_name_mapping]
13
13
  end
14
14
 
15
15
  def name
@@ -28,7 +28,7 @@ module Lutaml
28
28
  @attr[:xmi_id]
29
29
  end
30
30
 
31
- def is_derived # rubocop:disable Naming/PredicateName
31
+ def is_derived # rubocop:disable Naming/PredicateName,Naming/PredicatePrefix
32
32
  @attr[:is_derived]
33
33
  end
34
34
 
@@ -13,7 +13,7 @@ module Lutaml
13
13
  @guidance = guidance
14
14
  @options = options
15
15
  @xmi_root_model = options[:xmi_root_model]
16
- @xmi_cache = options[:xmi_cache]
16
+ @id_name_mapping = options[:id_name_mapping]
17
17
  end
18
18
 
19
19
  def id
@@ -10,7 +10,7 @@ module Lutaml
10
10
  @guidance = guidance
11
11
  @options = options
12
12
  @xmi_root_model = options[:xmi_root_model]
13
- @xmi_cache = options[:xmi_cache]
13
+ @id_name_mapping = options[:id_name_mapping]
14
14
 
15
15
  @package = model&.packaged_element&.find do |e|
16
16
  e.type?("uml:Package")
@@ -100,6 +100,7 @@ module Lutaml
100
100
  owner_end: owner_end,
101
101
  owner_end_xmi_id: xmi_id,
102
102
  definition: definition,
103
+ options: @options,
103
104
  )
104
105
  end
105
106
  end.compact
@@ -143,7 +144,7 @@ module Lutaml
143
144
  !!@klass_guidance
144
145
  end
145
146
 
146
- def is_abstract # rubocop:disable Naming/PredicateName
147
+ def is_abstract # rubocop:disable Naming/PredicateName,Naming/PredicatePrefix
147
148
  doc_node_attribute_value(@model.id, "isAbstract")
148
149
  end
149
150
 
@@ -9,7 +9,7 @@ module Lutaml
9
9
  @model = model
10
10
  @options = options
11
11
  @xmi_root_model = options[:xmi_root_model]
12
- @xmi_cache = options[:xmi_cache]
12
+ @id_name_mapping = options[:id_name_mapping]
13
13
  end
14
14
 
15
15
  def id
@@ -11,7 +11,7 @@ module Lutaml
11
11
 
12
12
  @options = options
13
13
  @xmi_root_model = options[:xmi_root_model]
14
- @xmi_cache = options[:xmi_cache]
14
+ @id_name_mapping = options[:id_name_mapping]
15
15
 
16
16
  @packages = model.packaged_element.select do |e|
17
17
  e.type?("uml:Package")
@@ -8,7 +8,7 @@ module Lutaml
8
8
  @guidance = guidance
9
9
  @options = options
10
10
  @xmi_root_model = options[:xmi_root_model]
11
- @xmi_cache = options[:xmi_cache]
11
+ @id_name_mapping = options[:id_name_mapping]
12
12
 
13
13
  @options[:absolute_path] = "::#{model.name}"
14
14