lutaml 0.9.28 → 0.9.29
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.
- checksums.yaml +4 -4
- data/bin/plantuml2lutaml +11 -7
- data/bin/yaml2lutaml +1 -1
- data/exe/lutaml-sysml +4 -2
- data/exe/lutaml-wsd2uml +11 -7
- data/exe/lutaml-yaml2uml +1 -1
- data/lib/lutaml/express/parsers/exp.rb +4 -4
- data/lib/lutaml/formatter/graphviz.rb +7 -7
- data/lib/lutaml/sysml/allocate.rb +6 -7
- data/lib/lutaml/sysml/allocated.rb +6 -6
- data/lib/lutaml/sysml/binding_connector.rb +6 -6
- data/lib/lutaml/sysml/block.rb +28 -25
- data/lib/lutaml/sysml/constraint_block.rb +11 -11
- data/lib/lutaml/sysml/copy.rb +5 -5
- data/lib/lutaml/sysml/derive_requirement.rb +6 -6
- data/lib/lutaml/sysml/nested_connector_end.rb +9 -9
- data/lib/lutaml/sysml/refine.rb +6 -6
- data/lib/lutaml/sysml/requirement_related.rb +6 -6
- data/lib/lutaml/sysml/satisfy.rb +6 -6
- data/lib/lutaml/sysml/test_case.rb +20 -19
- data/lib/lutaml/sysml/trace.rb +6 -6
- data/lib/lutaml/sysml/verify.rb +5 -5
- data/lib/lutaml/sysml/version.rb +1 -1
- data/lib/lutaml/sysml/xmi_file.rb +455 -415
- data/lib/lutaml/sysml.rb +1 -1
- data/lib/lutaml/uml/association.rb +4 -3
- data/lib/lutaml/uml/data_type.rb +1 -0
- data/lib/lutaml/uml/document.rb +4 -1
- data/lib/lutaml/uml/formatter/graphviz.rb +11 -13
- data/lib/lutaml/uml/has_attributes.rb +2 -2
- data/lib/lutaml/uml/has_members.rb +4 -3
- data/lib/lutaml/uml/node/class_node.rb +5 -7
- data/lib/lutaml/uml/node/field.rb +1 -3
- data/lib/lutaml/uml/node/method.rb +1 -3
- data/lib/lutaml/uml/node/relationship.rb +1 -3
- data/lib/lutaml/uml/operation.rb +6 -6
- data/lib/lutaml/uml/package.rb +3 -1
- data/lib/lutaml/uml/parsers/attribute.rb +1 -3
- data/lib/lutaml/uml/parsers/dsl.rb +11 -10
- data/lib/lutaml/uml/parsers/dsl_preprocessor.rb +7 -6
- data/lib/lutaml/uml/parsers/yaml.rb +2 -2
- data/lib/lutaml/uml/serializers/class.rb +1 -1
- data/lib/lutaml/uml/top_element.rb +9 -9
- data/lib/lutaml/uml/top_element_attribute.rb +6 -6
- data/lib/lutaml/uml/value.rb +6 -6
- data/lib/lutaml/version.rb +1 -1
- data/lib/lutaml/xmi/liquid_drops/association_drop.rb +31 -11
- data/lib/lutaml/xmi/liquid_drops/attribute_drop.rb +29 -11
- data/lib/lutaml/xmi/liquid_drops/cardinality_drop.rb +8 -2
- data/lib/lutaml/xmi/liquid_drops/constraint_drop.rb +6 -4
- data/lib/lutaml/xmi/liquid_drops/data_type_drop.rb +76 -18
- data/lib/lutaml/xmi/liquid_drops/diagram_drop.rb +13 -6
- data/lib/lutaml/xmi/liquid_drops/enum_drop.rb +16 -7
- data/lib/lutaml/xmi/liquid_drops/enum_owned_literal_drop.rb +10 -4
- data/lib/lutaml/xmi/liquid_drops/generalization_attribute_drop.rb +2 -0
- data/lib/lutaml/xmi/liquid_drops/generalization_drop.rb +10 -3
- data/lib/lutaml/xmi/liquid_drops/klass_drop.rb +98 -24
- data/lib/lutaml/xmi/liquid_drops/operation_drop.rb +11 -5
- data/lib/lutaml/xmi/liquid_drops/package_drop.rb +61 -18
- data/lib/lutaml/xmi/liquid_drops/root_drop.rb +14 -4
- data/lib/lutaml/xmi/parsers/xmi_base.rb +1031 -0
- data/lib/lutaml/xmi/parsers/xml.rb +19 -1016
- data/lib/lutaml/xml/parsers/xml.rb +2 -2
- metadata +4 -3
@@ -3,21 +3,31 @@
|
|
3
3
|
module Lutaml
|
4
4
|
module XMI
|
5
5
|
class RootDrop < Liquid::Drop
|
6
|
-
def initialize(model, guidance = nil) # rubocop:disable Lint/MissingSuper
|
6
|
+
def initialize(model, guidance = nil, options = {}) # rubocop:disable Lint/MissingSuper,Metrics/AbcSize,Metrics/MethodLength,Metrics/CyclomaticComplexity
|
7
7
|
@model = model
|
8
8
|
@guidance = guidance
|
9
|
+
@options = options
|
10
|
+
@xmi_root_model = options[:xmi_root_model]
|
11
|
+
@xmi_cache = options[:xmi_cache]
|
12
|
+
|
13
|
+
@options[:absolute_path] = "::#{model.name}"
|
14
|
+
|
15
|
+
@packages = model&.packaged_element&.select do |e|
|
16
|
+
e.type?("uml:Package")
|
17
|
+
end
|
18
|
+
|
9
19
|
@children_packages ||= packages.map do |pkg|
|
10
20
|
[pkg, pkg.packages, pkg.packages.map(&:children_packages)]
|
11
21
|
end.flatten.uniq
|
12
22
|
end
|
13
23
|
|
14
24
|
def name
|
15
|
-
@model
|
25
|
+
@model.name
|
16
26
|
end
|
17
27
|
|
18
28
|
def packages
|
19
|
-
@
|
20
|
-
::Lutaml::XMI::PackageDrop.new(package, @guidance)
|
29
|
+
@packages.map do |package|
|
30
|
+
::Lutaml::XMI::PackageDrop.new(package, @guidance, @options)
|
21
31
|
end
|
22
32
|
end
|
23
33
|
|