You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by jo...@apache.org on 2021/05/21 14:11:28 UTC

[isis] branch ISIS-2505_Catch_Up_With_Demo_Examples updated (0e5904f -> afdc353)

This is an automated email from the ASF dual-hosted git repository.

joergrade pushed a change to branch ISIS-2505_Catch_Up_With_Demo_Examples
in repository https://gitbox.apache.org/repos/asf/isis.git.


    from 0e5904f  single diagram in RoTab, scrollbars to be added yet
     new 836f9a4  straighten out Diagram classes
     new 1015b37  Visualization for layout.xml
     new a1147b1  Use Layout.svg as sample data for SvgMap
     new afdc353  ISIS-2505 ListDM/Aggregator renamed to Collection*, ObjectAggregator can have multiple CollectionAggregators (for parented collections), demo.JavaLangStringJdo entities not shown yet

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../kroviz/partials/design/seq-aggregator.adoc     |   6 +-
 .../kroviz/partials/design/uml-aggregator.adoc     |   8 +-
 .../kroviz/partials/design/uml-overview.adoc       |   6 +-
 incubator/clients/kroviz/build.gradle.kts          |   2 +-
 .../{ListAggregator.kt => CollectionAggregator.kt} |  41 +-
 .../kroviz/core/aggregator/ObjectAggregator.kt     |  41 +-
 .../core/model/{ListDM.kt => CollectionDM.kt}      |  15 +-
 .../isis/client/kroviz/core/model/ObjectDM.kt      |   4 -
 .../isis/client/kroviz/handler/BaseHandler.kt      |   2 +-
 .../client/kroviz/handler/ResultListHandler.kt     |   6 +-
 .../isis/client/kroviz/to/PlainTransferObjects.kt  |   2 +-
 .../client/kroviz/ui/builder/FieldSetBuilder.kt    |  12 +-
 .../isis/client/kroviz/ui/core/ColumnFactory.kt    |   8 +-
 .../apache/isis/client/kroviz/ui/core/RoDisplay.kt |  11 +-
 .../isis/client/kroviz/ui/core/RoStatusBar.kt      |   4 +-
 .../apache/isis/client/kroviz/ui/core/RoTable.kt   |  10 +-
 .../apache/isis/client/kroviz/ui/core/UiManager.kt |   4 +-
 .../ui/diagram/{PumlBuilder.kt => ClassDiagram.kt} |  74 +---
 .../isis/client/kroviz/ui/diagram/JsonDiagram.kt   |   9 +
 .../isis/client/kroviz/ui/diagram/LayoutDiagram.kt |  37 +-
 .../client/kroviz/ui/diagram/SequenceDiagram.kt    |  66 +++
 .../isis/client/kroviz/ui/diagram/UmlDiagram.kt    |  59 ---
 .../isis/client/kroviz/ui/dialog/DiagramDialog.kt  |   2 +-
 .../isis/client/kroviz/ui/dialog/EventLogDetail.kt |  22 +-
 .../client/kroviz/ui/kv/override/RoTabPanel.kt     |   6 +-
 .../client/kroviz/ui/panel/EventLogTableMgr.kt     |   5 +-
 .../apache/isis/client/kroviz/ui/panel/SvgMap.kt   | 454 ++++++++++++++++++---
 ...gregatorTest.kt => CollectionAggregatorTest.kt} |  14 +-
 .../client/kroviz/core/event/EventStoreTest.kt     |   8 +-
 .../{DisplayListTest.kt => CollectionDMTest.kt}    |   8 +-
 .../isis/client/kroviz/core/model/ExposerTest.kt   |  14 +
 .../snapshots/demo2_0_0/JAVA_LANG_STRING_JDO.kt    | 393 ++++++++++++++++++
 .../isis/client/kroviz/ui/ClassDiagramTest.kt      |  59 +++
 .../SequenceDiagramTest.kt}                        |  31 +-
 34 files changed, 1129 insertions(+), 314 deletions(-)
 rename incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/aggregator/{ListAggregator.kt => CollectionAggregator.kt} (70%)
 rename incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/model/{ListDM.kt => CollectionDM.kt} (73%)
 rename incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/diagram/{PumlBuilder.kt => ClassDiagram.kt} (59%)
 create mode 100644 incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/diagram/JsonDiagram.kt
 create mode 100644 incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/diagram/SequenceDiagram.kt
 delete mode 100644 incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/diagram/UmlDiagram.kt
 rename incubator/clients/kroviz/src/test/kotlin/org/apache/isis/client/kroviz/core/aggregator/{ListAggregatorTest.kt => CollectionAggregatorTest.kt} (89%)
 rename incubator/clients/kroviz/src/test/kotlin/org/apache/isis/client/kroviz/core/model/{DisplayListTest.kt => CollectionDMTest.kt} (95%)
 create mode 100644 incubator/clients/kroviz/src/test/kotlin/org/apache/isis/client/kroviz/snapshots/demo2_0_0/JAVA_LANG_STRING_JDO.kt
 create mode 100644 incubator/clients/kroviz/src/test/kotlin/org/apache/isis/client/kroviz/ui/ClassDiagramTest.kt
 rename incubator/clients/kroviz/src/test/kotlin/org/apache/isis/client/kroviz/ui/{PumlBuilderTest.kt => table/SequenceDiagramTest.kt} (78%)

[isis] 03/04: Use Layout.svg as sample data for SvgMap

Posted by jo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

joergrade pushed a commit to branch ISIS-2505_Catch_Up_With_Demo_Examples
in repository https://gitbox.apache.org/repos/asf/isis.git

commit a1147b1ca38636baf24d4270f847fe257d10f294
Author: Jörg Rade <jo...@kuehne-nagel.com>
AuthorDate: Thu May 13 19:54:45 2021 +0200

    Use Layout.svg as sample data for SvgMap
---
 .../apache/isis/client/kroviz/ui/panel/SvgMap.kt   | 454 ++++++++++++++++++---
 1 file changed, 389 insertions(+), 65 deletions(-)

diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/panel/SvgMap.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/panel/SvgMap.kt
index 29a6f12..e264638 100644
--- a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/panel/SvgMap.kt
+++ b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/panel/SvgMap.kt
@@ -26,71 +26,395 @@ import io.kvision.utils.pc
 class SvgMap : SimplePanel() {
 
     @Deprecated("pass in as arg")
-    val str = """<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<svg xmlns="http://www.w3.org/2000/svg" contentScriptType="application/ecmascript" contentStyleType="text/css"
-     height="203px" preserveAspectRatio="none" style="width:309px;height:203px;" version="1.1" viewBox="0 0 309 203"
-     width="309px" zoomAndPan="magnify">
-    <defs>
-        <filter height="300%" id="f1xj00ih3jrk7f" width="300%" x="-1" y="-1">
-            <feGaussianBlur result="blurOut" stdDeviation="2.0"/>
-            <feColorMatrix in="blurOut" result="blurOut2" type="matrix"
-                           values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .4 0"/>
-            <feOffset dx="4.0" dy="4.0" in="blurOut2" result="blurOut3"/>
-            <feBlend in="SourceGraphic" in2="blurOut3" mode="normal"/>
-        </filter>
-    </defs>
-    <g><!--MD5=[f621a9b5735c62a9e50fa7c1e42ea0f4]↵cluster domainapp.modules.simple.dom.impl-->
-        <polygon fill="#FFFFFF" filter="url(#f1xj00ih3jrk7f)"
-                 points="14,16,277,16,284,38.7999,287,38.7999,287,191,14,191,14,16"
-                 style="stroke: #000000; stroke-width: 1.5;"/>
-        <line style="stroke: #000000; stroke-width: 1.5;" x1="14" x2="284" y1="38.7999" y2="38.7999"/>
-        <text fill="#000000" font-family="sans-serif" font-size="14" font-weight="bold" lengthAdjust="spacingAndGlyphs"
-              textLength="257" x="18" y="31.9999">domainapp.modules.simple.dom.impl
-        </text><!--MD5=[e6e8857f289496579330543e748c2106]↵class SimpleObject-->
-        <rect fill="#FEFECE" filter="url(#f1xj00ih3jrk7f)" height="140.3993" id="SimpleObject"
-              style="stroke: #A80036; stroke-width: 1.5;" width="129" x="85.5" y="43"/>
-        <ellipse cx="112.2" cy="59" fill="#ADD1B2" rx="11" ry="11" style="stroke: #A80036; stroke-width: 1.0;"/>
-        <path d="M111.5594,62.7813 Q112.3563,62.7813 112.9266,62.5859 Q113.4969,62.3906 113.7391,62.1641 Q113.9813,61.9375 114.2234,61.7422 Q114.4656,61.5469 114.6844,61.5469 Q115.0281,61.5469 115.2859,61.8047 Q115.5438,62.0625 115.5438,62.3906 Q115.5438,63.125 114.3797,63.8047 Q113.2156,64.4844 111.5125,64.4844 Q109.3563,64.4844 107.9344,63.2188 Q106.5125,61.9531 106.5125,60.0156 L106.5125,58.8906 Q106.5125,56.8594 107.8406,55.4766 Q109.1688,54.0938 111.1375,54.0938 Q112.325,54.0938 113 [...]
-        <text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="71"
-              x="128.8" y="63.8">SimpleObject
-        </text>
-        <line style="stroke: #A80036; stroke-width: 1.5;" x1="86.5" x2="213.5" y1="75" y2="75"/>
-        <line style="stroke: #A80036; stroke-width: 1.5;" x1="86.5" x2="213.5" y1="83" y2="83"/>
-        <text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="93"
-              x="91.5" y="97.9999">rebuildMetamodel()
-        </text>
-        <text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="117"
-              x="91.5" y="111.1998">downloadJdoMetadata()
-        </text>
-        <text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="69"
-              x="91.5" y="124.3997">openRestApi()
-        </text>
-        <text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="104"
-              x="91.5" y="137.5996">downloadLayoutXml()
-        </text>
-        <text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="37"
-              x="91.5" y="150.7995">delete()
-        </text>
-        <text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="70"
-              x="91.5" y="163.9994">updateName()
-        </text>
-        <text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="56"
-              x="91.5" y="177.1993">clearHints()
-        </text><!--MD5=[903507c5920b0ecb2f83cd94e1c42ae5]↵@startuml
-↵package domainapp.modules.simple.dom.impl {
-↵class SimpleObject
-↵SimpleObject : rebuildMetamodel()
-↵SimpleObject : downloadJdoMetadata()
-↵SimpleObject : openRestApi()
-↵SimpleObject : downloadLayoutXml()
-↵SimpleObject : delete()
-↵SimpleObject : updateName()
-↵SimpleObject : clearHints()
-↵}
-↵@enduml
-↵↵PlantUML version 1.2020.04(Thu Mar 19 10:16:49 GMT 2020)↵(GPL source distribution)↵Java Runtime: OpenJDK Runtime Environment↵JVM: OpenJDK 64-Bit Server VM↵Java Version: 1.8.0_191-b12↵Operating System: Linux↵Default Encoding: UTF-8↵Language: en↵Country: US↵-->
-    </g>
-</svg>
+    val str = """<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentScriptType="application/ecmascript" contentStyleType="text/css" height="4881.25px" preserveAspectRatio="none" style="width:6395px;height:4881px;" version="1.1" viewBox="0 0 6395 4881" width="6395.8333px" zoomAndPan="magnify"><defs><filter height="300%" id="f1o3ddckp2b3gs" width="300%" x="-1" y="-1"><feGaussianBlur result="blurOut [...]
+@startuml
+skinparam dpi 200
+
+class "root" as root {
+.. Properties ..
+cssClass: null
+.. Objects ..
+row: [Array]
+}
+class "row" as root.row {
+.. Properties ..
+.. Objects ..
+0: [object Object]
+1: [object Object]
+}
+class "0" as root.row.0 {
+.. Properties ..
+metadataError: null
+cssClass: null
+id: null
+.. Objects ..
+cols: [Array]
+}
+class "cols" as root.row.0.cols {
+.. Properties ..
+.. Objects ..
+0: [object Object]
+}
+class "0" as root.row.0.cols.0 {
+.. Properties ..
+.. Objects ..
+col: [object Object]
+}
+class "col" as root.row.0.cols.0.col {
+.. Properties ..
+metadataError: null
+cssClass: null
+size: null
+id: null
+span: 12
+unreferencedActions: true
+unreferencedCollections: null
+.. Objects ..
+domainObject: [object Object]
+action: [Array]
+}
+class "domainObject" as root.row.0.cols.0.col.domainObject {
+.. Properties ..
+named: null
+describedAs: null
+plural: null
+metadataError: null
+bookmarking: null
+cssClass: null
+cssClassFa: null
+cssClassFaPosition: null
+namedEscaped: null
+.. Objects ..
+link: [object Object]
+}
+class "link" as root.row.0.cols.0.col.domainObject.link {
+.. Properties ..
+rel: urn:org.restfulobjects:rels/element
+method: GET
+href: http://localhost:8080/restful/objects/isisApplib.FixtureResult/;
+type: application/jsonprofile&#x3D;&quot;urn:org.restfulobjects:repr-types/object&quot;
+}
+class "action" as root.row.0.cols.0.col.action {
+.. Properties ..
+.. Objects ..
+0: [object Object]
+1: [object Object]
+2: [object Object]
+3: [object Object]
+}
+class "0" as root.row.0.cols.0.col.action.0 {
+.. Properties ..
+named: null
+describedAs: null
+metadataError: null
+id: clearHints
+bookmarking: null
+cssClass: null
+cssClassFa: null
+cssClassFaPosition: null
+hidden: null
+namedEscaped: null
+position: null
+promptStyle: null
+.. Objects ..
+link: [object Object]
+}
+class "link" as root.row.0.cols.0.col.action.0.link {
+.. Properties ..
+rel: urn:org.restfulobjects:rels/action
+method: GET
+href: http://localhost:8080/restful/objects/isisApplib.FixtureResult/;/actions/clearHints
+type: application/jsonprofile&#x3D;&quot;urn:org.restfulobjects:repr-types/object-action&quot;
+}
+class "1" as root.row.0.cols.0.col.action.1 {
+.. Properties ..
+named: null
+describedAs: null
+metadataError: null
+id: downloadLayoutXml
+bookmarking: null
+cssClass: null
+cssClassFa: null
+cssClassFaPosition: null
+hidden: null
+namedEscaped: null
+position: null
+promptStyle: null
+.. Objects ..
+link: [object Object]
+}
+class "link" as root.row.0.cols.0.col.action.1.link {
+.. Properties ..
+rel: urn:org.restfulobjects:rels/action
+method: GET
+href: http://localhost:8080/restful/objects/isisApplib.FixtureResult/;/actions/downloadLayoutXml
+type: application/jsonprofile&#x3D;&quot;urn:org.restfulobjects:repr-types/object-action&quot;
+}
+class "2" as root.row.0.cols.0.col.action.2 {
+.. Properties ..
+named: null
+describedAs: null
+metadataError: null
+id: rebuildMetamodel
+bookmarking: null
+cssClass: null
+cssClassFa: null
+cssClassFaPosition: null
+hidden: null
+namedEscaped: null
+position: null
+promptStyle: null
+.. Objects ..
+link: [object Object]
+}
+class "link" as root.row.0.cols.0.col.action.2.link {
+.. Properties ..
+rel: urn:org.restfulobjects:rels/action
+method: GET
+href: http://localhost:8080/restful/objects/isisApplib.FixtureResult/;/actions/rebuildMetamodel
+type: application/jsonprofile&#x3D;&quot;urn:org.restfulobjects:repr-types/object-action&quot;
+}
+class "3" as root.row.0.cols.0.col.action.3 {
+.. Properties ..
+named: null
+describedAs: null
+metadataError: null
+id: openRestApi
+bookmarking: null
+cssClass: null
+cssClassFa: null
+cssClassFaPosition: null
+hidden: null
+namedEscaped: null
+position: null
+promptStyle: null
+.. Objects ..
+link: [object Object]
+}
+class "link" as root.row.0.cols.0.col.action.3.link {
+.. Properties ..
+rel: urn:org.restfulobjects:rels/action
+method: GET
+href: http://localhost:8080/restful/objects/isisApplib.FixtureResult/;/actions/openRestApi
+type: application/jsonprofile&#x3D;&quot;urn:org.restfulobjects:repr-types/object-action&quot;
+}
+class "1" as root.row.1 {
+.. Properties ..
+metadataError: null
+cssClass: null
+id: null
+.. Objects ..
+cols: [Array]
+}
+class "cols" as root.row.1.cols {
+.. Properties ..
+.. Objects ..
+0: [object Object]
+1: [object Object]
+}
+class "0" as root.row.1.cols.0 {
+.. Properties ..
+.. Objects ..
+col: [object Object]
+}
+class "col" as root.row.1.cols.0.col {
+.. Properties ..
+domainObject: null
+metadataError: null
+cssClass: null
+size: null
+id: null
+span: 4
+unreferencedActions: null
+unreferencedCollections: null
+.. Objects ..
+fieldSet: [Array]
+}
+class "fieldSet" as root.row.1.cols.0.col.fieldSet {
+.. Properties ..
+.. Objects ..
+0: [object Object]
+}
+class "0" as root.row.1.cols.0.col.fieldSet.0 {
+.. Properties ..
+name: General
+metadataError: null
+id: general
+unreferencedActions: null
+unreferencedProperties: true
+.. Objects ..
+property: [Array]
+}
+class "property" as root.row.1.cols.0.col.fieldSet.0.property {
+.. Properties ..
+.. Objects ..
+0: [object Object]
+1: [object Object]
+2: [object Object]
+3: [object Object]
+}
+class "0" as root.row.1.cols.0.col.fieldSet.0.property.0 {
+.. Properties ..
+named: null
+describedAs: null
+metadataError: null
+id: className
+cssClass: null
+hidden: null
+labelPosition: null
+multiLine: null
+namedEscaped: null
+promptStyle: null
+renderedAsDayBefore: null
+typicalLength: null
+unchanging: null
+.. Objects ..
+link: [object Object]
+}
+class "link" as root.row.1.cols.0.col.fieldSet.0.property.0.link {
+.. Properties ..
+rel: urn:org.restfulobjects:rels/property
+method: GET
+href: http://localhost:8080/restful/objects/isisApplib.FixtureResult/;/properties/className
+type: application/jsonprofile&#x3D;&quot;urn:org.restfulobjects:repr-types/object-property&quot;
+}
+class "1" as root.row.1.cols.0.col.fieldSet.0.property.1 {
+.. Properties ..
+named: null
+describedAs: null
+metadataError: null
+id: fixtureScriptClassName
+cssClass: null
+hidden: null
+labelPosition: null
+multiLine: null
+namedEscaped: null
+promptStyle: null
+renderedAsDayBefore: null
+typicalLength: null
+unchanging: null
+.. Objects ..
+link: [object Object]
+}
+class "link" as root.row.1.cols.0.col.fieldSet.0.property.1.link {
+.. Properties ..
+rel: urn:org.restfulobjects:rels/property
+method: GET
+href: http://localhost:8080/restful/objects/isisApplib.FixtureResult/;/properties/fixtureScriptClassName
+type: application/jsonprofile&#x3D;&quot;urn:org.restfulobjects:repr-types/object-property&quot;
+}
+class "2" as root.row.1.cols.0.col.fieldSet.0.property.2 {
+.. Properties ..
+named: null
+describedAs: null
+metadataError: null
+id: key
+cssClass: null
+hidden: null
+labelPosition: null
+multiLine: null
+namedEscaped: null
+promptStyle: null
+renderedAsDayBefore: null
+typicalLength: null
+unchanging: null
+.. Objects ..
+link: [object Object]
+}
+class "link" as root.row.1.cols.0.col.fieldSet.0.property.2.link {
+.. Properties ..
+rel: urn:org.restfulobjects:rels/property
+method: GET
+href: http://localhost:8080/restful/objects/isisApplib.FixtureResult/;/properties/key
+type: application/jsonprofile&#x3D;&quot;urn:org.restfulobjects:repr-types/object-property&quot;
+}
+class "3" as root.row.1.cols.0.col.fieldSet.0.property.3 {
+.. Properties ..
+named: null
+describedAs: null
+metadataError: null
+id: object
+cssClass: null
+hidden: null
+labelPosition: null
+multiLine: null
+namedEscaped: null
+promptStyle: null
+renderedAsDayBefore: null
+typicalLength: null
+unchanging: null
+.. Objects ..
+link: [object Object]
+}
+class "link" as root.row.1.cols.0.col.fieldSet.0.property.3.link {
+.. Properties ..
+rel: urn:org.restfulobjects:rels/property
+method: GET
+href: http://localhost:8080/restful/objects/isisApplib.FixtureResult/;/properties/object
+type: application/jsonprofile&#x3D;&quot;urn:org.restfulobjects:repr-types/object-property&quot;
+}
+class "1" as root.row.1.cols.1 {
+.. Properties ..
+.. Objects ..
+col: [object Object]
+}
+class "col" as root.row.1.cols.1.col {
+.. Properties ..
+domainObject: null
+metadataError: null
+cssClass: null
+size: null
+id: null
+span: 8
+unreferencedActions: null
+unreferencedCollections: true
+}
+root.row.0.cols.0.col.domainObject - - root.row.0.cols.0.col.domainObject.link
+root.row.0.cols.0.col.action.0 - - root.row.0.cols.0.col.action.0.link
+root.row.0.cols.0.col.action.1 - - root.row.0.cols.0.col.action.1.link
+root.row.0.cols.0.col.action.2 - - root.row.0.cols.0.col.action.2.link
+root.row.0.cols.0.col.action.3 - - root.row.0.cols.0.col.action.3.link
+root.row.0.cols.0.col.action - - root.row.0.cols.0.col.action.0
+root.row.0.cols.0.col.action - - root.row.0.cols.0.col.action.1
+root.row.0.cols.0.col.action - - root.row.0.cols.0.col.action.2
+root.row.0.cols.0.col.action - - root.row.0.cols.0.col.action.3
+root.row.0.cols.0.col - - root.row.0.cols.0.col.domainObject
+root.row.0.cols.0.col - - root.row.0.cols.0.col.action
+root.row.0.cols.0 - - root.row.0.cols.0.col
+root.row.0.cols - - root.row.0.cols.0
+root.row.0 - - root.row.0.cols
+root.row.1.cols.0.col.fieldSet.0.property.0 - - root.row.1.cols.0.col.fieldSet.0.property.0.link
+root.row.1.cols.0.col.fieldSet.0.property.1 - - root.row.1.cols.0.col.fieldSet.0.property.1.link
+root.row.1.cols.0.col.fieldSet.0.property.2 - - root.row.1.cols.0.col.fieldSet.0.property.2.link
+root.row.1.cols.0.col.fieldSet.0.property.3 - - root.row.1.cols.0.col.fieldSet.0.property.3.link
+root.row.1.cols.0.col.fieldSet.0.property - - root.row.1.cols.0.col.fieldSet.0.property.0
+root.row.1.cols.0.col.fieldSet.0.property - - root.row.1.cols.0.col.fieldSet.0.property.1
+root.row.1.cols.0.col.fieldSet.0.property - - root.row.1.cols.0.col.fieldSet.0.property.2
+root.row.1.cols.0.col.fieldSet.0.property - - root.row.1.cols.0.col.fieldSet.0.property.3
+root.row.1.cols.0.col.fieldSet.0 - - root.row.1.cols.0.col.fieldSet.0.property
+root.row.1.cols.0.col.fieldSet - - root.row.1.cols.0.col.fieldSet.0
+root.row.1.cols.0.col - - root.row.1.cols.0.col.fieldSet
+root.row.1.cols.0 - - root.row.1.cols.0.col
+root.row.1.cols.1 - - root.row.1.cols.1.col
+root.row.1.cols - - root.row.1.cols.0
+root.row.1.cols - - root.row.1.cols.1
+root.row.1 - - root.row.1.cols
+root.row - - root.row.0
+root.row - - root.row.1
+root - - root.row
+@enduml
+
+PlantUML version 1.2019.07(Mon Jun 24 21:59:20 CEST 2019)
+(GPL source distribution)
+Java Runtime: OpenJDK Runtime Environment
+JVM: OpenJDK 64-Bit Server VM
+Java Version: 12.0.1+12
+Operating System: Windows 10
+OS Version: 10.0
+Default Encoding: UTF-8
+Language: en
+Country: US
+--></g></svg>
 """
 
     init {

[isis] 02/04: Visualization for layout.xml

Posted by jo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

joergrade pushed a commit to branch ISIS-2505_Catch_Up_With_Demo_Examples
in repository https://gitbox.apache.org/repos/asf/isis.git

commit 1015b376206418a4aeeef055b4daed577f912783
Author: Jörg Rade <jo...@kuehne-nagel.com>
AuthorDate: Wed May 12 13:01:08 2021 +0200

    Visualization for layout.xml
---
 .../isis/client/kroviz/ui/diagram/LayoutDiagram.kt | 40 ++++++++++++----------
 .../isis/client/kroviz/ui/dialog/EventLogDetail.kt |  7 ++--
 .../client/kroviz/ui/kv/override/RoTabPanel.kt     |  6 ++--
 3 files changed, 28 insertions(+), 25 deletions(-)

diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/diagram/LayoutDiagram.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/diagram/LayoutDiagram.kt
index 201d281..3ca9752 100644
--- a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/diagram/LayoutDiagram.kt
+++ b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/diagram/LayoutDiagram.kt
@@ -18,9 +18,9 @@
  */
 package org.apache.isis.client.kroviz.ui.diagram
 
-import org.apache.isis.client.kroviz.layout.ColsLt
-import org.apache.isis.client.kroviz.layout.Layout
-import org.apache.isis.client.kroviz.layout.RowLt
+import org.apache.isis.client.kroviz.to.bs3.Col
+import org.apache.isis.client.kroviz.to.bs3.Grid
+import org.apache.isis.client.kroviz.to.bs3.Row
 
 object LayoutDiagram {
 
@@ -33,33 +33,35 @@ object LayoutDiagram {
             "}\n" +
             "@endsalt"
 
-    fun build(layout: Layout): String {
+    fun build(grid: Grid): String {
         var pumlCode = "@startsalt\n{#\n"
-        layout.row.forEach {
+        grid.rows.forEach {
             pumlCode += buildRow(it)
         }
         return pumlCode + "}\n@endsalt"
     }
 
-    private fun buildRow(row: RowLt): String {
+    val blue = "<color:Blue>"
+    val green = "<color:Green>"
+    private fun buildRow(row: Row): String {
         var s = ""
-        row.cols.forEach {
-            s += buildCol(it)
+        row.colList.forEachIndexed() { index, it ->
+            if (index % 2 == 0)
+                s += buildCol(it, blue)
+            else
+                s += buildCol(it, green)
         }
-        return s
+        s = s.dropLast(1)
+        return s + "\n"
     }
 
-    private fun buildCol(cols: ColsLt): String {
-        var s = ". "
-        val span: Int? = cols.col.span
-        if (span == null) {
-            s += "| . "
-        } else {
-            for (i in 1..span) {
-                s += "| * "
-            }
+    private fun buildCol(col: Col, colorCode: String): String {
+        var s = ""
+        val span: Int = col.span
+        repeat(span) {
+            s += "$colorCode C |"
         }
-        return s + "\n"
+        return s
     }
 
 }
diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/dialog/EventLogDetail.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/dialog/EventLogDetail.kt
index 267553a..a9d445b 100644
--- a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/dialog/EventLogDetail.kt
+++ b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/dialog/EventLogDetail.kt
@@ -19,8 +19,8 @@
 package org.apache.isis.client.kroviz.ui.dialog
 
 import org.apache.isis.client.kroviz.core.event.LogEntry
-import org.apache.isis.client.kroviz.layout.Layout
 import org.apache.isis.client.kroviz.to.ValueType
+import org.apache.isis.client.kroviz.to.bs3.Grid
 import org.apache.isis.client.kroviz.ui.core.Constants
 import org.apache.isis.client.kroviz.ui.core.FormItem
 import org.apache.isis.client.kroviz.ui.core.RoDialog
@@ -62,12 +62,15 @@ class EventLogDetail(val logEntry: LogEntry) : Command() {
         val str = logEntry.response
         val pumlCode = when {
             str.startsWith("<") -> {
-                LayoutDiagram.build(logEntry.obj as Layout)
+                val grid = logEntry.obj as Grid
+                LayoutDiagram.build(grid)
             }
             str.startsWith("{") ->
                 JsonDiagram.build(str)
             else -> "{}"
         }
+        console.log("[ELD.execute]")
+        console.log(pumlCode)
         DiagramDialog("Response Diagram", pumlCode).open()
     }
 
diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/kv/override/RoTabPanel.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/kv/override/RoTabPanel.kt
index 7a44259..9ca5846 100644
--- a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/kv/override/RoTabPanel.kt
+++ b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/kv/override/RoTabPanel.kt
@@ -21,7 +21,6 @@ package org.apache.isis.client.kroviz.ui.kv.override
 /**
  * Copied from TabPanel in order to:
  * * add IconMenu to (Ro)Tab
- * * recreate svg from LogEntry on focus
  */
 
 import com.github.snabbdom.VNode
@@ -31,8 +30,8 @@ import io.kvision.panel.VPanel
 import io.kvision.routing.RoutingManager
 import io.kvision.state.ObservableState
 import io.kvision.state.bind
+import io.kvision.utils.auto
 import io.kvision.utils.obj
-import io.kvision.utils.perc
 import io.kvision.utils.set
 import org.apache.isis.client.kroviz.ui.core.RoView
 
@@ -117,7 +116,7 @@ open class RoTabPanel(
         }
 
     init {
-        width = 100.perc
+        width = auto
         marginTop = CssSize(40, UNIT.px)
         when (tabPosition) {
             TabPosition.TOP -> {
@@ -146,7 +145,6 @@ open class RoTabPanel(
         return render("div", childrenVNodes())
     }
 
-
     private fun calculateSideClasses(): Pair<String, String> {
         return when (sideTabSize) {
             SideTabSize.SIZE_1 -> Pair("col-sm-1", "col-sm-11")

[isis] 04/04: ISIS-2505 ListDM/Aggregator renamed to Collection*, ObjectAggregator can have multiple CollectionAggregators (for parented collections), demo.JavaLangStringJdo entities not shown yet

Posted by jo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

joergrade pushed a commit to branch ISIS-2505_Catch_Up_With_Demo_Examples
in repository https://gitbox.apache.org/repos/asf/isis.git

commit afdc35358e878eb5605d5a41eba88b06a8e8dd90
Author: Jörg Rade <jo...@kuehne-nagel.com>
AuthorDate: Fri May 21 16:09:53 2021 +0200

    ISIS-2505 ListDM/Aggregator renamed to Collection*, ObjectAggregator can have multiple CollectionAggregators (for parented collections), demo.JavaLangStringJdo entities not shown yet
---
 .../kroviz/partials/design/seq-aggregator.adoc     |   6 +-
 .../kroviz/partials/design/uml-aggregator.adoc     |   8 +-
 .../kroviz/partials/design/uml-overview.adoc       |   6 +-
 .../{ListAggregator.kt => CollectionAggregator.kt} |  41 ++-
 .../kroviz/core/aggregator/ObjectAggregator.kt     |  41 ++-
 .../core/model/{ListDM.kt => CollectionDM.kt}      |  15 +-
 .../isis/client/kroviz/core/model/ObjectDM.kt      |   4 -
 .../isis/client/kroviz/handler/BaseHandler.kt      |   2 +-
 .../client/kroviz/handler/ResultListHandler.kt     |   6 +-
 .../isis/client/kroviz/to/PlainTransferObjects.kt  |   2 +-
 .../client/kroviz/ui/builder/FieldSetBuilder.kt    |  12 +-
 .../isis/client/kroviz/ui/core/ColumnFactory.kt    |   8 +-
 .../apache/isis/client/kroviz/ui/core/RoDisplay.kt |  11 +-
 .../apache/isis/client/kroviz/ui/core/RoTable.kt   |  10 +-
 .../apache/isis/client/kroviz/ui/core/UiManager.kt |   4 +-
 ...gregatorTest.kt => CollectionAggregatorTest.kt} |  14 +-
 .../client/kroviz/core/event/EventStoreTest.kt     |   4 +-
 .../{DisplayListTest.kt => CollectionDMTest.kt}    |   8 +-
 .../isis/client/kroviz/core/model/ExposerTest.kt   |  14 +
 .../snapshots/demo2_0_0/JAVA_LANG_STRING_JDO.kt    | 393 +++++++++++++++++++++
 20 files changed, 525 insertions(+), 84 deletions(-)

diff --git a/incubator/clients/kroviz/adoc/modules/kroviz/partials/design/seq-aggregator.adoc b/incubator/clients/kroviz/adoc/modules/kroviz/partials/design/seq-aggregator.adoc
index b067414..022f57f 100644
--- a/incubator/clients/kroviz/adoc/modules/kroviz/partials/design/seq-aggregator.adoc
+++ b/incubator/clients/kroviz/adoc/modules/kroviz/partials/design/seq-aggregator.adoc
@@ -1,6 +1,6 @@
 :Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
 
-.ListAggregator Sequence Diagram
+.CollectionAggregator Sequence Diagram
 [plantuml,file="seq-aggregator.png"]
 ----
 @startuml
@@ -11,8 +11,8 @@ participant "<<description>>\nLink" as LNK #LightBlue
 participant "(Xml)HttpRequest" as XHR
 participant "<<ChainOfResponsibility>>\nResponseHandler" as RH
 participant "<<description>>\n<<EventStore>>\nLogEntry" as LE #LightBlue
-participant "<<moment-interval>>\nListAggregator" as AGGT  #Pink
-participant "<<thing>>\n<<DisplayModel>>\nListDM" as DM #LightGreen
+participant "<<moment-interval>>\nCollectionAggregator" as AGGT  #Pink
+participant "<<thing>>\n<<DisplayModel>>\nCollectionDM" as DM #LightGreen
 participant "<<description>>\nTransferObject" as TO #LightBlue
 
 User -> UI : listAll()
diff --git a/incubator/clients/kroviz/adoc/modules/kroviz/partials/design/uml-aggregator.adoc b/incubator/clients/kroviz/adoc/modules/kroviz/partials/design/uml-aggregator.adoc
index 08c3f2d..bc4091f 100644
--- a/incubator/clients/kroviz/adoc/modules/kroviz/partials/design/uml-aggregator.adoc
+++ b/incubator/clients/kroviz/adoc/modules/kroviz/partials/design/uml-aggregator.adoc
@@ -40,7 +40,7 @@ abstract class BaseAggregator {
 }
 
 IAggregator <|.. BaseAggregator
-BaseAggregator <|-- ListAggregator
+BaseAggregator <|-- CollectionAggregator
 BaseAggregator <|-- ObjectAggregator
 BaseAggregator --> BaseDisplayable : data
 
@@ -51,15 +51,15 @@ abstract class BaseDisplayable {
     +title()
 }
 
-class ListDM {
+class CollectionDM {
     list:List<Exposer>
 }
 
 BaseDisplayable -> Layout
-BaseDisplayable <|-- ListDM
+BaseDisplayable <|-- CollectionDM
 BaseDisplayable <|-- ObjectDM
 
-ObjectDM o-- ListDM
+ObjectDM o-- CollectionDM
 
 @enduml
 ----
diff --git a/incubator/clients/kroviz/adoc/modules/kroviz/partials/design/uml-overview.adoc b/incubator/clients/kroviz/adoc/modules/kroviz/partials/design/uml-overview.adoc
index 01b523f..2d41f70 100644
--- a/incubator/clients/kroviz/adoc/modules/kroviz/partials/design/uml-overview.adoc
+++ b/incubator/clients/kroviz/adoc/modules/kroviz/partials/design/uml-overview.adoc
@@ -82,11 +82,11 @@ to.Service o-- to.Member
 interface Aggregator {
     update(logEntry)
 }
-class ListAggregator {
+class CollectionAggregator {
     -list:ObjectList
 }
-ListAggregator *-- ObjectList
-Aggregator <|.. ListAggregator
+CollectionAggregator *-- ObjectList
+Aggregator <|.. CollectionAggregator
 
 class NavigationAggregator
 Aggregator <|.. NavigationAggregator
diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/aggregator/ListAggregator.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/aggregator/CollectionAggregator.kt
similarity index 70%
rename from incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/aggregator/ListAggregator.kt
rename to incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/aggregator/CollectionAggregator.kt
index e7c9363..e1ac64f 100644
--- a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/aggregator/ListAggregator.kt
+++ b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/aggregator/CollectionAggregator.kt
@@ -20,7 +20,8 @@ package org.apache.isis.client.kroviz.core.aggregator
 
 import org.apache.isis.client.kroviz.core.event.EventState
 import org.apache.isis.client.kroviz.core.event.LogEntry
-import org.apache.isis.client.kroviz.core.model.ListDM
+import org.apache.isis.client.kroviz.core.event.RoXmlHttpRequest
+import org.apache.isis.client.kroviz.core.model.CollectionDM
 import org.apache.isis.client.kroviz.layout.Layout
 import org.apache.isis.client.kroviz.to.*
 import org.apache.isis.client.kroviz.to.bs3.Grid
@@ -33,29 +34,35 @@ import org.apache.isis.client.kroviz.ui.core.UiManager
  * (3) FR_OBJECT_PROPERTY       PropertyHandler -> invoke()
  * (4) FR_PROPERTY_DESCRIPTION  <PropertyDescriptionHandler>
  */
-class ListAggregator(actionTitle: String) : AggregatorWithLayout() {
+class CollectionAggregator(actionTitle: String, val parent: ObjectAggregator? = null) : AggregatorWithLayout() {
 
     init {
-        dpm = ListDM(actionTitle)
+        dpm = CollectionDM(actionTitle)
     }
 
     override fun update(logEntry: LogEntry, subType: String) {
 
         if (logEntry.state == EventState.DUPLICATE) {
-            console.log("[ListAggregator.update] TODO duplicates should not be propagated to handlers")
+            console.log("[CollectionAggregator.update] TODO duplicates should not be propagated to handlers")
         } else {
             when (val obj = logEntry.getTransferObject()) {
                 null -> log(logEntry)
                 is ResultList -> handleList(obj)
                 is TObject -> handleObject(obj)
-                is Layout -> handleLayout(obj, dpm as ListDM)
+                is Layout -> handleLayout(obj, dpm as CollectionDM)
                 is Grid -> handleGrid(obj)
                 is Property -> handleProperty(obj)
+                is Collection -> handleCollection(obj)
                 else -> log(logEntry)
             }
 
-            if (dpm.canBeDisplayed()) {
-                UiManager.openListView(this)
+            if (parent == null) {
+                if (dpm.canBeDisplayed()) {
+                    UiManager.openListView(this)
+                }
+            } else {
+                console.log("[CA.opdate] can be displayed / parent = OA")
+                parent.update(logEntry, subType)
             }
         }
     }
@@ -70,17 +77,20 @@ class ListAggregator(actionTitle: String) : AggregatorWithLayout() {
     }
 
     private fun handleObject(obj: TObject) {
+        console.log("[CA.handleObject]")
+        console.log(obj)
         dpm.addData(obj)
         invokeLayoutLink(obj)
+//TODO        invokeIconLink(obj)
     }
 
 
     private fun handleGrid(grid: Grid) {
-        (dpm as ListDM).grid = grid
+        (dpm as CollectionDM).grid = grid
     }
 
     private fun handleProperty(p: Property) {
-        val dm = dpm as ListDM
+        val dm = dpm as CollectionDM
         if (p.isPropertyDescription()) {
             dm.addPropertyDescription(p)
         } else {
@@ -89,7 +99,14 @@ class ListAggregator(actionTitle: String) : AggregatorWithLayout() {
         }
     }
 
-    override fun reset(): ListAggregator {
+    private fun handleCollection(collection: Collection) {
+        collection.value.forEach {
+            console.log(it)
+            RoXmlHttpRequest().invoke(it, this)
+        }
+    }
+
+    override fun reset(): CollectionAggregator {
         dpm.reset()
         return this
     }
@@ -101,8 +118,8 @@ class ListAggregator(actionTitle: String) : AggregatorWithLayout() {
     }
 
     private fun Property.isPropertyDescription(): Boolean {
-        val selfLink = this.links.find { l ->
-            l.relation() == Relation.SELF
+        val selfLink = this.links.find {
+            it.relation() == Relation.SELF
         }
         return selfLink!!.representation() == Represention.PROPERTY_DESCRIPTION
     }
diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/aggregator/ObjectAggregator.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/aggregator/ObjectAggregator.kt
index 0143747..19e02b4 100644
--- a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/aggregator/ObjectAggregator.kt
+++ b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/aggregator/ObjectAggregator.kt
@@ -19,12 +19,14 @@
 package org.apache.isis.client.kroviz.core.aggregator
 
 import org.apache.isis.client.kroviz.core.event.LogEntry
+import org.apache.isis.client.kroviz.core.event.RoXmlHttpRequest
+import org.apache.isis.client.kroviz.core.model.CollectionDM
 import org.apache.isis.client.kroviz.core.model.ObjectDM
 import org.apache.isis.client.kroviz.layout.Layout
 import org.apache.isis.client.kroviz.to.*
 import org.apache.isis.client.kroviz.to.bs3.Grid
-import org.apache.isis.client.kroviz.ui.dialog.ErrorDialog
 import org.apache.isis.client.kroviz.ui.core.UiManager
+import org.apache.isis.client.kroviz.ui.dialog.ErrorDialog
 
 /** sequence of operations:
  * (0) Menu Action              User clicks BasicTypes.String -> handled by ActionDispatcher
@@ -34,37 +36,47 @@ import org.apache.isis.client.kroviz.ui.core.UiManager
  * (4) ???_PROPERTY_DESCRIPTION  <PropertyDescriptionHandler>
  */
 class ObjectAggregator(val actionTitle: String) : AggregatorWithLayout() {
+    var collectionMap = mutableMapOf<String, CollectionAggregator>()
 
     init {
         dpm = ObjectDM(actionTitle)
     }
 
     override fun update(logEntry: LogEntry, subType: String) {
-        val obj = logEntry.getTransferObject()
-        when (obj) {
+        when (val obj = logEntry.getTransferObject()) {
             is TObject -> handleObject(obj)
             is ResultObject -> handleResultObject(obj)
             is Property -> handleProperty(obj)
-            is Collection -> handleCollection(obj)
             is Layout -> handleLayout(obj, dpm as ObjectDM)
             is Grid -> handleGrid(obj)
             is HttpError -> ErrorDialog(logEntry).open()
             else -> log(logEntry)
         }
 
-        if (dpm.canBeDisplayed()) {
+        if (dpm.canBeDisplayed() && collectionsCanBeDisplayed()) {
             UiManager.openObjectView(this)
         }
     }
 
+    private fun collectionsCanBeDisplayed(): Boolean {
+        if (collectionMap.isEmpty()) return true
+        return collectionMap.all {
+            val cdm = it.value.dpm as CollectionDM
+            cdm.parentedCollectionCanBeDisplayed()
+        }
+    }
+
     fun handleObject(obj: TObject) {
         // After ~/action/invoke is called, the actual object instance (containing properties) needs to be invoked as well.
-        // Note that rel.self/href is identical in both cases and both are of type TObject. logEntry.url is different, though.
+        // Note that rel.self/href is identical and both are of type TObject. logEntry.url is different, though.
         if (obj.getProperties().size == 0) {
             invokeInstance(obj)
         } else {
             dpm.addData(obj)
         }
+        if (collectionMap.size == 0) {
+            handleCollections(obj)
+        }
         invokeLayoutLink(obj)
     }
 
@@ -79,15 +91,22 @@ class ObjectAggregator(val actionTitle: String) : AggregatorWithLayout() {
         (dpm as ObjectDM).addResult(resultObject)
     }
 
-    fun handleCollection(obj: Collection) {
-        console.log(obj)
-        throw Throwable("[ObjectAggregator.handleCollection] not implemented yet")
-    }
-
     override fun getObject(): TObject? {
         return dpm.getObject()
     }
 
+    private fun handleCollections(obj: TObject) {
+        console.log("[OA.handleCollections]")
+        obj.getCollections().forEach {
+            val key = it.id
+            val aggregator = CollectionAggregator(key, this)
+            collectionMap.put(key, aggregator)
+            console.log(key)
+            val link = it.links.first()
+            RoXmlHttpRequest().invoke(link, aggregator)
+        }
+    }
+
     private fun handleProperty(property: Property) {
         console.log(property)
         throw Throwable("[ObjectAggregator.handleProperty] not implemented yet")
diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/model/ListDM.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/model/CollectionDM.kt
similarity index 73%
rename from incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/model/ListDM.kt
rename to incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/model/CollectionDM.kt
index f7e4eee..7cddbed 100644
--- a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/model/ListDM.kt
+++ b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/model/CollectionDM.kt
@@ -18,11 +18,11 @@
  */
 package org.apache.isis.client.kroviz.core.model
 
+import io.kvision.state.observableListOf
 import org.apache.isis.client.kroviz.to.TObject
 import org.apache.isis.client.kroviz.to.TransferObject
-import io.kvision.state.observableListOf
 
-class ListDM(override val title: String) : DisplayModelWithLayout() {
+class CollectionDM(override val title: String) : DisplayModelWithLayout() {
     var data = observableListOf<Exposer>()
     private var rawData = observableListOf<TransferObject>()
 
@@ -30,7 +30,7 @@ class ListDM(override val title: String) : DisplayModelWithLayout() {
         if (!rawData.contains(obj)) {
             rawData.add(obj)
             val exo = Exposer(obj as TObject)
-            data.add(exo)  //if exposer is not dynamised, data access in tables won't work   .dynamise()
+            data.add(exo.dynamise())  //if exposer is not dynamised, data access in tables won't work
         }
     }
 
@@ -40,4 +40,13 @@ class ListDM(override val title: String) : DisplayModelWithLayout() {
         rawData = observableListOf()
     }
 
+    // canBeDisplayed checks for grid AND layout - for parented collection there seems to be no layout
+    fun parentedCollectionCanBeDisplayed(): Boolean {
+        console.log("[CDM.parentedCollectionCanBeDisplayed]")
+        console.log(this)
+        val answer = grid != null
+        console.log(answer)
+        return answer
+    }
+
 }
diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/model/ObjectDM.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/model/ObjectDM.kt
index b4a97a6..5774cef 100644
--- a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/model/ObjectDM.kt
+++ b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/model/ObjectDM.kt
@@ -47,10 +47,6 @@ class ObjectDM(override val title: String) : DisplayModelWithLayout() {
             val p = createPropertyFrom(m)
             addProperty(p)
         }
-        obj.getCollections().forEach { m ->
-            console.log("[ODM.addData] collection member")
-            console.log(m)
-        }
     }
 
     fun addResult(resultObject: ResultObject) {
diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/handler/BaseHandler.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/handler/BaseHandler.kt
index 38c1a40..dbad1dc 100644
--- a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/handler/BaseHandler.kt
+++ b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/handler/BaseHandler.kt
@@ -30,7 +30,7 @@ import org.apache.isis.client.kroviz.ui.core.Constants
  *
  * Implementing classes are responsible for:
  * @item creating Objects by parsing responses (JSON/XML),
- * @item creating/finding Aggregators (eg. ListAggregator, ObjectAggregator), and
+ * @item creating/finding Aggregators (eg. CollectionAggregator, ObjectAggregator), and
  * @item setting Objects and Aggregators into LogEntry.
  */
 abstract class BaseHandler {
diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/handler/ResultListHandler.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/handler/ResultListHandler.kt
index 592ebf7..6da7d52 100644
--- a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/handler/ResultListHandler.kt
+++ b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/handler/ResultListHandler.kt
@@ -19,18 +19,18 @@
 package org.apache.isis.client.kroviz.handler
 
 import kotlinx.serialization.json.Json
-import org.apache.isis.client.kroviz.core.aggregator.ListAggregator
+import org.apache.isis.client.kroviz.core.aggregator.CollectionAggregator
 import org.apache.isis.client.kroviz.to.ResultList
 import org.apache.isis.client.kroviz.to.TransferObject
 
 class ResultListHandler : BaseHandler() {
 
     override fun doHandle() {
-        logEntry.addAggregator(ListAggregator(logEntry.title))
+        logEntry.addAggregator(CollectionAggregator(logEntry.title))
         update()
     }
 
-    
+
     override fun parse(response: String): TransferObject {
         return Json.decodeFromString(ResultList.serializer(), response)
     }
diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/to/PlainTransferObjects.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/to/PlainTransferObjects.kt
index a0b62c8..353cb8c 100644
--- a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/to/PlainTransferObjects.kt
+++ b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/to/PlainTransferObjects.kt
@@ -32,7 +32,7 @@ enum class ActionSemantics(val type: String) {
 data class DomainType(
         override val links: List<Link>,
         val canonicalName: String,
-        val members: List<Link>,
+        val members: List<Link>,   // change to Map<String, Member>, once https://issues.apache.org/jira/browse/ISIS-2684 is fixed
         val typeActions: List<Link>,
         val extensions: Extensions
 ) : TransferObject, HasLinks
diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/builder/FieldSetBuilder.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/builder/FieldSetBuilder.kt
index f3e1601..110f8ff 100644
--- a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/builder/FieldSetBuilder.kt
+++ b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/builder/FieldSetBuilder.kt
@@ -18,13 +18,13 @@
  */
 package org.apache.isis.client.kroviz.ui.builder
 
+import io.kvision.form.FormPanel
 import org.apache.isis.client.kroviz.to.TObject
 import org.apache.isis.client.kroviz.to.TypeMapper
 import org.apache.isis.client.kroviz.to.bs3.FieldSet
 import org.apache.isis.client.kroviz.ui.core.FormItem
 import org.apache.isis.client.kroviz.ui.core.FormPanelFactory
 import org.apache.isis.client.kroviz.ui.core.RoDisplay
-import io.kvision.form.FormPanel
 
 class FieldSetBuilder {
 
@@ -34,21 +34,17 @@ class FieldSetBuilder {
             tab: RoDisplay
     ): FormPanel<String>? {
 
-        console.log("[FSB.init]")
         val members = tObject.getProperties()
         val items = mutableListOf<FormItem>()
-        console.log("Layout-Properties: " + fieldSetLayout.propertyList.size)
 
         for (p in fieldSetLayout.propertyList) {
             val label = p.id
-
             val member = members.firstOrNull() { it.id == label }
-
             if (member != null) {
                 val memberType = TypeMapper().forType(member.type!!)
-
+                console.log("[FSB.init]")
+                console.log(memberType)
                 val size = maxOf(1, p.multiLine)
-
                 val fi = FormItem(
                         label = label,
                         type = memberType,
@@ -57,8 +53,6 @@ class FieldSetBuilder {
                         description = p.describedAs,
                         member = member,
                         dspl = tab)
-                console.log(fi)
-
                 items.add(fi)
             }
         }
diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/core/ColumnFactory.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/core/ColumnFactory.kt
index 3cce9e9..8207d58 100644
--- a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/core/ColumnFactory.kt
+++ b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/core/ColumnFactory.kt
@@ -20,7 +20,7 @@ package org.apache.isis.client.kroviz.ui.core
 
 import org.apache.isis.client.kroviz.core.event.EventStore
 import org.apache.isis.client.kroviz.core.model.Exposer
-import org.apache.isis.client.kroviz.core.model.ListDM
+import org.apache.isis.client.kroviz.core.model.CollectionDM
 import io.kvision.html.Button
 import io.kvision.html.ButtonStyle
 import io.kvision.tabulator.Align
@@ -50,7 +50,7 @@ class ColumnFactory {
     }
 
     fun buildColumns(
-            displayList: ListDM,
+            displayCollection: CollectionDM,
             withCheckBox: Boolean = false): List<ColumnDefinition<dynamic>> {
 
         val columns = mutableListOf<ColumnDefinition<dynamic>>()
@@ -62,13 +62,13 @@ class ColumnFactory {
         val menu = buildMenu()
         columns.add(menu)
 
-        val model = displayList.data as List<dynamic>
+        val model = displayCollection.data as List<dynamic>
         if (model[0].hasOwnProperty("iconName") as Boolean) {
             val icon = buildLinkIcon()
             columns.add(icon)
         }
 
-        val propertyLabels = displayList.propertyDescriptionList
+        val propertyLabels = displayCollection.propertyDescriptionList
         for (pl in propertyLabels) {
             val id = pl.key
             val friendlyName = pl.value
diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/core/RoDisplay.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/core/RoDisplay.kt
index 0774216..6b4f5b2 100644
--- a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/core/RoDisplay.kt
+++ b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/core/RoDisplay.kt
@@ -18,15 +18,15 @@
  */
 package org.apache.isis.client.kroviz.ui.core
 
-import org.apache.isis.client.kroviz.core.model.ObjectDM
-import org.apache.isis.client.kroviz.to.TObject
-import org.apache.isis.client.kroviz.ui.builder.LayoutBuilder
 import io.kvision.core.CssSize
 import io.kvision.core.FontStyle
 import io.kvision.core.FontWeight
 import io.kvision.core.UNIT
 import io.kvision.dropdown.DropDown
 import io.kvision.panel.VPanel
+import org.apache.isis.client.kroviz.core.model.ObjectDM
+import org.apache.isis.client.kroviz.to.TObject
+import org.apache.isis.client.kroviz.ui.builder.LayoutBuilder
 
 class RoDisplay(val displayModel: ObjectDM) : Displayable, VPanel() {
 
@@ -34,12 +34,11 @@ class RoDisplay(val displayModel: ObjectDM) : Displayable, VPanel() {
     private var objectPanel: VPanel
 
     init {
+        console.log("[RD.init] tObject / grid")
+        console.log(displayModel)
         val model = displayModel.data!!
         val tObject: TObject = model.delegate
         val grid = displayModel.grid!!
-        console.log("[RD.init] tObject / grid")
-        console.log(tObject)
-        console.log(grid)
         objectPanel = LayoutBuilder().create(grid, tObject, this)
         objectPanel.width = CssSize(100, UNIT.perc)
         add(objectPanel)
diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/core/RoTable.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/core/RoTable.kt
index c28c64d..9b0b750 100644
--- a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/core/RoTable.kt
+++ b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/core/RoTable.kt
@@ -19,7 +19,7 @@
 package org.apache.isis.client.kroviz.ui.core
 
 import org.apache.isis.client.kroviz.core.model.Exposer
-import org.apache.isis.client.kroviz.core.model.ListDM
+import org.apache.isis.client.kroviz.core.model.CollectionDM
 import org.apache.isis.client.kroviz.utils.Utils
 import io.kvision.core.Container
 import io.kvision.core.CssSize
@@ -37,14 +37,14 @@ import io.kvision.utils.set
  * - attribute types (can only be determined at runtime) and
  * - accessor names
  */
-class RoTable(displayList: ListDM) : SimplePanel() {
+class RoTable(displayCollection: CollectionDM) : SimplePanel() {
 
     init {
-        title = Utils.extractTitle(displayList.title)
+        title = Utils.extractTitle(displayCollection.title)
         width = CssSize(100, UNIT.perc)
-        val model = displayList.data
+        val model = displayCollection.data
         val columns = ColumnFactory().buildColumns(
-                displayList,
+                displayCollection,
                 true)
         val options = TabulatorOptions(
                 movableColumns = true,
diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/core/UiManager.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/core/UiManager.kt
index 4585a77..b8bef6c 100644
--- a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/core/UiManager.kt
+++ b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/core/UiManager.kt
@@ -30,7 +30,7 @@ import org.apache.isis.client.kroviz.core.aggregator.UndefinedDispatcher
 import org.apache.isis.client.kroviz.core.event.EventStore
 import org.apache.isis.client.kroviz.core.event.LogEntry
 import org.apache.isis.client.kroviz.core.event.ResourceSpecification
-import org.apache.isis.client.kroviz.core.model.ListDM
+import org.apache.isis.client.kroviz.core.model.CollectionDM
 import org.apache.isis.client.kroviz.core.model.ObjectDM
 import org.apache.isis.client.kroviz.to.Relation
 import org.apache.isis.client.kroviz.to.TObject
@@ -136,7 +136,7 @@ object UiManager {
     fun openListView(aggregator: BaseAggregator) {
         val displayable = aggregator.dpm
         val title: String = Utils.extractTitle(displayable.title)
-        val panel = RoTable(displayable as ListDM)
+        val panel = RoTable(displayable as CollectionDM)
         add(title, panel, aggregator)
         displayable.isRendered = true
     }
diff --git a/incubator/clients/kroviz/src/test/kotlin/org/apache/isis/client/kroviz/core/aggregator/ListAggregatorTest.kt b/incubator/clients/kroviz/src/test/kotlin/org/apache/isis/client/kroviz/core/aggregator/CollectionAggregatorTest.kt
similarity index 89%
rename from incubator/clients/kroviz/src/test/kotlin/org/apache/isis/client/kroviz/core/aggregator/ListAggregatorTest.kt
rename to incubator/clients/kroviz/src/test/kotlin/org/apache/isis/client/kroviz/core/aggregator/CollectionAggregatorTest.kt
index e4a317d..b451c2a 100644
--- a/incubator/clients/kroviz/src/test/kotlin/org/apache/isis/client/kroviz/core/aggregator/ListAggregatorTest.kt
+++ b/incubator/clients/kroviz/src/test/kotlin/org/apache/isis/client/kroviz/core/aggregator/CollectionAggregatorTest.kt
@@ -21,7 +21,7 @@ package org.apache.isis.client.kroviz.core.aggregator
 import org.apache.isis.client.kroviz.IntegrationTest
 import org.apache.isis.client.kroviz.core.event.EventStore
 import org.apache.isis.client.kroviz.core.event.ResourceSpecification
-import org.apache.isis.client.kroviz.core.model.ListDM
+import org.apache.isis.client.kroviz.core.model.CollectionDM
 import org.apache.isis.client.kroviz.snapshots.simpleapp1_16_0.*
 import org.apache.isis.client.kroviz.to.Property
 import org.apache.isis.client.kroviz.to.Relation
@@ -29,7 +29,7 @@ import kotlin.test.assertEquals
 import kotlin.test.assertNotNull
 import kotlin.test.assertTrue
 
-class ListAggregatorTest : IntegrationTest() {
+class CollectionAggregatorTest : IntegrationTest() {
 
     //@Test
     // sometimes fails with:
@@ -38,7 +38,7 @@ class ListAggregatorTest : IntegrationTest() {
         if (isAppAvailable()) {
             // given
             EventStore.reset()
-            val obs = ListAggregator("test")
+            val obs = CollectionAggregator("test")
             // when
             mockResponse(FR_OBJECT, obs)
             mockResponse(FR_OBJECT_LAYOUT, obs)
@@ -49,7 +49,7 @@ class ListAggregatorTest : IntegrationTest() {
             val layoutLe = mockResponse(FR_OBJECT_LAYOUT, obs)
 
             // then
-            val actObs = pLe.getAggregator() as ListAggregator
+            val actObs = pLe.getAggregator() as CollectionAggregator
             assertEquals(obs, actObs)  // 1
             assertEquals(pdLe.getAggregator(), layoutLe.getAggregator()) // 2 - trivial?
             // seems they are equal but not identical - changes on obs are not reflected in actObs !!!
@@ -65,7 +65,7 @@ class ListAggregatorTest : IntegrationTest() {
             assertNotNull(descLink)  // 4
 
             // then
-            val dl = obs.dpm as ListDM
+            val dl = obs.dpm as CollectionDM
             val propertyLabels = dl.propertyDescriptionList
             val property = pdLe.getTransferObject() as Property
             assertTrue(propertyLabels.size > 0)  // 5
@@ -81,14 +81,14 @@ class ListAggregatorTest : IntegrationTest() {
         if (isAppAvailable()) {
             // given
             EventStore.reset()
-            val obs = ListAggregator("test")
+            val obs = CollectionAggregator("test")
             // when
             mockResponse(SO_LIST_ALL, obs)
             mockResponse(SO_0, obs)
             // then
             val ol = obs.dpm
             assertNotNull(ol)
-            assertEquals(1, (ol as ListDM).data.size)
+            assertEquals(1, (ol as CollectionDM).data.size)
         }
     }
 
diff --git a/incubator/clients/kroviz/src/test/kotlin/org/apache/isis/client/kroviz/core/event/EventStoreTest.kt b/incubator/clients/kroviz/src/test/kotlin/org/apache/isis/client/kroviz/core/event/EventStoreTest.kt
index ce5c914..92a01be 100644
--- a/incubator/clients/kroviz/src/test/kotlin/org/apache/isis/client/kroviz/core/event/EventStoreTest.kt
+++ b/incubator/clients/kroviz/src/test/kotlin/org/apache/isis/client/kroviz/core/event/EventStoreTest.kt
@@ -19,7 +19,7 @@
 package org.apache.isis.client.kroviz.core.event
 
 import org.apache.isis.client.kroviz.IntegrationTest
-import org.apache.isis.client.kroviz.core.aggregator.ListAggregator
+import org.apache.isis.client.kroviz.core.aggregator.CollectionAggregator
 import org.apache.isis.client.kroviz.core.aggregator.ObjectAggregator
 import org.apache.isis.client.kroviz.snapshots.simpleapp1_16_0.*
 import org.apache.isis.client.kroviz.to.Method
@@ -37,7 +37,7 @@ class EventStoreTest : IntegrationTest() {
         if (isAppAvailable()) {
             // given
             EventStore.reset()
-            val obs = ListAggregator("test")
+            val obs = CollectionAggregator("test")
 
             //when
             val soList = ResourceSpecification(SO_LIST_ALL.url)
diff --git a/incubator/clients/kroviz/src/test/kotlin/org/apache/isis/client/kroviz/core/model/DisplayListTest.kt b/incubator/clients/kroviz/src/test/kotlin/org/apache/isis/client/kroviz/core/model/CollectionDMTest.kt
similarity index 95%
rename from incubator/clients/kroviz/src/test/kotlin/org/apache/isis/client/kroviz/core/model/DisplayListTest.kt
rename to incubator/clients/kroviz/src/test/kotlin/org/apache/isis/client/kroviz/core/model/CollectionDMTest.kt
index 9e7bc06..7dc6ac4 100644
--- a/incubator/clients/kroviz/src/test/kotlin/org/apache/isis/client/kroviz/core/model/DisplayListTest.kt
+++ b/incubator/clients/kroviz/src/test/kotlin/org/apache/isis/client/kroviz/core/model/CollectionDMTest.kt
@@ -28,7 +28,7 @@ import kotlin.test.Test
 import kotlin.test.assertEquals
 import kotlin.test.assertNotNull
 
-class DisplayListTest {
+class CollectionDMTest {
 
     @Test
     fun testSimpleObject() {
@@ -36,7 +36,7 @@ class DisplayListTest {
         val ro1 = TObjectHandler().parse(SO_1.str) as TObject
         val lt = LayoutHandler().parse(SO_OBJECT_LAYOUT.str) as Layout
 
-        val dl = ListDM("test")
+        val dl = CollectionDM("test")
         dl.addData(ro0)
         dl.addData(ro1)
         dl.addLayout(lt)
@@ -55,7 +55,7 @@ class DisplayListTest {
         val lt = LayoutHandler().parse(CFG_LAYOUT_JSON.str) as Layout
         // val grd = LayoutXmlHandler().parse(CFG_LAYOUT_XML.str) as Grid
 
-        val dl = ListDM("test")
+        val dl = CollectionDM("test")
         dl.addData(ro0)
 
         dl.addLayout(lt)
@@ -71,7 +71,7 @@ class DisplayListTest {
         val ro0 = TObjectHandler().parse(FR_OBJECT.str) as TObject
         val lt = LayoutXmlHandler().parse(FR_OBJECT_LAYOUT.str) as Layout
 
-        val dl = ListDM("test")
+        val dl = CollectionDM("test")
         dl.addData(ro0)
 
         dl.addLayout(lt)
diff --git a/incubator/clients/kroviz/src/test/kotlin/org/apache/isis/client/kroviz/core/model/ExposerTest.kt b/incubator/clients/kroviz/src/test/kotlin/org/apache/isis/client/kroviz/core/model/ExposerTest.kt
index e121cfa..0be23c6 100644
--- a/incubator/clients/kroviz/src/test/kotlin/org/apache/isis/client/kroviz/core/model/ExposerTest.kt
+++ b/incubator/clients/kroviz/src/test/kotlin/org/apache/isis/client/kroviz/core/model/ExposerTest.kt
@@ -19,6 +19,7 @@
 package org.apache.isis.client.kroviz.core.model
 
 import org.apache.isis.client.kroviz.handler.TObjectHandler
+import org.apache.isis.client.kroviz.snapshots.demo2_0_0.JAVA_LANG_STRING_JDO
 import org.apache.isis.client.kroviz.snapshots.simpleapp1_16_0.CFG_1
 import org.apache.isis.client.kroviz.snapshots.simpleapp1_16_0.SO_0
 import org.apache.isis.client.kroviz.to.TObject
@@ -30,6 +31,19 @@ import kotlin.test.assertFalse
 class ExposerTest {
 
     @Test
+    fun testParseJavaLangStringJdo() {
+        //given
+        val jsonStr = JAVA_LANG_STRING_JDO.str
+        //when
+        val to = TObjectHandler().parse(jsonStr) as TObject
+        //then
+        assertEquals("StringJDO entity: Hello", to.title)
+        assertEquals("demo.JavaLangStringJdo", to.domainType)
+        assertEquals("1", to.instanceId)
+    }
+
+
+    @Test
     fun testConfiguration() {
         val jsonStr = CFG_1.str
         val to = TObjectHandler().parse(jsonStr) as TObject
diff --git a/incubator/clients/kroviz/src/test/kotlin/org/apache/isis/client/kroviz/snapshots/demo2_0_0/JAVA_LANG_STRING_JDO.kt b/incubator/clients/kroviz/src/test/kotlin/org/apache/isis/client/kroviz/snapshots/demo2_0_0/JAVA_LANG_STRING_JDO.kt
new file mode 100644
index 0000000..37af2ea
--- /dev/null
+++ b/incubator/clients/kroviz/src/test/kotlin/org/apache/isis/client/kroviz/snapshots/demo2_0_0/JAVA_LANG_STRING_JDO.kt
@@ -0,0 +1,393 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package org.apache.isis.client.kroviz.snapshots.demo2_0_0
+
+import org.apache.isis.client.kroviz.snapshots.Response
+
+object JAVA_LANG_STRING_JDO : Response() {
+    override val url = "http://localhost:8080/restful/objects/demo.JavaLangStringJdo/1"
+    override val str = """
+        {
+  "links" : [ {
+    "rel" : "self",
+    "href" : "http://localhost:8080/restful/objects/demo.JavaLangStringJdo/1",
+    "method" : "GET",
+    "type" : "application/json;profile=\"urn:org.restfulobjects:repr-types/object\"",
+    "title" : "StringJDO entity: Hello"
+  }, {
+    "rel" : "describedby",
+    "href" : "http://localhost:8080/restful/domain-types/demo.JavaLangStringJdo",
+    "method" : "GET",
+    "type" : "application/json;profile=\"urn:org.restfulobjects:repr-types/domain-type\""
+  }, {
+    "rel" : "urn:org.apache.isis.restfulobjects:rels/object-layout",
+    "href" : "http://localhost:8080/restful/objects/demo.JavaLangStringJdo/1/object-layout",
+    "method" : "GET",
+    "type" : "application/json;profile=\"urn:org.restfulobjects:repr-types/object-layout-bs3\""
+  }, {
+    "rel" : "urn:org.apache.isis.restfulobjects:rels/object-icon",
+    "href" : "http://localhost:8080/restful/objects/demo.JavaLangStringJdo/1/image",
+    "method" : "GET",
+    "type" : "image/png"
+  }, {
+    "rel" : "urn:org.restfulobjects:rels/update",
+    "href" : "http://localhost:8080/restful/objects/demo.JavaLangStringJdo:1",
+    "method" : "PUT",
+    "type" : "application/json;profile=\"urn:org.restfulobjects:repr-types/object\"",
+    "arguments" : { }
+  } ],
+  "extensions" : {
+    "oid" : "demo.JavaLangStringJdo:1",
+    "isService" : false,
+    "isPersistent" : true
+  },
+  "title" : "StringJDO entity: Hello",
+  "domainType" : "demo.JavaLangStringJdo",
+  "instanceId" : "1",
+  "members" : {
+    "mixinProperty" : {
+      "id" : "mixinProperty",
+      "memberType" : "property",
+      "links" : [ {
+        "rel" : "urn:org.restfulobjects:rels/details;property=\"mixinProperty\"",
+        "href" : "http://localhost:8080/restful/objects/demo.JavaLangStringJdo/1/properties/mixinProperty",
+        "method" : "GET",
+        "type" : "application/json;profile=\"urn:org.restfulobjects:repr-types/object-property\""
+      } ],
+      "value" : "Hello",
+      "extensions" : {
+        "x-isis-format" : "string"
+      },
+      "disabledReason" : "Contributed property"
+    },
+    "description" : {
+      "id" : "description",
+      "memberType" : "property",
+      "links" : [ {
+        "rel" : "urn:org.restfulobjects:rels/details;property=\"description\"",
+        "href" : "http://localhost:8080/restful/objects/demo.JavaLangStringJdo/1/properties/description",
+        "method" : "GET",
+        "type" : "application/json;profile=\"urn:org.restfulobjects:repr-types/object-property\""
+      } ],
+      "value" : "<div class=\"paragraph\">\n<p>JDO supports <code>String</code> <a href=\"http://www.datanucleus.org:15080/products/accessplatform_5_2/jdo/mapping.html#_primitive_and_java_lang_types\">out-of-the-box</a>, so no special annotations are required.</p>\n</div>\n<div class=\"listingblock\">\n<div class=\"content\">\n<pre class=\"highlight\"><code class=\"language-java\" data-lang=\"java\">@PersistenceCapable(identityType = IdentityType.DATASTORE, schema = \"demo\")\n@Datastore [...]
+      "format" : "string",
+      "extensions" : {
+        "x-isis-format" : "string"
+      },
+      "disabledReason" : "Contributed property"
+    },
+    "readWriteProperty" : {
+      "id" : "readWriteProperty",
+      "memberType" : "property",
+      "links" : [ {
+        "rel" : "urn:org.restfulobjects:rels/details;property=\"readWriteProperty\"",
+        "href" : "http://localhost:8080/restful/objects/demo.JavaLangStringJdo/1/properties/readWriteProperty",
+        "method" : "GET",
+        "type" : "application/json;profile=\"urn:org.restfulobjects:repr-types/object-property\""
+      } ],
+      "value" : "Hello",
+      "extensions" : {
+        "x-isis-format" : "string"
+      }
+    },
+    "readOnlyPropertyDerivedLabelPositionLeft" : {
+      "id" : "readOnlyPropertyDerivedLabelPositionLeft",
+      "memberType" : "property",
+      "links" : [ {
+        "rel" : "urn:org.restfulobjects:rels/details;property=\"readOnlyPropertyDerivedLabelPositionLeft\"",
+        "href" : "http://localhost:8080/restful/objects/demo.JavaLangStringJdo/1/properties/readOnlyPropertyDerivedLabelPositionLeft",
+        "method" : "GET",
+        "type" : "application/json;profile=\"urn:org.restfulobjects:repr-types/object-property\""
+      } ],
+      "value" : "Hello",
+      "extensions" : {
+        "x-isis-format" : "string"
+      },
+      "disabledReason" : "Always disabled"
+    },
+    "readOnlyPropertyDerivedLabelPositionTop" : {
+      "id" : "readOnlyPropertyDerivedLabelPositionTop",
+      "memberType" : "property",
+      "links" : [ {
+        "rel" : "urn:org.restfulobjects:rels/details;property=\"readOnlyPropertyDerivedLabelPositionTop\"",
+        "href" : "http://localhost:8080/restful/objects/demo.JavaLangStringJdo/1/properties/readOnlyPropertyDerivedLabelPositionTop",
+        "method" : "GET",
+        "type" : "application/json;profile=\"urn:org.restfulobjects:repr-types/object-property\""
+      } ],
+      "value" : "Hello",
+      "extensions" : {
+        "x-isis-format" : "string"
+      },
+      "disabledReason" : "Always disabled"
+    },
+    "readOnlyPropertyDerivedLabelPositionRight" : {
+      "id" : "readOnlyPropertyDerivedLabelPositionRight",
+      "memberType" : "property",
+      "links" : [ {
+        "rel" : "urn:org.restfulobjects:rels/details;property=\"readOnlyPropertyDerivedLabelPositionRight\"",
+        "href" : "http://localhost:8080/restful/objects/demo.JavaLangStringJdo/1/properties/readOnlyPropertyDerivedLabelPositionRight",
+        "method" : "GET",
+        "type" : "application/json;profile=\"urn:org.restfulobjects:repr-types/object-property\""
+      } ],
+      "value" : "Hello",
+      "extensions" : {
+        "x-isis-format" : "string"
+      },
+      "disabledReason" : "Always disabled"
+    },
+    "readOnlyPropertyDerivedLabelPositionNone" : {
+      "id" : "readOnlyPropertyDerivedLabelPositionNone",
+      "memberType" : "property",
+      "links" : [ {
+        "rel" : "urn:org.restfulobjects:rels/details;property=\"readOnlyPropertyDerivedLabelPositionNone\"",
+        "href" : "http://localhost:8080/restful/objects/demo.JavaLangStringJdo/1/properties/readOnlyPropertyDerivedLabelPositionNone",
+        "method" : "GET",
+        "type" : "application/json;profile=\"urn:org.restfulobjects:repr-types/object-property\""
+      } ],
+      "value" : "Hello",
+      "extensions" : {
+        "x-isis-format" : "string"
+      },
+      "disabledReason" : "Always disabled"
+    },
+    "objectType" : {
+      "id" : "objectType",
+      "memberType" : "property",
+      "links" : [ {
+        "rel" : "urn:org.restfulobjects:rels/details;property=\"objectType\"",
+        "href" : "http://localhost:8080/restful/objects/demo.JavaLangStringJdo/1/properties/objectType",
+        "method" : "GET",
+        "type" : "application/json;profile=\"urn:org.restfulobjects:repr-types/object-property\""
+      } ],
+      "value" : "demo.JavaLangStringJdo",
+      "extensions" : {
+        "x-isis-format" : "string"
+      },
+      "disabledReason" : "Contributed property"
+    },
+    "objectIdentifier" : {
+      "id" : "objectIdentifier",
+      "memberType" : "property",
+      "links" : [ {
+        "rel" : "urn:org.restfulobjects:rels/details;property=\"objectIdentifier\"",
+        "href" : "http://localhost:8080/restful/objects/demo.JavaLangStringJdo/1/properties/objectIdentifier",
+        "method" : "GET",
+        "type" : "application/json;profile=\"urn:org.restfulobjects:repr-types/object-property\""
+      } ],
+      "value" : "1",
+      "extensions" : {
+        "x-isis-format" : "string"
+      },
+      "disabledReason" : "Contributed property"
+    },
+    "readOnlyOptionalProperty" : {
+      "id" : "readOnlyOptionalProperty",
+      "memberType" : "property",
+      "links" : [ {
+        "rel" : "urn:org.restfulobjects:rels/details;property=\"readOnlyOptionalProperty\"",
+        "href" : "http://localhost:8080/restful/objects/demo.JavaLangStringJdo/1/properties/readOnlyOptionalProperty",
+        "method" : "GET",
+        "type" : "application/json;profile=\"urn:org.restfulobjects:repr-types/object-property\""
+      } ],
+      "value" : null,
+      "extensions" : {
+        "x-isis-format" : "string"
+      },
+      "disabledReason" : "Disabled"
+    },
+    "readWriteOptionalProperty" : {
+      "id" : "readWriteOptionalProperty",
+      "memberType" : "property",
+      "links" : [ {
+        "rel" : "urn:org.restfulobjects:rels/details;property=\"readWriteOptionalProperty\"",
+        "href" : "http://localhost:8080/restful/objects/demo.JavaLangStringJdo/1/properties/readWriteOptionalProperty",
+        "method" : "GET",
+        "type" : "application/json;profile=\"urn:org.restfulobjects:repr-types/object-property\""
+      } ],
+      "value" : null,
+      "extensions" : {
+        "x-isis-format" : "string"
+      }
+    },
+    "readOnlyProperty" : {
+      "id" : "readOnlyProperty",
+      "memberType" : "property",
+      "links" : [ {
+        "rel" : "urn:org.restfulobjects:rels/details;property=\"readOnlyProperty\"",
+        "href" : "http://localhost:8080/restful/objects/demo.JavaLangStringJdo/1/properties/readOnlyProperty",
+        "method" : "GET",
+        "type" : "application/json;profile=\"urn:org.restfulobjects:repr-types/object-property\""
+      } ],
+      "value" : "Hello",
+      "extensions" : {
+        "x-isis-format" : "string"
+      },
+      "disabledReason" : "Disabled"
+    },
+    "sources" : {
+      "id" : "sources",
+      "memberType" : "property",
+      "links" : [ {
+        "rel" : "urn:org.restfulobjects:rels/details;property=\"sources\"",
+        "href" : "http://localhost:8080/restful/objects/demo.JavaLangStringJdo/1/properties/sources",
+        "method" : "GET",
+        "type" : "application/json;profile=\"urn:org.restfulobjects:repr-types/object-property\""
+      } ],
+      "value" : "<div class=\"paragraph\">\n<p><a href=\"https://github.com/apache/isis/tree/master/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/strings/jdo\">Sources</a> for this demo</p>\n</div>",
+      "format" : "string",
+      "extensions" : {
+        "x-isis-format" : "string"
+      },
+      "disabledReason" : "Contributed property"
+    },
+    "updateReadOnlyOptionalProperty" : {
+      "id" : "updateReadOnlyOptionalProperty",
+      "memberType" : "action",
+      "links" : [ {
+        "rel" : "urn:org.restfulobjects:rels/details;action=\"updateReadOnlyOptionalProperty\"",
+        "href" : "http://localhost:8080/restful/objects/demo.JavaLangStringJdo/1/actions/updateReadOnlyOptionalProperty",
+        "method" : "GET",
+        "type" : "application/json;profile=\"urn:org.restfulobjects:repr-types/object-action\""
+      } ]
+    },
+    "updateReadOnlyProperty" : {
+      "id" : "updateReadOnlyProperty",
+      "memberType" : "action",
+      "links" : [ {
+        "rel" : "urn:org.restfulobjects:rels/details;action=\"updateReadOnlyProperty\"",
+        "href" : "http://localhost:8080/restful/objects/demo.JavaLangStringJdo/1/actions/updateReadOnlyProperty",
+        "method" : "GET",
+        "type" : "application/json;profile=\"urn:org.restfulobjects:repr-types/object-action\""
+      } ]
+    },
+    "updateReadOnlyPropertyWithChoices" : {
+      "id" : "updateReadOnlyPropertyWithChoices",
+      "memberType" : "action",
+      "links" : [ {
+        "rel" : "urn:org.restfulobjects:rels/details;action=\"updateReadOnlyPropertyWithChoices\"",
+        "href" : "http://localhost:8080/restful/objects/demo.JavaLangStringJdo/1/actions/updateReadOnlyPropertyWithChoices",
+        "method" : "GET",
+        "type" : "application/json;profile=\"urn:org.restfulobjects:repr-types/object-action\""
+      } ]
+    },
+    "actionReturning" : {
+      "id" : "actionReturning",
+      "memberType" : "action",
+      "links" : [ {
+        "rel" : "urn:org.restfulobjects:rels/details;action=\"actionReturning\"",
+        "href" : "http://localhost:8080/restful/objects/demo.JavaLangStringJdo/1/actions/actionReturning",
+        "method" : "GET",
+        "type" : "application/json;profile=\"urn:org.restfulobjects:repr-types/object-action\""
+      } ]
+    },
+    "actionReturningCollection" : {
+      "id" : "actionReturningCollection",
+      "memberType" : "action",
+      "links" : [ {
+        "rel" : "urn:org.restfulobjects:rels/details;action=\"actionReturningCollection\"",
+        "href" : "http://localhost:8080/restful/objects/demo.JavaLangStringJdo/1/actions/actionReturningCollection",
+        "method" : "GET",
+        "type" : "application/json;profile=\"urn:org.restfulobjects:repr-types/object-action\""
+      } ]
+    },
+    "clearHints" : {
+      "id" : "clearHints",
+      "memberType" : "action",
+      "links" : [ {
+        "rel" : "urn:org.restfulobjects:rels/details;action=\"clearHints\"",
+        "href" : "http://localhost:8080/restful/objects/demo.JavaLangStringJdo/1/actions/clearHints",
+        "method" : "GET",
+        "type" : "application/json;profile=\"urn:org.restfulobjects:repr-types/object-action\""
+      } ]
+    },
+    "recentCommands" : {
+      "id" : "recentCommands",
+      "memberType" : "action",
+      "links" : [ {
+        "rel" : "urn:org.restfulobjects:rels/details;action=\"recentCommands\"",
+        "href" : "http://localhost:8080/restful/objects/demo.JavaLangStringJdo/1/actions/recentCommands",
+        "method" : "GET",
+        "type" : "application/json;profile=\"urn:org.restfulobjects:repr-types/object-action\""
+      } ]
+    },
+    "downloadLayoutXml" : {
+      "id" : "downloadLayoutXml",
+      "memberType" : "action",
+      "links" : [ {
+        "rel" : "urn:org.restfulobjects:rels/details;action=\"downloadLayoutXml\"",
+        "href" : "http://localhost:8080/restful/objects/demo.JavaLangStringJdo/1/actions/downloadLayoutXml",
+        "method" : "GET",
+        "type" : "application/json;profile=\"urn:org.restfulobjects:repr-types/object-action\""
+      } ]
+    },
+    "downloadJdoMetadata" : {
+      "id" : "downloadJdoMetadata",
+      "memberType" : "action",
+      "links" : [ {
+        "rel" : "urn:org.restfulobjects:rels/details;action=\"downloadJdoMetadata\"",
+        "href" : "http://localhost:8080/restful/objects/demo.JavaLangStringJdo/1/actions/downloadJdoMetadata",
+        "method" : "GET",
+        "type" : "application/json;profile=\"urn:org.restfulobjects:repr-types/object-action\""
+      } ]
+    },
+    "inspectMetamodel" : {
+      "id" : "inspectMetamodel",
+      "memberType" : "action",
+      "links" : [ {
+        "rel" : "urn:org.restfulobjects:rels/details;action=\"inspectMetamodel\"",
+        "href" : "http://localhost:8080/restful/objects/demo.JavaLangStringJdo/1/actions/inspectMetamodel",
+        "method" : "GET",
+        "type" : "application/json;profile=\"urn:org.restfulobjects:repr-types/object-action\""
+      } ]
+    },
+    "downloadMetamodelXml" : {
+      "id" : "downloadMetamodelXml",
+      "memberType" : "action",
+      "links" : [ {
+        "rel" : "urn:org.restfulobjects:rels/details;action=\"downloadMetamodelXml\"",
+        "href" : "http://localhost:8080/restful/objects/demo.JavaLangStringJdo/1/actions/downloadMetamodelXml",
+        "method" : "GET",
+        "type" : "application/json;profile=\"urn:org.restfulobjects:repr-types/object-action\""
+      } ]
+    },
+    "openRestApi" : {
+      "id" : "openRestApi",
+      "memberType" : "action",
+      "links" : [ {
+        "rel" : "urn:org.restfulobjects:rels/details;action=\"openRestApi\"",
+        "href" : "http://localhost:8080/restful/objects/demo.JavaLangStringJdo/1/actions/openRestApi",
+        "method" : "GET",
+        "type" : "application/json;profile=\"urn:org.restfulobjects:repr-types/object-action\""
+      } ]
+    },
+    "rebuildMetamodel" : {
+      "id" : "rebuildMetamodel",
+      "memberType" : "action",
+      "links" : [ {
+        "rel" : "urn:org.restfulobjects:rels/details;action=\"rebuildMetamodel\"",
+        "href" : "http://localhost:8080/restful/objects/demo.JavaLangStringJdo/1/actions/rebuildMetamodel",
+        "method" : "GET",
+        "type" : "application/json;profile=\"urn:org.restfulobjects:repr-types/object-action\""
+      } ]
+    }
+  }
+}
+"""
+}
+

[isis] 01/04: straighten out Diagram classes

Posted by jo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

joergrade pushed a commit to branch ISIS-2505_Catch_Up_With_Demo_Examples
in repository https://gitbox.apache.org/repos/asf/isis.git

commit 836f9a4ade130075ed30c6f01d0cb5bbcd6b35a7
Author: Jörg Rade <jo...@kuehne-nagel.com>
AuthorDate: Tue May 11 09:47:19 2021 +0200

    straighten out Diagram classes
---
 incubator/clients/kroviz/build.gradle.kts          |  2 +-
 .../isis/client/kroviz/ui/core/RoStatusBar.kt      |  4 +-
 .../ui/diagram/{PumlBuilder.kt => ClassDiagram.kt} | 74 +++++++---------------
 .../isis/client/kroviz/ui/diagram/JsonDiagram.kt   |  9 +++
 .../isis/client/kroviz/ui/diagram/LayoutDiagram.kt | 35 ++++++++--
 .../client/kroviz/ui/diagram/SequenceDiagram.kt    | 66 +++++++++++++++++++
 .../isis/client/kroviz/ui/diagram/UmlDiagram.kt    | 59 -----------------
 .../isis/client/kroviz/ui/dialog/DiagramDialog.kt  |  2 +-
 .../isis/client/kroviz/ui/dialog/EventLogDetail.kt | 19 +++---
 .../client/kroviz/ui/panel/EventLogTableMgr.kt     |  5 +-
 .../client/kroviz/core/event/EventStoreTest.kt     |  4 +-
 .../isis/client/kroviz/ui/ClassDiagramTest.kt      | 59 +++++++++++++++++
 .../SequenceDiagramTest.kt}                        | 31 ++-------
 13 files changed, 208 insertions(+), 161 deletions(-)

diff --git a/incubator/clients/kroviz/build.gradle.kts b/incubator/clients/kroviz/build.gradle.kts
index a2c2e47..01502fd 100644
--- a/incubator/clients/kroviz/build.gradle.kts
+++ b/incubator/clients/kroviz/build.gradle.kts
@@ -46,7 +46,7 @@ kotlin {
         browser {
             runTask {
                 outputFileName = "main.bundle.js"
-                sourceMaps = false
+                sourceMaps = true
                 devServer = KotlinWebpackConfig.DevServer(
                         open = false,
                         port = 3000,
diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/core/RoStatusBar.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/core/RoStatusBar.kt
index 3f5397a..a8d0020 100644
--- a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/core/RoStatusBar.kt
+++ b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/core/RoStatusBar.kt
@@ -23,7 +23,7 @@ import org.apache.isis.client.kroviz.core.event.LogEntry
 import org.apache.isis.client.kroviz.core.model.DiagramDM
 import org.apache.isis.client.kroviz.ui.dialog.DiagramDialog
 import org.apache.isis.client.kroviz.ui.dialog.NotificationDialog
-import org.apache.isis.client.kroviz.ui.diagram.UmlDiagram
+import org.apache.isis.client.kroviz.ui.diagram.ClassDiagram
 import org.apache.isis.client.kroviz.utils.IconManager
 import io.kvision.core.*
 import io.kvision.html.Button
@@ -65,7 +65,7 @@ object RoStatusBar {
         classDiagram.style = ButtonStyle.OUTLINESUCCESS
         classDiagram.onClick {
             val title = dd.title
-            val code = UmlDiagram.buildClass(dd)
+            val code = ClassDiagram.build(dd)
             DiagramDialog(title, code).open()
         }
     }
diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/diagram/PumlBuilder.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/diagram/ClassDiagram.kt
similarity index 59%
rename from incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/diagram/PumlBuilder.kt
rename to incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/diagram/ClassDiagram.kt
index 7ccd8c5..94991a4 100644
--- a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/diagram/PumlBuilder.kt
+++ b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/diagram/ClassDiagram.kt
@@ -18,18 +18,32 @@
  */
 package org.apache.isis.client.kroviz.ui.diagram
 
-import org.apache.isis.client.kroviz.core.event.EventStore
-import org.apache.isis.client.kroviz.core.event.LogEntry
-import org.apache.isis.client.kroviz.core.event.ResourceSpecification
+import org.apache.isis.client.kroviz.core.model.DiagramDM
 import org.apache.isis.client.kroviz.core.model.meta.MetaClass
 import org.apache.isis.client.kroviz.core.model.meta.MetaPackage
 import org.apache.isis.client.kroviz.to.DomainType
-import org.apache.isis.client.kroviz.to.HasLinks
-import org.apache.isis.client.kroviz.to.Link
-import org.apache.isis.client.kroviz.to.Relation
-import org.apache.isis.client.kroviz.ui.core.UiManager
 
-class PumlBuilder {
+object ClassDiagram {
+
+    fun build(dd: DiagramDM): String {
+        val domainTypeList: Set<DomainType> = dd.classes
+        //TODO properties needed to set type
+        //val properties: Set<Property> = dd.properties
+        val packages = mutableSetOf<MetaPackage>()
+        domainTypeList.forEach { dt ->
+            val cls = MetaClass(dt)
+            val pkgName = cls.pkg.name
+            var pkg = packages.find { p -> p.name == pkgName }
+            if (pkg == null) {
+                pkg = cls.pkg
+                pkg.classes.add(cls)
+                packages.add(pkg)
+            } else {
+                pkg.classes.add(cls)
+            }
+        }
+        return with(packages)
+    }
 
     private val Q = "\""
     private val NL = "\\n"
@@ -84,49 +98,5 @@ class PumlBuilder {
         return pumlCode
     }
 
-    fun with(rootLE: LogEntry): String {
-        var code = "$Q@startuml$NL"
-        code += iterateOverChildren(rootLE)
-        code += "@enduml$Q"
-        return code
-    }
-
-    fun asJsonDiagram(json: String): String {
-        return "@startjson" + "\n" + json + "\n" + "@endjson"
-    }
-
-    private fun iterateOverChildren(logEntry: LogEntry): String {
-        var code = ""
-        val tObj = logEntry.obj
-        val parentUrl = logEntry.url
-        if (tObj is HasLinks) {
-            tObj.getLinks().forEach { l ->
-                val rel = l.relation()
-                if (rel != Relation.UP && rel != Relation.SELF) {
-                    code += amendWithChild(parentUrl, l)
-                }
-            }
-        }
-        return code
-    }
-
-    private fun amendWithChild(parentUrl: String, child: Link): String {
-        // kroki.io can not handle / (slash) in strings; escaping doesn't work either
-        val baseUrl = UiManager.getUrl()
-        var source = parentUrl.replace(baseUrl, "")
-        source = source.replace("/" , "_")
-        val childUrl = child.href
-        var target = childUrl.replace(baseUrl, "")
-        target = target.replace("/" , "_")
-        var code = "$source -> $target $NL"
-
-        val rs = ResourceSpecification(childUrl)
-        val childLE = EventStore.find(rs)
-        if (childLE != null) {
-            code += iterateOverChildren(childLE)
-        }
-        return code
-    }
 
 }
-
diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/diagram/JsonDiagram.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/diagram/JsonDiagram.kt
new file mode 100644
index 0000000..4f28a9d
--- /dev/null
+++ b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/diagram/JsonDiagram.kt
@@ -0,0 +1,9 @@
+package org.apache.isis.client.kroviz.ui.diagram
+
+object JsonDiagram {
+
+    fun build(json: String): String {
+        return "@startjson" + "\n" + json + "\n" + "@endjson"
+    }
+
+}
diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/diagram/LayoutDiagram.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/diagram/LayoutDiagram.kt
index a5d001b..201d281 100644
--- a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/diagram/LayoutDiagram.kt
+++ b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/diagram/LayoutDiagram.kt
@@ -18,6 +18,10 @@
  */
 package org.apache.isis.client.kroviz.ui.diagram
 
+import org.apache.isis.client.kroviz.layout.ColsLt
+import org.apache.isis.client.kroviz.layout.Layout
+import org.apache.isis.client.kroviz.layout.RowLt
+
 object LayoutDiagram {
 
     @Deprecated("pass in as arg")
@@ -29,14 +33,33 @@ object LayoutDiagram {
             "}\n" +
             "@endsalt"
 
-    fun build(json: String): String {
-        var pumlCode = sampleCode
-        return pumlCode
+    fun build(layout: Layout): String {
+        var pumlCode = "@startsalt\n{#\n"
+        layout.row.forEach {
+            pumlCode += buildRow(it)
+        }
+        return pumlCode + "}\n@endsalt"
+    }
+
+    private fun buildRow(row: RowLt): String {
+        var s = ""
+        row.cols.forEach {
+            s += buildCol(it)
+        }
+        return s
     }
 
-    private fun buildRow(): String {
-        val span = 1
-        return ""
+    private fun buildCol(cols: ColsLt): String {
+        var s = ". "
+        val span: Int? = cols.col.span
+        if (span == null) {
+            s += "| . "
+        } else {
+            for (i in 1..span) {
+                s += "| * "
+            }
+        }
+        return s + "\n"
     }
 
 }
diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/diagram/SequenceDiagram.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/diagram/SequenceDiagram.kt
new file mode 100644
index 0000000..839285e
--- /dev/null
+++ b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/diagram/SequenceDiagram.kt
@@ -0,0 +1,66 @@
+package org.apache.isis.client.kroviz.ui.diagram
+
+import org.apache.isis.client.kroviz.core.event.EventStore
+import org.apache.isis.client.kroviz.core.event.LogEntry
+import org.apache.isis.client.kroviz.core.event.ResourceSpecification
+import org.apache.isis.client.kroviz.to.HasLinks
+import org.apache.isis.client.kroviz.to.Link
+import org.apache.isis.client.kroviz.to.Relation
+import org.apache.isis.client.kroviz.ui.core.UiManager
+
+object SequenceDiagram {
+
+    fun build(logEntries: List<LogEntry>): String? {
+        val first: LogEntry? = logEntries.find { le ->
+            le.url.endsWith("/restful/")
+        }
+        if (first != null) {
+            return with(first)
+        }
+        return null
+    }
+
+    private val Q = "\""
+    private val NL = "\\n"
+
+    fun with(rootLE: LogEntry): String {
+        var code = "$Q@startuml$NL"
+        code += iterateOverChildren(rootLE)
+        code += "@enduml$Q"
+        return code
+    }
+
+    private fun iterateOverChildren(logEntry: LogEntry): String {
+        var code = ""
+        val tObj = logEntry.obj
+        val parentUrl = logEntry.url
+        if (tObj is HasLinks) {
+            tObj.getLinks().forEach { l ->
+                val rel = l.relation()
+                if (rel != Relation.UP && rel != Relation.SELF) {
+                    code += amendWithChild(parentUrl, l)
+                }
+            }
+        }
+        return code
+    }
+
+    private fun amendWithChild(parentUrl: String, child: Link): String {
+        // kroki.io can not handle / (slash) in strings; escaping doesn't work either
+        val baseUrl = UiManager.getUrl()
+        var source = parentUrl.replace(baseUrl, "")
+        source = source.replace("/", "_")
+        val childUrl = child.href
+        var target = childUrl.replace(baseUrl, "")
+        target = target.replace("/", "_")
+        var code = "$source -> $target $NL"
+
+        val rs = ResourceSpecification(childUrl)
+        val childLE = EventStore.find(rs)
+        if (childLE != null) {
+            code += iterateOverChildren(childLE)
+        }
+        return code
+    }
+
+}
diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/diagram/UmlDiagram.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/diagram/UmlDiagram.kt
deleted file mode 100644
index c87c7f9..0000000
--- a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/diagram/UmlDiagram.kt
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-package org.apache.isis.client.kroviz.ui.diagram
-
-import org.apache.isis.client.kroviz.core.event.LogEntry
-import org.apache.isis.client.kroviz.core.model.DiagramDM
-import org.apache.isis.client.kroviz.core.model.meta.MetaClass
-import org.apache.isis.client.kroviz.core.model.meta.MetaPackage
-import org.apache.isis.client.kroviz.to.DomainType
-
-object UmlDiagram {
-
-    fun buildClass(dd: DiagramDM): String {
-        val domainTypeList: Set<DomainType> = dd.classes
-        //TODO properties needed to set type
-        //val properties: Set<Property> = dd.properties
-        val packages = mutableSetOf<MetaPackage>()
-        domainTypeList.forEach { dt ->
-            val cls = MetaClass(dt)
-            val pkgName = cls.pkg.name
-            var pkg = packages.find { p -> p.name == pkgName }
-            if (pkg == null) {
-                pkg = cls.pkg
-                pkg.classes.add(cls)
-                packages.add(pkg)
-            } else {
-                pkg.classes.add(cls)
-            }
-        }
-        return PumlBuilder().with(packages)
-    }
-
-    fun buildSequence(logEntries: List<LogEntry>): String? {
-        val first: LogEntry? = logEntries.find { le ->
-            le.url.endsWith("/restful/")
-        }
-        if (first != null) {
-            return PumlBuilder().with(first)
-        }
-        return null
-    }
-
-}
diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/dialog/DiagramDialog.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/dialog/DiagramDialog.kt
index 810affd..919b34e 100644
--- a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/dialog/DiagramDialog.kt
+++ b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/dialog/DiagramDialog.kt
@@ -85,7 +85,7 @@ class DiagramDialog(
         val menu = mutableListOf<KvisionHtmlLink>()
         val action = MenuFactory.buildActionLink(
                 label = "Pin",
-                menuTitle = "pin")
+                menuTitle = "Pin")
         action.onClick {
             pin()
         }
diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/dialog/EventLogDetail.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/dialog/EventLogDetail.kt
index c4abe76..267553a 100644
--- a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/dialog/EventLogDetail.kt
+++ b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/dialog/EventLogDetail.kt
@@ -19,11 +19,13 @@
 package org.apache.isis.client.kroviz.ui.dialog
 
 import org.apache.isis.client.kroviz.core.event.LogEntry
+import org.apache.isis.client.kroviz.layout.Layout
 import org.apache.isis.client.kroviz.to.ValueType
-import org.apache.isis.client.kroviz.ui.core.FormItem
-import org.apache.isis.client.kroviz.ui.diagram.PumlBuilder
 import org.apache.isis.client.kroviz.ui.core.Constants
+import org.apache.isis.client.kroviz.ui.core.FormItem
 import org.apache.isis.client.kroviz.ui.core.RoDialog
+import org.apache.isis.client.kroviz.ui.diagram.JsonDiagram
+import org.apache.isis.client.kroviz.ui.diagram.LayoutDiagram
 import org.apache.isis.client.kroviz.utils.Utils
 import org.apache.isis.client.kroviz.utils.XmlHelper
 
@@ -56,22 +58,17 @@ class EventLogDetail(val logEntry: LogEntry) : Command() {
                 widthPerc = 60).open()
     }
 
-
     override fun execute() {
         val str = logEntry.response
-        val json = when {
+        val pumlCode = when {
             str.startsWith("<") -> {
-                XmlHelper.xml2json(str)
+                LayoutDiagram.build(logEntry.obj as Layout)
             }
-            str.startsWith("{") -> str
+            str.startsWith("{") ->
+                JsonDiagram.build(str)
             else -> "{}"
         }
-        val pumlCode = PumlBuilder().asJsonDiagram(json)
         DiagramDialog("Response Diagram", pumlCode).open()
     }
 
-    fun executeConsole() {
-        console.log(logEntry)
-    }
-
 }
diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/panel/EventLogTableMgr.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/panel/EventLogTableMgr.kt
index 2d5080ed..c393758 100644
--- a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/panel/EventLogTableMgr.kt
+++ b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/panel/EventLogTableMgr.kt
@@ -22,9 +22,10 @@ package org.apache.isis.client.kroviz.ui.panel
 import org.apache.isis.client.kroviz.core.event.EventStore
 import org.apache.isis.client.kroviz.ui.dialog.DiagramDialog
 import org.apache.isis.client.kroviz.ui.dialog.EventExportDialog
-import org.apache.isis.client.kroviz.ui.diagram.UmlDiagram
+import org.apache.isis.client.kroviz.ui.diagram.ClassDiagram
 import org.apache.isis.client.kroviz.ui.chart.ChartFactory
 import org.apache.isis.client.kroviz.ui.core.UiManager
+import org.apache.isis.client.kroviz.ui.diagram.SequenceDiagram
 import org.apache.isis.client.kroviz.utils.IconManager
 
 class EventLogTableMgr {
@@ -59,7 +60,7 @@ class EventLogTableMgr {
     }
 
     private fun eventDiagram() {
-        val code = UmlDiagram.buildSequence(EventStore.log)!!
+        val code = SequenceDiagram.build(EventStore.log)!!
         DiagramDialog("Event Diagram", code).open()
     }
 
diff --git a/incubator/clients/kroviz/src/test/kotlin/org/apache/isis/client/kroviz/core/event/EventStoreTest.kt b/incubator/clients/kroviz/src/test/kotlin/org/apache/isis/client/kroviz/core/event/EventStoreTest.kt
index 5544b15..ce5c914 100644
--- a/incubator/clients/kroviz/src/test/kotlin/org/apache/isis/client/kroviz/core/event/EventStoreTest.kt
+++ b/incubator/clients/kroviz/src/test/kotlin/org/apache/isis/client/kroviz/core/event/EventStoreTest.kt
@@ -116,9 +116,9 @@ class EventStoreTest : IntegrationTest() {
 
         // construct list with urls
         EventStore.add(h1Spec)
-        EventStore.addView(i1, agg, VPanel(), null)
+        EventStore.addView(i1, agg, VPanel())
         EventStore.add(h2Spec)
-        EventStore.addView(i2, agg, VPanel(), null)
+        EventStore.addView(i2, agg, VPanel())
 
         val le1 = EventStore.find(h1Spec)!!
         assertEquals(h1, le1.url)   //1
diff --git a/incubator/clients/kroviz/src/test/kotlin/org/apache/isis/client/kroviz/ui/ClassDiagramTest.kt b/incubator/clients/kroviz/src/test/kotlin/org/apache/isis/client/kroviz/ui/ClassDiagramTest.kt
new file mode 100644
index 0000000..b94c65a
--- /dev/null
+++ b/incubator/clients/kroviz/src/test/kotlin/org/apache/isis/client/kroviz/ui/ClassDiagramTest.kt
@@ -0,0 +1,59 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.client.kroviz.ui
+
+import org.apache.isis.client.kroviz.handler.DomainTypeHandler
+import org.apache.isis.client.kroviz.snapshots.simpleapp1_16_0.SO
+import org.apache.isis.client.kroviz.to.DomainType
+import org.apache.isis.client.kroviz.ui.core.UiManager
+import org.apache.isis.client.kroviz.ui.diagram.ClassDiagram
+import kotlin.test.BeforeTest
+import kotlin.test.Test
+import kotlin.test.assertTrue
+
+class ClassDiagramTest {
+
+    @BeforeTest
+    fun setup() {
+        val user = "sven"
+        val pw = "pass"
+        val url = "http://${user}:${pw}@localhost:8080/restful/"
+        UiManager.login(url, user, pw)
+    }
+
+    @Test
+    fun testSimpleObject() {
+        //given
+        val pkg = "domainapp.modules.simple.dom.impl"
+        val cls = "SimpleObject"
+
+        val jsonStr = SO.str
+        val domainType = DomainTypeHandler().parse(jsonStr) as DomainType
+
+        //when
+        val actual = ClassDiagram.with(domainType)
+        //then
+        assertTrue(actual.startsWith("\"@startuml"))
+        assertTrue(actual.endsWith("@enduml\""))
+        assertTrue(actual.contains("package $pkg {\\n"))
+        assertTrue(actual.contains("class $cls\\n"))
+    }
+
+}
diff --git a/incubator/clients/kroviz/src/test/kotlin/org/apache/isis/client/kroviz/ui/PumlBuilderTest.kt b/incubator/clients/kroviz/src/test/kotlin/org/apache/isis/client/kroviz/ui/table/SequenceDiagramTest.kt
similarity index 78%
rename from incubator/clients/kroviz/src/test/kotlin/org/apache/isis/client/kroviz/ui/PumlBuilderTest.kt
rename to incubator/clients/kroviz/src/test/kotlin/org/apache/isis/client/kroviz/ui/table/SequenceDiagramTest.kt
index 39bd3ad..0c351dc 100644
--- a/incubator/clients/kroviz/src/test/kotlin/org/apache/isis/client/kroviz/ui/PumlBuilderTest.kt
+++ b/incubator/clients/kroviz/src/test/kotlin/org/apache/isis/client/kroviz/ui/table/SequenceDiagramTest.kt
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.apache.isis.client.kroviz.ui
+package org.apache.isis.client.kroviz.ui.table
 
 import org.apache.isis.client.kroviz.core.event.EventStore
 import org.apache.isis.client.kroviz.core.event.LogEntry
@@ -25,13 +25,12 @@ import org.apache.isis.client.kroviz.core.event.ResourceSpecification
 import org.apache.isis.client.kroviz.handler.*
 import org.apache.isis.client.kroviz.snapshots.Response
 import org.apache.isis.client.kroviz.snapshots.simpleapp1_16_0.*
-import org.apache.isis.client.kroviz.to.DomainType
 import org.apache.isis.client.kroviz.to.Method
 import org.apache.isis.client.kroviz.ui.core.UiManager
-import org.apache.isis.client.kroviz.ui.diagram.PumlBuilder
+import org.apache.isis.client.kroviz.ui.diagram.SequenceDiagram
 import kotlin.test.*
 
-class PumlBuilderTest {
+class SequenceDiagramTest {
 
     @BeforeTest
     fun setup() {
@@ -41,24 +40,6 @@ class PumlBuilderTest {
         UiManager.login(url, user, pw)
     }
 
-    @Test
-    fun testSimpleObject() {
-        //given
-        val pkg = "domainapp.modules.simple.dom.impl"
-        val cls = "SimpleObject"
-
-        val jsonStr = SO.str
-        val domainType = DomainTypeHandler().parse(jsonStr) as DomainType
-
-        //when
-        val actual = PumlBuilder().with(domainType)
-        //then
-        assertTrue(actual.startsWith("\"@startuml"))
-        assertTrue(actual.endsWith("@enduml\""))
-        assertTrue(actual.contains("package $pkg {\\n"))
-        assertTrue(actual.contains("class $cls\\n"))
-    }
-
     //@Test   //TODO IntegrationTest ?
     fun testSequenceDiagram() {
         //given
@@ -66,7 +47,7 @@ class PumlBuilderTest {
         fillEventStoreWith(RESTFUL_SERVICES)
         fillEventStoreWith(RESTFUL_MENUBARS)
         //when
-        val actual = PumlBuilder().with(rootLe)
+        val actual = SequenceDiagram.with(rootLe)
         //then
         assertEquals(3, EventStore.log.size)
         console.log("[PBT.testSequenceDiagram]")
@@ -102,7 +83,7 @@ class PumlBuilderTest {
         assertNotNull(rootLogEntry)  //1
 
         // when
-        val code = PumlBuilder().with(rootLogEntry)
+        val code = SequenceDiagram.with(rootLogEntry)
         // then
         console.log("[PumlBuilderTest.testEventDiagram]")
         console.log(code)
@@ -111,7 +92,7 @@ class PumlBuilderTest {
     }
 
     private fun load(response: Response, handler: BaseHandler) {
-        val rs =  ResourceSpecification(response.url)
+        val rs = ResourceSpecification(response.url)
         EventStore.start(rs, Method.GET.operation)
         val le = EventStore.end(rs, response.str)!!
         val tObj = handler.parse(response.str)!!