From 414bb202a0a3117b7482f1cbd01c050df2545422 Mon Sep 17 00:00:00 2001 From: KW Kwan Date: Fri, 19 Jul 2024 10:21:30 +0800 Subject: [PATCH] Fix missing labels in SparxConnecotr --- lib/xmi/sparx.rb | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/lib/xmi/sparx.rb b/lib/xmi/sparx.rb index 712e7a7..4f9594a 100644 --- a/lib/xmi/sparx.rb +++ b/lib/xmi/sparx.rb @@ -622,6 +622,26 @@ class SparxConnectorAppearance < Shale::Mapper end end + class SparxConnectorLabels < Shale::Mapper + attribute :rb, Shale::Type::String + attribute :lb, Shale::Type::String + attribute :mb, Shale::Type::String + attribute :rt, Shale::Type::String + attribute :lt, Shale::Type::String + attribute :mt, Shale::Type::String + + xml do + root "labels" + + map_attribute :rb, to: :rb + map_attribute :lb, to: :lb + map_attribute :mb, to: :mb + map_attribute :rt, to: :rt + map_attribute :lt, to: :lt + map_attribute :mt, to: :mt + end + end + class SparxConnector < Shale::Mapper attribute :idref, Shale::Type::String attribute :source, SparxConnectorSource @@ -630,7 +650,7 @@ class SparxConnector < Shale::Mapper attribute :properties, SparxConnectorProperties attribute :documentation, Shale::Type::String attribute :appearance, SparxConnectorAppearance - attribute :labels, Shale::Type::String + attribute :labels, SparxConnectorLabels attribute :extended_properties, SparxElementExtendedProperties attribute :style, SparxElementStyle attribute :tags, SparxElementTags