From 874c0fcae694268a50d1fb402031dd4082a21f8d Mon Sep 17 00:00:00 2001 From: Michael Hoffmeister Date: Fri, 7 Mar 2025 23:28:52 +0100 Subject: [PATCH 1/3] * intermediate save --- src/AasxCsharpLibrary/AdminShellPackageEnv.cs | 52 ++++++------------- .../DispEditHelperMiniModules.cs | 28 +++++++--- 2 files changed, 37 insertions(+), 43 deletions(-) diff --git a/src/AasxCsharpLibrary/AdminShellPackageEnv.cs b/src/AasxCsharpLibrary/AdminShellPackageEnv.cs index 3dcf74dc..30325999 100644 --- a/src/AasxCsharpLibrary/AdminShellPackageEnv.cs +++ b/src/AasxCsharpLibrary/AdminShellPackageEnv.cs @@ -199,51 +199,29 @@ public static AasCore.Aas3_0.Environment DeserializeXmlFromStreamWithCompat(Stre // nope! return null; } - // dead-csharp off - //public static JsonSerializer BuildDefaultAasxJsonSerializer() - //{ - // var serializer = new JsonSerializer(); - // serializer.Converters.Add( - // new AdminShellConverters.JsonAasxConverter( - // "modelType", "name")); - // return serializer; - //} + public static T DeserializeFromJSON(string data) where T : IReferable { - //using (var tr = new StringReader(data)) - //{ - //var serializer = BuildDefaultAasxJsonSerializer(); - //var rf = (T)serializer.Deserialize(tr, typeof(T)); - var node = System.Text.Json.Nodes.JsonNode.Parse(data); var rf = Jsonization.Deserialize.IReferableFrom(node); return (T)rf; - //} } - //public static T DeserializeFromJSON(JToken obj) where T : IReferable - //{ - // if (obj == null) - // return default(T); - // var serializer = BuildDefaultAasxJsonSerializer(); - // var rf = obj.ToObject(serializer); - // return rf; - //} - - ///// - ///// Use this, if DeserializeFromJSON is too tight. - ///// - //public static T DeserializePureObjectFromJSON(string data) - //{ - // using (var tr = new StringReader(data)) - // { - // //var serializer = BuildDefaultAasxJsonSerializer(); - // //var rf = (T)serializer.Deserialize(tr, typeof(T)); - // return null; - // } - //} - // dead-csharp on + /// + /// Use this to deserialize flexible JSON "coming from the outside" + /// + public static T DeserializeAdaptiveFromJSON(string jsonInput) where T : IClass + { + using (JsonTextReader reader = new JsonTextReader(new StringReader(jsonInput))) + { + JsonSerializer serializer = new JsonSerializer(); + serializer.Converters.Add(new AdminShellConverters.AdaptiveAasIClassConverter( + AdminShellConverters.AdaptiveAasIClassConverter.ConversionMode.AasCore)); + var res = serializer.Deserialize(reader); + return res; + } + } } /// diff --git a/src/AasxPackageLogic/DispEditHelperMiniModules.cs b/src/AasxPackageLogic/DispEditHelperMiniModules.cs index fea8d838..cb5ee0ea 100644 --- a/src/AasxPackageLogic/DispEditHelperMiniModules.cs +++ b/src/AasxPackageLogic/DispEditHelperMiniModules.cs @@ -48,7 +48,15 @@ private bool PasteQualifierTextIntoExisting( string jsonInput, Aas.IQualifier qCurr) { - var qIn = JsonConvert.DeserializeObject(jsonInput); + // var qIn = JsonConvert.DeserializeObject(jsonInput); + var qIn = AdminShellSerializationHelper.DeserializeAdaptiveFromJSON(jsonInput); + + //JsonTextReader reader = new JsonTextReader(new StringReader(jsonInput)); + //JsonSerializer serializer = new JsonSerializer(); + //serializer.Converters.Add(new AdminShellConverters.AdaptiveAasIClassConverter( + // AdminShellConverters.AdaptiveAasIClassConverter.ConversionMode.AasCore)); + //var qIn = serializer.Deserialize(reader); + if (qCurr != null && qIn != null) { qCurr.Type = qIn.Type; @@ -317,8 +325,12 @@ public void QualifierHelper( } break; case 3: - var jsonStr = JsonConvert.SerializeObject( - qualifiers[storedI], Formatting.Indented); + var jsonStr = Aas.Jsonization.Serialize.ToJsonObject(qualifiers[storedI]) + .ToJsonString(new System.Text.Json.JsonSerializerOptions() + { + WriteIndented = true + }); + this.context?.ClipboardSet(new AnyUiClipboardData(jsonStr)); Log.Singleton.Info("Qualified serialized to clipboard."); break; @@ -940,7 +952,7 @@ public void ExtensionHelper( catch (Exception ex) { Log.Singleton.Error( - ex, $"While show Qualifier presets ({pfn})"); + ex, $"While show Extension presets ({pfn})"); } } @@ -1024,8 +1036,12 @@ public void ExtensionHelper( } break; case 3: - var jsonStr = JsonConvert.SerializeObject( - extensions[storedI], Formatting.Indented); + var jsonStr = Aas.Jsonization.Serialize.ToJsonObject(extensions[storedI]) + .ToJsonString(new System.Text.Json.JsonSerializerOptions() + { + WriteIndented = true + }); + this.context?.ClipboardSet(new AnyUiClipboardData(jsonStr)); Log.Singleton.Info("Extension serialized to clipboard."); break; From 8969c9c23b569c45f8345b80b1cd33d26ebfa0dd Mon Sep 17 00:00:00 2001 From: Michael Hoffmeister Date: Fri, 7 Mar 2025 23:33:16 +0100 Subject: [PATCH 2/3] * copy/ paste seem to work --- src/AasxCsharpLibrary/AdminShellPackageEnv.cs | 22 +++++++++++++------ .../DispEditHelperMiniModules.cs | 10 +-------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/AasxCsharpLibrary/AdminShellPackageEnv.cs b/src/AasxCsharpLibrary/AdminShellPackageEnv.cs index 30325999..36f41d07 100644 --- a/src/AasxCsharpLibrary/AdminShellPackageEnv.cs +++ b/src/AasxCsharpLibrary/AdminShellPackageEnv.cs @@ -209,18 +209,26 @@ public static T DeserializeFromJSON(string data) where T : IReferable } /// - /// Use this to deserialize flexible JSON "coming from the outside" + /// Use this (new!) to deserialize flexible JSON "coming from the outside" /// public static T DeserializeAdaptiveFromJSON(string jsonInput) where T : IClass { - using (JsonTextReader reader = new JsonTextReader(new StringReader(jsonInput))) + try { - JsonSerializer serializer = new JsonSerializer(); - serializer.Converters.Add(new AdminShellConverters.AdaptiveAasIClassConverter( - AdminShellConverters.AdaptiveAasIClassConverter.ConversionMode.AasCore)); - var res = serializer.Deserialize(reader); - return res; + using (JsonTextReader reader = new JsonTextReader(new StringReader(jsonInput))) + { + JsonSerializer serializer = new JsonSerializer(); + serializer.Converters.Add(new AdminShellConverters.AdaptiveAasIClassConverter( + AdminShellConverters.AdaptiveAasIClassConverter.ConversionMode.AasCore)); + var res = serializer.Deserialize(reader); + return res; + } + } + catch (Exception ex) + { + LogInternally.That.CompletelyIgnoredError(ex); } + return default(T); } } diff --git a/src/AasxPackageLogic/DispEditHelperMiniModules.cs b/src/AasxPackageLogic/DispEditHelperMiniModules.cs index cb5ee0ea..721ff91e 100644 --- a/src/AasxPackageLogic/DispEditHelperMiniModules.cs +++ b/src/AasxPackageLogic/DispEditHelperMiniModules.cs @@ -48,15 +48,7 @@ private bool PasteQualifierTextIntoExisting( string jsonInput, Aas.IQualifier qCurr) { - // var qIn = JsonConvert.DeserializeObject(jsonInput); var qIn = AdminShellSerializationHelper.DeserializeAdaptiveFromJSON(jsonInput); - - //JsonTextReader reader = new JsonTextReader(new StringReader(jsonInput)); - //JsonSerializer serializer = new JsonSerializer(); - //serializer.Converters.Add(new AdminShellConverters.AdaptiveAasIClassConverter( - // AdminShellConverters.AdaptiveAasIClassConverter.ConversionMode.AasCore)); - //var qIn = serializer.Deserialize(reader); - if (qCurr != null && qIn != null) { qCurr.Type = qIn.Type; @@ -832,7 +824,7 @@ private bool PasteExtensionTextIntoExisting( string jsonInput, Aas.IExtension qCurr) { - var qIn = JsonConvert.DeserializeObject(jsonInput); + var qIn = AdminShellSerializationHelper.DeserializeAdaptiveFromJSON(jsonInput); if (qCurr != null && qIn != null) { qCurr.Name = qIn.Name; From 98e970df7331fe574b76df44a105bd773283c327 Mon Sep 17 00:00:00 2001 From: Michael Hoffmeister Date: Sat, 8 Mar 2025 00:23:48 +0100 Subject: [PATCH 3/3] * small update in AsciiDoc command line options to show TOC --- .../AasxPluginExportTable.options.json | 1344 ++++++++--------- 1 file changed, 672 insertions(+), 672 deletions(-) diff --git a/src/AasxPluginExportTable/AasxPluginExportTable.options.json b/src/AasxPluginExportTable/AasxPluginExportTable.options.json index 0a131cc9..41e7021e 100644 --- a/src/AasxPluginExportTable/AasxPluginExportTable.options.json +++ b/src/AasxPluginExportTable/AasxPluginExportTable.options.json @@ -1,680 +1,680 @@ { - "TemplateIdConceptDescription": "www.example.com/ids/cd/DDDD_DDDD_DDDD_DDDD", - "SmtExportHtmlCmd": "docker", - "SmtExportHtmlArgs": "run -it -v %WD%:/documents/ asciidoctor/docker-asciidoctor asciidoctor -r asciidoctor-diagram -a stylesheet=asciidoc-style-idta.css %ADOC%", - "SmtExportPdfCmd": "docker", - // without line numbers: - // "SmtExportPdfArgs": "run -it -v %WD%:/documents/ asciidoctor/docker-asciidoctor asciidoctor-pdf -r asciidoctor-diagram -a pdf-theme=my-theme.yml %ADOC%", - // with line numbers: - "SmtExportPdfArgs": "run -it -v %WD%:/documents/ asciidoctor/docker-asciidoctor asciidoctor-pdf -r asciidoctor-diagram -r ./extended.rb -a toc=macro -a pdf-theme=my-theme.yml -a env-pdf %ADOC%", - "SmtExportViewCmd": "cmd.exe", - "SmtExportViewArgs": "/c start %WD%\\%HTML% && ping 127.0.0.1 -n 5 >nul", - /* + "TemplateIdConceptDescription": "www.example.com/ids/cd/DDDD_DDDD_DDDD_DDDD", + "SmtExportHtmlCmd": "docker", + "SmtExportHtmlArgs": "run -it -v %WD%:/documents/ asciidoctor/docker-asciidoctor asciidoctor -r asciidoctor-diagram -a toc=left -a stylesheet=asciidoc-style-idta.css %ADOC%", + "SmtExportPdfCmd": "docker", + // without line numbers: + // "SmtExportPdfArgs": "run -it -v %WD%:/documents/ asciidoctor/docker-asciidoctor asciidoctor-pdf -r asciidoctor-diagram -a pdf-theme=my-theme.yml %ADOC%", + // with line numbers: + "SmtExportPdfArgs": "run -it -v %WD%:/documents/ asciidoctor/docker-asciidoctor asciidoctor-pdf -r asciidoctor-diagram -r ./extended.rb -a toc=macro -a pdf-theme=my-theme.yml -a env-pdf %ADOC%", + "SmtExportViewCmd": "cmd.exe", + "SmtExportViewArgs": "/c start %WD%\\%HTML% && ping 127.0.0.1 -n 5 >nul", + /* "SmtExportHtmlCmd": "ping", "SmtExportHtmlArgs": "127.0.0.1 -n 6", "SmtExportPdfCmd": "ping", "SmtExportPdfArgs": "127.0.0.1 -n 6", */ - "UmlExport": { - "Format": "PlantUml", - "LimitInitialValue": 0, - "CopyToPasteBuffer": true - }, - "Presets": [ - { - "Name": "Submodel template spec - 2 rows", - "Format": 2, - "RowsTop": 2, - "RowsBody": 2, - "Cols": 4, - "RowsGap": 2, - "Top": [ - "%frame=1% %font=bold% %fg=#ffffff%", - "", - "", - "", - "", - "%bg=#2e74b5%", - "[SME type]", - "semanticId", - "[valueType]", - "card.", - "%bg=#002060%", - "idShort", - "Description@en", - "example", - "" - ], - "Body": [ - "", - "", - "", - "", - "", - "%font=italic%", - "%SME.elementName%", - "%SME.semanticId[0].value%", - "%Property.valueType%", - "1", - "%bg=#e0e0e0%", - "%SME.idShort%", - "%CD.definition@en%", - "%SME.value%", - "" - ] + "UmlExport": { + "Format": "PlantUml", + "LimitInitialValue": 0, + "CopyToPasteBuffer": true }, - { - "Name": "Submodel template spec - 1 rows", - "Format": 2, - "RowsTop": 6, - "RowsBody": 1, - "Cols": 4, - "ReplaceFailedMatches": true, - "FailText": "-", - "ActInHierarchy": true, - "RowsGap": 2, - "Top": [ - "%frame=2% %bg=#002060% %font=bold% %fg=#ffffff%", - "", - "", - "", - "", - "", - "idShort:", - "%Parent.idShort%", - "", - "", - "", - "Class:", - "%Parent.elementName%", - "", - "", - "", - "semanticId:", - "%Parent.semanticId[0].value%", - "", - "", - "", - "Parent:", - "%Parent.parent%", - "", - "", - "", - "Explanation:", - "%Parent.description@en%", - "", - "", - "", - "[SME type]\r\nidShort", - "semanticId\r\nDescription@en", - "[valueType]\r\nexample", - "card." - ], - "Body": [ - "", - "", - "", - "", - "", - "", - "[%SME.elementShort%]\r\n%SME.idShort%", - "%SME.semanticId[0].value%\r\n%CD.preferredName@en% %CD.definition@en% %SME.description@en%", - "[%Property.valueType%]\r\n%SME.value%", - "%SME.multiplicity%" - ] - }, - { - "Name": "Submodel template spec - Markdown", - "Format": 4, - "RowsTop": 7, - "RowsBody": 1, - "Cols": 4, - "ReplaceFailedMatches": true, - "FailText": "-", - "ActInHierarchy": true, - "RowsGap": 2, - "Top": [ - "%frame=2% %bg=#002060% %font=bold% %fg=#ffffff%", - "", - "", - "", - "", - "%md=headline%", - "idShort:", - "%Parent.idShort%", - "", - "", - "", - "Class:", - "%Parent.elementName%", - "", - "", - "", - "semanticId:", - "%Parent.semanticId[0].value%", - "", - "", - "", - "Parent:", - "%Parent.parent%", - "", - "", - "", - "Explanation:", - "%Parent.description%", - "", - "", - "", - "Element details:", - "%Parent.details%", - "", - "", - "%md=headline%", - "[SME type]\r\nidShort", - "semanticId\r\nDescription@en", - "[valueType]\r\nexample", - "card." - ], - "Body": [ - "", - "", - "", - "", - "", - "", - "[%SME.elementShort%]\r\n%SME.idShort%", - "%SME.semanticId[0].value%\r\n%CD.preferredName@en% %CD.definition@en% %SME.description@en%", - "[%Property.valueType%]\r\n%SME.value%", - "%SME.multiplicity%" - ] - }, - { - "Name": "Submodel template spec - AsciiDoc", - "Format": 5, - "RowsTop": 7, - "RowsBody": 1, - "Cols": 4, - "ReplaceFailedMatches": true, - // blank FailText in order to produce no clutter - "FailText": "", - "ActInHierarchy": true, - "RowsGap": 2, - // note: colors for AsciiDoc do only work kind of. - // fg colors only by unquoted text, no spaces allowed; - // bg-values only in hex, fg-value only as known color names :-( - "Top": [ - "%frame=2% %table-bg=#eeeeee%", - "%width=15%", - "%width=55%", - "%width=15%", - "%width=15%", - "%md=headline% %font=bold%", - "idShort: %bg=#0029cc% %fg=white%", - "%Parent.idShort% %colspan=3%", - "", - "", - "", - "%font=bold%Class: %bg=#0029cc% %fg=white%", - "%Parent.elementName% %colspan=3%", - "", - "", - "", - "%font=bold%semanticId: %bg=#0029cc% %fg=white%", - "%Parent.semanticId[0].value% %colspan=3%", - "", - "", - "", - "%font=bold%Parent: %bg=#0029cc% %fg=white%", - "%Parent.parent% %colspan=3%", - "", - "", - "", - "%font=bold%Explanation: %bg=#0029cc% %fg=white%", - "%Parent.description@en% %colspan=3%", - "", - "", - "", - "%font=bold%Element details: %bg=#0029cc% %fg=white%", - "%Parent.details% %colspan=3%", - "", - "", - "%md=headline%", - "[SME type]\r\nidShort %bg=#0029cc% %fg=white%", - "semanticId\r\nDescription@en %bg=#0029cc% %fg=white%", - "[valueType]\r\nexample %bg=#0029cc% %fg=white%", - "card. %bg=#0029cc% %fg=white%" - ], - "Body": [ - "", - "", - "", - "", - "", - "", - "[%SME.elementShort%]\r\n%brpost%%SME.idShort%", - "%SME.semanticId[0].value%\r\n%brpost%%SME.supplSemIds[br-label=supplementalSemanticId]%%CD.definition@en%\r\n%SME.description@en%", - "[%Property.valueType%]\r\n%brpost%%SME.value%", - "%SME.multiplicity%" - ] - }, - { - "Name": "Submodel templ. spec. import", - "Format": 2, - "RowsTop": 7, - "RowsBody": 1, - "RowsGap": 2, - "Cols": 4, - "ReplaceFailedMatches": true, - "FailText": "-", - "ActInHierarchy": true, - "Top": [ - "%frame=2% %bg=#002060% %font=bold% %fg=#ffffff%", - "", - "", - "", - "", - "", - "idShort:", - "%Parent.idShort%", - "", - "", - "", - "Class:", - "%Parent.elementName%", - "", - "", - "", - "semanticId:", - "%Parent.semanticId%", - "", - "", - "", - "Parent:", - "%Parent.parent%", - "", - "", - "", - "Explanation:", - "%Parent.description%", - "", - "", - "", - "%*%", - "%*%", - "%*%", - "%*%", - "", - "%*%", - "%*%", - "%*%", - "%*%" - ], - "Body": [ - "", - "", - "", - "", - "", - "", - "%seq=% %SME.elementName% %SME.idShort%", - "%seq=\n% %SME.semanticId% %CD.definition%", - "%opt% %seq=10% [%Property.valueType%] %SME.value%", - "%SME.multiplicity%" - ] - }, - { - "Name": "AAS in practice", - "Format": 3, - "RowsTop": 1, - "RowsBody": 1, - "Cols": 7, - "ReplaceFailedMatches": true, - "RowsGap": 2, - "Top": [ - "%frame=1% %bg=LightGray% %font=bold%", - "", - "", - "", - "", - "", - "", - "", - "", - "preferredName", - "parent", - "semanticId", - "idShort", - "definition", - "value", - "Qualifier" - ], - "Body": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "%indent% %CD.anyName%", - "%SME.parent%", - "%SME.semanticId[0].value%", - "%SME.idShort%", - "%CD.definition@en%", - "%SME.value%", - "%SME.qualifiers%" - ] - }, - { - "Name": "Export 10 column style", - "Format": 3, - "RowsTop": 6, - "RowsBody": 1, - "Cols": 10, - "ReplaceFailedMatches": true, - "FailText": "", - "ActInHierarchy": true, - "RowsGap": 2, - "Top": [ - "%frame=1% %font=bold% %fg=#ffffff%", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "%bg=#002060%", - "idShort:", - "%Parent.idShort%", - "", - "", - "", - "", - "", - "", - "", - "", - "%bg=#002060%", - "Class:", - "%Parent.elementName%", - "", - "", - "", - "", - "", - "", - "", - "", - "%bg=#002060%", - "semanticId:", - "%Parent.semanticId[0].value%", - "", - "", - "", - "", - "", - "", - "", - "", - "%bg=#002060%", - "Parent:", - "%Parent.parent%", - "", - "", - "", - "", - "", - "", - "", - "", - "%bg=#002060%", - "Explanation:", - "%Parent.description%", - "", - "", - "", - "", - "", - "", - "", - "", - "%bg=#002060%", - "idShort", - "semanticId", - "preferredName", - "definition", - "unit", - "Example value", - "Card.", - "SME type / value type", - "Remarks", - "Contact person" - ], - "Body": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "%SME.idShort%", - "%SME.semanticId[0].value%", - "%CD.preferredName%", - "%CD.definition%", - "%CD.unit%", - "%SME.value%", - "%SME.multiplicity%", - "%SME.elementName% / %Property.valueType%", - "", - "" - ] - }, - { - "Name": "Import 10 column style", - "Format": 3, - "RowsTop": 6, - "RowsBody": 1, - "Cols": 10, - "ReplaceFailedMatches": false, - "FailText": "", - "ActInHierarchy": true, - "RowsGap": 2, - "Top": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "idShort:", - "%Parent.idShort%", - "", - "", - "", - "", - "", - "", - "%*%", - "%*%", - "", - "Class:", - "%Parent.elementName%", - "", - "", - "", - "", - "", - "", - "%*%", - "%*%", - "", - "semanticId:", - "%Parent.semanticId%", - "", - "", - "", - "", - "", - "", - "%*%", - "%*%", - "", - "Parent:", - "%Parent.parent%", - "", - "", - "", - "", - "", - "", - "%*%", - "%*%", - "", - "Explanation:", - "%Parent.description%", - "", - "", - "", - "", - "", - "", - "%*%", - "%*%", - "", - "%*%", - "%*%", - "%*%", - "%*%", - "%*%", - "%*%", - "%*%", - "%*%", - "%*%", - "%*%" - ], - "Body": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "%SME.idShort%", - "%SME.semanticId%", - "%CD.preferredName%", - "%CD.definition%", - "%CD.unit%", - "%SME.value%", - "%SME.multiplicity%", - "%SME.elementName%", - "%*%", - "%*%" - ] - }, - { - "Name": "UML EA Export", - "Format": 3, - "RowsTop": 1, - "RowsBody": 1, - "Cols": 7, - "ReplaceFailedMatches": true, - "FailText": "", - "ActInHierarchy": true, - "RowsGap": 0, - "Top": [ - "%frame=1% %font=bold% %bg=#2e74b5% %fg=#ffffff%", - "%width=10%", - "%width=20%", - "%width=10%", - "%width=30%", - "%width=15%", - "%width=10%", - "", - "", - "Class", - "%Parent.idShort%", - "%Parent.elmentName%", - "%Parent.description%", - "", - "", - "" - ], - "Body": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "Attribute", - "%SME.idShort%", - "null", - "%SME.description% / %CD.definition%", - "%Property.valueType% %stop% %SME.elementShort2% %stop% %CD.idShort%", - "null", - "%SME.multiplicity%" - ] - }, - { - "Name": "Export scratch info", - "Format": 3, - "RowsTop": 3, - "RowsBody": 1, - "RowsGap": 2, - "Cols": 2, - "ReplaceFailedMatches": true, - "FailText": "-", - "ActInHierarchy": true, - "NoHeadings": false, - "Top": [ - "", - "", - "", - "", - "", - "", - "", - "%Parent.idShort%", - "", - "", - "", - "" - ], - "Body": [ - "", - "", - "", - "", - "[%SME.elementShort%]\r\n%SME.idShort%", - "idShort: %SME.idShort%\r\nsemanticId: %SME.semanticId[0].value%" - ] - } - ] + "Presets": [ + { + "Name": "Submodel template spec - 2 rows", + "Format": 2, + "RowsTop": 2, + "RowsBody": 2, + "Cols": 4, + "RowsGap": 2, + "Top": [ + "%frame=1% %font=bold% %fg=#ffffff%", + "", + "", + "", + "", + "%bg=#2e74b5%", + "[SME type]", + "semanticId", + "[valueType]", + "card.", + "%bg=#002060%", + "idShort", + "Description@en", + "example", + "" + ], + "Body": [ + "", + "", + "", + "", + "", + "%font=italic%", + "%SME.elementName%", + "%SME.semanticId[0].value%", + "%Property.valueType%", + "1", + "%bg=#e0e0e0%", + "%SME.idShort%", + "%CD.definition@en%", + "%SME.value%", + "" + ] + }, + { + "Name": "Submodel template spec - 1 rows", + "Format": 2, + "RowsTop": 6, + "RowsBody": 1, + "Cols": 4, + "ReplaceFailedMatches": true, + "FailText": "-", + "ActInHierarchy": true, + "RowsGap": 2, + "Top": [ + "%frame=2% %bg=#002060% %font=bold% %fg=#ffffff%", + "", + "", + "", + "", + "", + "idShort:", + "%Parent.idShort%", + "", + "", + "", + "Class:", + "%Parent.elementName%", + "", + "", + "", + "semanticId:", + "%Parent.semanticId[0].value%", + "", + "", + "", + "Parent:", + "%Parent.parent%", + "", + "", + "", + "Explanation:", + "%Parent.description@en%", + "", + "", + "", + "[SME type]\r\nidShort", + "semanticId\r\nDescription@en", + "[valueType]\r\nexample", + "card." + ], + "Body": [ + "", + "", + "", + "", + "", + "", + "[%SME.elementShort%]\r\n%SME.idShort%", + "%SME.semanticId[0].value%\r\n%CD.preferredName@en% %CD.definition@en% %SME.description@en%", + "[%Property.valueType%]\r\n%SME.value%", + "%SME.multiplicity%" + ] + }, + { + "Name": "Submodel template spec - Markdown", + "Format": 4, + "RowsTop": 7, + "RowsBody": 1, + "Cols": 4, + "ReplaceFailedMatches": true, + "FailText": "-", + "ActInHierarchy": true, + "RowsGap": 2, + "Top": [ + "%frame=2% %bg=#002060% %font=bold% %fg=#ffffff%", + "", + "", + "", + "", + "%md=headline%", + "idShort:", + "%Parent.idShort%", + "", + "", + "", + "Class:", + "%Parent.elementName%", + "", + "", + "", + "semanticId:", + "%Parent.semanticId[0].value%", + "", + "", + "", + "Parent:", + "%Parent.parent%", + "", + "", + "", + "Explanation:", + "%Parent.description%", + "", + "", + "", + "Element details:", + "%Parent.details%", + "", + "", + "%md=headline%", + "[SME type]\r\nidShort", + "semanticId\r\nDescription@en", + "[valueType]\r\nexample", + "card." + ], + "Body": [ + "", + "", + "", + "", + "", + "", + "[%SME.elementShort%]\r\n%SME.idShort%", + "%SME.semanticId[0].value%\r\n%CD.preferredName@en% %CD.definition@en% %SME.description@en%", + "[%Property.valueType%]\r\n%SME.value%", + "%SME.multiplicity%" + ] + }, + { + "Name": "Submodel template spec - AsciiDoc", + "Format": 5, + "RowsTop": 7, + "RowsBody": 1, + "Cols": 4, + "ReplaceFailedMatches": true, + // blank FailText in order to produce no clutter + "FailText": "", + "ActInHierarchy": true, + "RowsGap": 2, + // note: colors for AsciiDoc do only work kind of. + // fg colors only by unquoted text, no spaces allowed; + // bg-values only in hex, fg-value only as known color names :-( + "Top": [ + "%frame=2% %table-bg=#eeeeee%", + "%width=15%", + "%width=55%", + "%width=15%", + "%width=15%", + "%md=headline% %font=bold%", + "idShort: %bg=#0029cc% %fg=white%", + "%Parent.idShort% %colspan=3%", + "", + "", + "", + "%font=bold%Class: %bg=#0029cc% %fg=white%", + "%Parent.elementName% %colspan=3%", + "", + "", + "", + "%font=bold%semanticId: %bg=#0029cc% %fg=white%", + "%Parent.semanticId[0].value% %colspan=3%", + "", + "", + "", + "%font=bold%Parent: %bg=#0029cc% %fg=white%", + "%Parent.parent% %colspan=3%", + "", + "", + "", + "%font=bold%Explanation: %bg=#0029cc% %fg=white%", + "%Parent.description@en% %colspan=3%", + "", + "", + "", + "%font=bold%Element details: %bg=#0029cc% %fg=white%", + "%Parent.details% %colspan=3%", + "", + "", + "%md=headline%", + "[SME type]\r\nidShort %bg=#0029cc% %fg=white%", + "semanticId\r\nDescription@en %bg=#0029cc% %fg=white%", + "[valueType]\r\nexample %bg=#0029cc% %fg=white%", + "card. %bg=#0029cc% %fg=white%" + ], + "Body": [ + "", + "", + "", + "", + "", + "", + "[%SME.elementShort%]\r\n%brpost%%SME.idShort%", + "%SME.semanticId[0].value%\r\n%brpost%%SME.supplSemIds[br-label=supplementalSemanticId]%%CD.definition@en%\r\n%SME.description@en%", + "[%Property.valueType%]\r\n%brpost%%SME.value%", + "%SME.multiplicity%" + ] + }, + { + "Name": "Submodel templ. spec. import", + "Format": 2, + "RowsTop": 7, + "RowsBody": 1, + "RowsGap": 2, + "Cols": 4, + "ReplaceFailedMatches": true, + "FailText": "-", + "ActInHierarchy": true, + "Top": [ + "%frame=2% %bg=#002060% %font=bold% %fg=#ffffff%", + "", + "", + "", + "", + "", + "idShort:", + "%Parent.idShort%", + "", + "", + "", + "Class:", + "%Parent.elementName%", + "", + "", + "", + "semanticId:", + "%Parent.semanticId%", + "", + "", + "", + "Parent:", + "%Parent.parent%", + "", + "", + "", + "Explanation:", + "%Parent.description%", + "", + "", + "", + "%*%", + "%*%", + "%*%", + "%*%", + "", + "%*%", + "%*%", + "%*%", + "%*%" + ], + "Body": [ + "", + "", + "", + "", + "", + "", + "%seq=% %SME.elementName% %SME.idShort%", + "%seq=\n% %SME.semanticId% %CD.definition%", + "%opt% %seq=10% [%Property.valueType%] %SME.value%", + "%SME.multiplicity%" + ] + }, + { + "Name": "AAS in practice", + "Format": 3, + "RowsTop": 1, + "RowsBody": 1, + "Cols": 7, + "ReplaceFailedMatches": true, + "RowsGap": 2, + "Top": [ + "%frame=1% %bg=LightGray% %font=bold%", + "", + "", + "", + "", + "", + "", + "", + "", + "preferredName", + "parent", + "semanticId", + "idShort", + "definition", + "value", + "Qualifier" + ], + "Body": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "%indent% %CD.anyName%", + "%SME.parent%", + "%SME.semanticId[0].value%", + "%SME.idShort%", + "%CD.definition@en%", + "%SME.value%", + "%SME.qualifiers%" + ] + }, + { + "Name": "Export 10 column style", + "Format": 3, + "RowsTop": 6, + "RowsBody": 1, + "Cols": 10, + "ReplaceFailedMatches": true, + "FailText": "", + "ActInHierarchy": true, + "RowsGap": 2, + "Top": [ + "%frame=1% %font=bold% %fg=#ffffff%", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "%bg=#002060%", + "idShort:", + "%Parent.idShort%", + "", + "", + "", + "", + "", + "", + "", + "", + "%bg=#002060%", + "Class:", + "%Parent.elementName%", + "", + "", + "", + "", + "", + "", + "", + "", + "%bg=#002060%", + "semanticId:", + "%Parent.semanticId[0].value%", + "", + "", + "", + "", + "", + "", + "", + "", + "%bg=#002060%", + "Parent:", + "%Parent.parent%", + "", + "", + "", + "", + "", + "", + "", + "", + "%bg=#002060%", + "Explanation:", + "%Parent.description%", + "", + "", + "", + "", + "", + "", + "", + "", + "%bg=#002060%", + "idShort", + "semanticId", + "preferredName", + "definition", + "unit", + "Example value", + "Card.", + "SME type / value type", + "Remarks", + "Contact person" + ], + "Body": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "%SME.idShort%", + "%SME.semanticId[0].value%", + "%CD.preferredName%", + "%CD.definition%", + "%CD.unit%", + "%SME.value%", + "%SME.multiplicity%", + "%SME.elementName% / %Property.valueType%", + "", + "" + ] + }, + { + "Name": "Import 10 column style", + "Format": 3, + "RowsTop": 6, + "RowsBody": 1, + "Cols": 10, + "ReplaceFailedMatches": false, + "FailText": "", + "ActInHierarchy": true, + "RowsGap": 2, + "Top": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "idShort:", + "%Parent.idShort%", + "", + "", + "", + "", + "", + "", + "%*%", + "%*%", + "", + "Class:", + "%Parent.elementName%", + "", + "", + "", + "", + "", + "", + "%*%", + "%*%", + "", + "semanticId:", + "%Parent.semanticId%", + "", + "", + "", + "", + "", + "", + "%*%", + "%*%", + "", + "Parent:", + "%Parent.parent%", + "", + "", + "", + "", + "", + "", + "%*%", + "%*%", + "", + "Explanation:", + "%Parent.description%", + "", + "", + "", + "", + "", + "", + "%*%", + "%*%", + "", + "%*%", + "%*%", + "%*%", + "%*%", + "%*%", + "%*%", + "%*%", + "%*%", + "%*%", + "%*%" + ], + "Body": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "%SME.idShort%", + "%SME.semanticId%", + "%CD.preferredName%", + "%CD.definition%", + "%CD.unit%", + "%SME.value%", + "%SME.multiplicity%", + "%SME.elementName%", + "%*%", + "%*%" + ] + }, + { + "Name": "UML EA Export", + "Format": 3, + "RowsTop": 1, + "RowsBody": 1, + "Cols": 7, + "ReplaceFailedMatches": true, + "FailText": "", + "ActInHierarchy": true, + "RowsGap": 0, + "Top": [ + "%frame=1% %font=bold% %bg=#2e74b5% %fg=#ffffff%", + "%width=10%", + "%width=20%", + "%width=10%", + "%width=30%", + "%width=15%", + "%width=10%", + "", + "", + "Class", + "%Parent.idShort%", + "%Parent.elmentName%", + "%Parent.description%", + "", + "", + "" + ], + "Body": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "Attribute", + "%SME.idShort%", + "null", + "%SME.description% / %CD.definition%", + "%Property.valueType% %stop% %SME.elementShort2% %stop% %CD.idShort%", + "null", + "%SME.multiplicity%" + ] + }, + { + "Name": "Export scratch info", + "Format": 3, + "RowsTop": 3, + "RowsBody": 1, + "RowsGap": 2, + "Cols": 2, + "ReplaceFailedMatches": true, + "FailText": "-", + "ActInHierarchy": true, + "NoHeadings": false, + "Top": [ + "", + "", + "", + "", + "", + "", + "", + "%Parent.idShort%", + "", + "", + "", + "" + ], + "Body": [ + "", + "", + "", + "", + "[%SME.elementShort%]\r\n%SME.idShort%", + "idShort: %SME.idShort%\r\nsemanticId: %SME.semanticId[0].value%" + ] + } + ] }