From ac4e3fd1b95c68da75de5a03324de3490a3846b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Susanne=20G=C3=B6bel?= Date: Tue, 20 Jan 2026 11:46:40 +0100 Subject: [PATCH 01/11] toJson on emfular now available, hence we need more overrides --- src/app/shared/keml/core/author.ts | 2 +- src/app/shared/keml/core/conversation-partner.ts | 2 +- src/app/shared/keml/core/conversation.ts | 2 +- src/app/shared/keml/core/msg-info.ts | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/app/shared/keml/core/author.ts b/src/app/shared/keml/core/author.ts index 0b646caf..09540860 100644 --- a/src/app/shared/keml/core/author.ts +++ b/src/app/shared/keml/core/author.ts @@ -39,7 +39,7 @@ export class Author extends LifeLine{ this.$treeChildren.push(this._preknowledge, this._messages) } - toJson(): AuthorJson { + override toJson(): AuthorJson { return { name: this.name, xPosition: this.xPosition, diff --git a/src/app/shared/keml/core/conversation-partner.ts b/src/app/shared/keml/core/conversation-partner.ts index 8135482d..e62f1917 100644 --- a/src/app/shared/keml/core/conversation-partner.ts +++ b/src/app/shared/keml/core/conversation-partner.ts @@ -11,7 +11,7 @@ export class ConversationPartner extends LifeLine { super(name, xPosition, refC); } - toJson(): ConversationPartnerJson { + override toJson(): ConversationPartnerJson { return { name: this.name, xPosition: this.xPosition, diff --git a/src/app/shared/keml/core/conversation.ts b/src/app/shared/keml/core/conversation.ts index e3d74611..379567e5 100644 --- a/src/app/shared/keml/core/conversation.ts +++ b/src/app/shared/keml/core/conversation.ts @@ -40,7 +40,7 @@ export class Conversation extends Referencable { this.author = author; } - toJson(): ConversationJson { + override toJson(): ConversationJson { this.prepare(Conversation.ownPath); let cps = this.conversationPartners.map(x => x.toJson()) diff --git a/src/app/shared/keml/core/msg-info.ts b/src/app/shared/keml/core/msg-info.ts index 5119f8ef..8d012086 100644 --- a/src/app/shared/keml/core/msg-info.ts +++ b/src/app/shared/keml/core/msg-info.ts @@ -61,7 +61,7 @@ export abstract class Message extends Referencable { return Message.isSend(this.ref.eClass); } - toJson(): MessageJson { + override toJson(): MessageJson { return { content: this.content, counterPart: this.counterPart.getRef(), @@ -295,7 +295,7 @@ export abstract class Information extends Referencable implements Positionable { abstract duplicate(): Information; - toJson(): InformationJson { + override toJson(): InformationJson { return { causes: this.causes.map(c => c.toJson()), currentTrust: this.currentTrust, @@ -477,7 +477,7 @@ export class InformationLink extends Referencable { this.linkText = linkText; } - toJson(): InformationLinkJson { + override toJson(): InformationLinkJson { return { eClass: EClasses.InformationLink, source: this.source.getRef(), From df36f86c7649f3f6279144911a6da3eb6f7c1173 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Susanne=20G=C3=B6bel?= Date: Tue, 20 Jan 2026 11:59:16 +0100 Subject: [PATCH 02/11] Use lifleline serialization as basis for author and cp --- src/app/shared/keml/core/author.ts | 10 ++++------ src/app/shared/keml/core/conversation-partner.ts | 5 +---- src/app/shared/keml/core/life-line.ts | 9 +++++++++ src/app/shared/keml/json/sequence-diagram-models.ts | 2 +- 4 files changed, 15 insertions(+), 11 deletions(-) diff --git a/src/app/shared/keml/core/author.ts b/src/app/shared/keml/core/author.ts index 09540860..2dbc0dba 100644 --- a/src/app/shared/keml/core/author.ts +++ b/src/app/shared/keml/core/author.ts @@ -40,12 +40,10 @@ export class Author extends LifeLine{ } override toJson(): AuthorJson { - return { - name: this.name, - xPosition: this.xPosition, - messages: this.messages.map(m => m.toJson()), - preknowledge: this.preknowledge.map(p => p.toJson()), - } + let json: AuthorJson = (super.toJson()) + json.preknowledge = this.preknowledge.map(p=> p.toJson())//todo make work: this._preknowledge.toJson() + json.messages = this.messages.map(m => m.toJson()) //this._messages.toJson() + return json } static createTreeBackbone(ref: Ref, context: Deserializer): Author { diff --git a/src/app/shared/keml/core/conversation-partner.ts b/src/app/shared/keml/core/conversation-partner.ts index e62f1917..cf66a57e 100644 --- a/src/app/shared/keml/core/conversation-partner.ts +++ b/src/app/shared/keml/core/conversation-partner.ts @@ -12,10 +12,7 @@ export class ConversationPartner extends LifeLine { } override toJson(): ConversationPartnerJson { - return { - name: this.name, - xPosition: this.xPosition, - } + return super.toJson(); } static createTreeBackbone(ref: Ref, context: Deserializer): ConversationPartner { diff --git a/src/app/shared/keml/core/life-line.ts b/src/app/shared/keml/core/life-line.ts index a719e8bd..fdb23e1f 100644 --- a/src/app/shared/keml/core/life-line.ts +++ b/src/app/shared/keml/core/life-line.ts @@ -1,4 +1,6 @@ import {Ref, Referencable} from "emfular"; +import {LifeLineJson} from "@app/shared/keml/json/sequence-diagram-models"; + export abstract class LifeLine extends Referencable{ name: string; @@ -10,4 +12,11 @@ export abstract class LifeLine extends Referencable{ this.xPosition = xPosition; } + override toJson(): LifeLineJson { + return { + name: this.name, + xPosition: this.xPosition + }; + } + } diff --git a/src/app/shared/keml/json/sequence-diagram-models.ts b/src/app/shared/keml/json/sequence-diagram-models.ts index 7e5a619b..98f95725 100644 --- a/src/app/shared/keml/json/sequence-diagram-models.ts +++ b/src/app/shared/keml/json/sequence-diagram-models.ts @@ -8,7 +8,7 @@ export interface ConversationJson { conversationPartners: ConversationPartnerJson[]; } -interface LifeLineJson { +export interface LifeLineJson { name: string; xPosition: number; //int todo } From deae894e21a4465e50821359b58341979051f845 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Susanne=20G=C3=B6bel?= Date: Tue, 20 Jan 2026 12:37:43 +0100 Subject: [PATCH 03/11] Use new, simpler toJson flow via the containers --- src/app/shared/keml/core/author.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/shared/keml/core/author.ts b/src/app/shared/keml/core/author.ts index 2dbc0dba..bf6457e3 100644 --- a/src/app/shared/keml/core/author.ts +++ b/src/app/shared/keml/core/author.ts @@ -41,8 +41,8 @@ export class Author extends LifeLine{ override toJson(): AuthorJson { let json: AuthorJson = (super.toJson()) - json.preknowledge = this.preknowledge.map(p=> p.toJson())//todo make work: this._preknowledge.toJson() - json.messages = this.messages.map(m => m.toJson()) //this._messages.toJson() + json.preknowledge = this._preknowledge.toJson() + json.messages = this._messages.toJson() return json } From 139144ddafa779e0f8d6a6623451ea08ebd18cee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Susanne=20G=C3=B6bel?= Date: Thu, 22 Jan 2026 08:07:49 +0100 Subject: [PATCH 04/11] Unify toJson calls to just use the containers and their toJson methods since the type already specifies which method to use --- src/app/shared/keml/core/conversation.ts | 5 ++--- src/app/shared/keml/core/msg-info.ts | 8 ++++---- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/app/shared/keml/core/conversation.ts b/src/app/shared/keml/core/conversation.ts index 379567e5..f9a6d346 100644 --- a/src/app/shared/keml/core/conversation.ts +++ b/src/app/shared/keml/core/conversation.ts @@ -42,13 +42,12 @@ export class Conversation extends Referencable { override toJson(): ConversationJson { this.prepare(Conversation.ownPath); - let cps = this.conversationPartners.map(x => x.toJson()) return { eClass: this.ref.eClass, title: this.title, - conversationPartners: cps, - author: this.author.toJson(), + conversationPartners: this._conversationPartners.toJson(), + author: this._author.toJson(), }; } diff --git a/src/app/shared/keml/core/msg-info.ts b/src/app/shared/keml/core/msg-info.ts index 8d012086..a5e4222b 100644 --- a/src/app/shared/keml/core/msg-info.ts +++ b/src/app/shared/keml/core/msg-info.ts @@ -64,7 +64,7 @@ export abstract class Message extends Referencable { override toJson(): MessageJson { return { content: this.content, - counterPart: this.counterPart.getRef(), + counterPart: this._counterPart.toJson(), eClass: this.ref.eClass, originalContent: this.originalContent, timing: this.timing @@ -353,7 +353,7 @@ export class NewInformation extends Information { override toJson(): NewInformationJson { let res = (super.toJson()); - res.source = this.source.getRef() + res.source = this._source.toJson() return res; } @@ -480,8 +480,8 @@ export class InformationLink extends Referencable { override toJson(): InformationLinkJson { return { eClass: EClasses.InformationLink, - source: this.source.getRef(), - target: this.target.getRef(), + source: this._source.toJson(), + target: this._target.toJson(), type: this.type, linkText: this.linkText, } From a225316a63f7e594b7b41683f4d75f9cfe4cb62c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Susanne=20G=C3=B6bel?= Date: Thu, 22 Jan 2026 09:09:19 +0100 Subject: [PATCH 05/11] Remove ownPath from root, instead, the ref handler holds this general / that every root uses Also use right library version 4.1.0 that has it --- package.json | 2 +- src/app/shared/keml/core/conversation.ts | 7 +++---- src/app/shared/keml/json2core/json-fixer.ts | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 74260a80..2cc77509 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "@angular/router": "^19.2.4", "@angular/ssr": "^19.2.5", "@types/uuid": "^10.0.0", - "emfular": "^3.0.1", + "emfular": "^4.1.0", "express": "^4.18.2", "material-icons": "^1.13.12", "ngx-svg-graphics": "^1.2.1", diff --git a/src/app/shared/keml/core/conversation.ts b/src/app/shared/keml/core/conversation.ts index f9a6d346..cf52486b 100644 --- a/src/app/shared/keml/core/conversation.ts +++ b/src/app/shared/keml/core/conversation.ts @@ -6,7 +6,6 @@ import {EClasses} from "@app/shared/keml/eclasses"; export class Conversation extends Referencable { - static readonly ownPath: string = '/' static readonly authorPrefix = 'author'; static readonly conversationPartnersPrefix = 'conversationPartners'; title: string; @@ -31,7 +30,7 @@ export class Conversation extends Referencable { title: string = 'New Conversation', author: Author = new Author(), ) { - let ref = RefHandler.createRef(Conversation.ownPath, EClasses.Conversation) + let ref = RefHandler.createRef(RefHandler.rootPath, EClasses.Conversation) super(ref); this._author = new ReferencableTreeSingletonContainer(this, Conversation.authorPrefix); this._conversationPartners = new ReferencableTreeListContainer(this, Conversation.conversationPartnersPrefix); @@ -41,7 +40,7 @@ export class Conversation extends Referencable { } override toJson(): ConversationJson { - this.prepare(Conversation.ownPath); + this.prepare(RefHandler.rootPath); return { eClass: this.ref.eClass, @@ -54,7 +53,7 @@ export class Conversation extends Referencable { static fromJSON (convJson: ConversationJson): Conversation { let context = new Deserializer(convJson); let ref: Ref = { - $ref: Conversation.ownPath, + $ref: RefHandler.rootPath, eClass: EClasses.Conversation } let conv = this.createTreeBackbone(ref, context); diff --git a/src/app/shared/keml/json2core/json-fixer.ts b/src/app/shared/keml/json2core/json-fixer.ts index 255c214c..02b6b912 100644 --- a/src/app/shared/keml/json2core/json-fixer.ts +++ b/src/app/shared/keml/json2core/json-fixer.ts @@ -33,7 +33,7 @@ export class JsonFixer { for each informationLink check the causes list and add the link itself as source to each entry */ static prepareJsonInfoLinkSources(conv: ConversationJson) { - let authorPrefix = RefHandler.computePrefix( Conversation.ownPath, Conversation.authorPrefix) + let authorPrefix = RefHandler.computePrefix( RefHandler.rootPath, Conversation.authorPrefix) conv.author.preknowledge?.map((p, index) => { let ref = RefHandler.createRef( RefHandler.mixWithIndex( From 0928be6d21e90028d2ba83afe2162424ec59fcf9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Susanne=20G=C3=B6bel?= Date: Thu, 22 Jan 2026 11:01:11 +0100 Subject: [PATCH 06/11] Upgrade to 5.0 and corresponding shorter names --- package.json | 2 +- src/app/shared/keml/core/author.ts | 10 ++--- src/app/shared/keml/core/conversation.ts | 10 ++--- src/app/shared/keml/core/msg-info.ts | 50 ++++++++++++------------ 4 files changed, 36 insertions(+), 36 deletions(-) diff --git a/package.json b/package.json index 2cc77509..197fad4b 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "@angular/router": "^19.2.4", "@angular/ssr": "^19.2.5", "@types/uuid": "^10.0.0", - "emfular": "^4.1.0", + "emfular": "^5.0.0", "express": "^4.18.2", "material-icons": "^1.13.12", "ngx-svg-graphics": "^1.2.1", diff --git a/src/app/shared/keml/core/author.ts b/src/app/shared/keml/core/author.ts index bf6457e3..e11fe1e4 100644 --- a/src/app/shared/keml/core/author.ts +++ b/src/app/shared/keml/core/author.ts @@ -4,13 +4,13 @@ import {AuthorJson} from "@app/shared/keml/json/sequence-diagram-models" import {Preknowledge} from "./msg-info"; import {Deserializer, Ref} from "emfular"; import {EClasses} from "@app/shared/keml/eclasses"; -import {RefHandler, ReferencableTreeListContainer} from "emfular"; +import {RefHandler, ReTreeListContainer} from "emfular"; export class Author extends LifeLine{ static readonly preknowledgePrefix: string = 'preknowledge'; static readonly messagesPrefix: string = 'messages'; - _preknowledge: ReferencableTreeListContainer; + _preknowledge: ReTreeListContainer; get preknowledge(): Preknowledge[] { return this._preknowledge.get() } @@ -20,7 +20,7 @@ export class Author extends LifeLine{ }) } - _messages: ReferencableTreeListContainer; + _messages: ReTreeListContainer; get messages(): Message[] { return this._messages.get() } @@ -34,8 +34,8 @@ export class Author extends LifeLine{ ref?: Ref) { let refC = RefHandler.createRefIfMissing(EClasses.Author, ref) super(name, xPosition, refC); - this._preknowledge = new ReferencableTreeListContainer(this, Author.preknowledgePrefix) - this._messages = new ReferencableTreeListContainer(this, Author.messagesPrefix) + this._preknowledge = new ReTreeListContainer(this, Author.preknowledgePrefix) + this._messages = new ReTreeListContainer(this, Author.messagesPrefix) this.$treeChildren.push(this._preknowledge, this._messages) } diff --git a/src/app/shared/keml/core/conversation.ts b/src/app/shared/keml/core/conversation.ts index cf52486b..598b56cf 100644 --- a/src/app/shared/keml/core/conversation.ts +++ b/src/app/shared/keml/core/conversation.ts @@ -1,7 +1,7 @@ import {Author} from "./author"; import {ConversationPartner} from "./conversation-partner"; import {ConversationJson} from "@app/shared/keml/json/sequence-diagram-models"; -import {Deserializer, Ref, Referencable, RefHandler, ReferencableTreeSingletonContainer, ReferencableTreeListContainer} from "emfular"; +import {Deserializer, Ref, Referencable, RefHandler, ReTreeSingleContainer, ReTreeListContainer} from "emfular"; import {EClasses} from "@app/shared/keml/eclasses"; @@ -9,14 +9,14 @@ export class Conversation extends Referencable { static readonly authorPrefix = 'author'; static readonly conversationPartnersPrefix = 'conversationPartners'; title: string; - _author: ReferencableTreeSingletonContainer; + _author: ReTreeSingleContainer; get author(): Author { return this._author.get()!! } set author(author: Author) { this._author.add(author); } - _conversationPartners: ReferencableTreeListContainer; + _conversationPartners: ReTreeListContainer; get conversationPartners(): ConversationPartner[] { return this._conversationPartners.get() } @@ -32,8 +32,8 @@ export class Conversation extends Referencable { ) { let ref = RefHandler.createRef(RefHandler.rootPath, EClasses.Conversation) super(ref); - this._author = new ReferencableTreeSingletonContainer(this, Conversation.authorPrefix); - this._conversationPartners = new ReferencableTreeListContainer(this, Conversation.conversationPartnersPrefix); + this._author = new ReTreeSingleContainer(this, Conversation.authorPrefix); + this._conversationPartners = new ReTreeListContainer(this, Conversation.conversationPartnersPrefix); this.$treeChildren.push(this._author, this._conversationPartners); this.title = title; this.author = author; diff --git a/src/app/shared/keml/core/msg-info.ts b/src/app/shared/keml/core/msg-info.ts index a5e4222b..aa6e26bb 100644 --- a/src/app/shared/keml/core/msg-info.ts +++ b/src/app/shared/keml/core/msg-info.ts @@ -13,10 +13,10 @@ import { Ref, Referencable, RefHandler, - ReferencableListContainer, - ReferencableSingletonContainer, - ReferencableTreeListContainer, - ReferencableTreeParentContainer + ReLinkListContainer, + ReLinkSingleContainer, + ReTreeListContainer, + ReTreeParentContainer } from "emfular"; import {BoundingBox, Positionable, PositionHelper} from "ngx-svg-graphics"; @@ -25,7 +25,7 @@ import {BoundingBox, Positionable, PositionHelper} from "ngx-svg-graphics"; export abstract class Message extends Referencable { public static readonly counterPartPrefix = 'counterPart' - _counterPart: ReferencableSingletonContainer = new ReferencableSingletonContainer(this, Message.counterPartPrefix) + _counterPart: ReLinkSingleContainer = new ReLinkSingleContainer(this, Message.counterPartPrefix) get counterPart(): ConversationPartner { return this._counterPart.get()!! //todo } @@ -91,7 +91,7 @@ export abstract class Message extends Referencable { export class SendMessage extends Message { public static readonly usesPrefix = 'uses' - private readonly _uses: ReferencableListContainer; + private readonly _uses: ReLinkListContainer; get uses(): Information[] { return this._uses.get(); } @@ -112,7 +112,7 @@ export class SendMessage extends Message { ) { let refC = RefHandler.createRefIfMissing(EClasses.SendMessage, ref) super(refC, counterPart, timing, content, originalContent); - this._uses = new ReferencableListContainer(this, SendMessage.usesPrefix, Information.isUsedOnPrefix); + this._uses = new ReLinkListContainer(this, SendMessage.usesPrefix, Information.isUsedOnPrefix); this.$otherReferences.push(this._uses); uses.map(u => this.addUsage(u)) } @@ -139,7 +139,7 @@ export class ReceiveMessage extends Message { static readonly repeatsPrefix: string = 'repeats'; - _generates: ReferencableTreeListContainer; + _generates: ReTreeListContainer; get generates(): NewInformation[] { return this._generates.get()!! } @@ -148,7 +148,7 @@ export class ReceiveMessage extends Message { } - _repeats: ReferencableListContainer; + _repeats: ReLinkListContainer; get repeats(): Information[] { return this._repeats.get(); } @@ -172,8 +172,8 @@ export class ReceiveMessage extends Message { ) { let refC = RefHandler.createRefIfMissing(EClasses.ReceiveMessage, ref) super(refC, counterPart, timing, content ? content : "New receive content", originalContent); - this._generates = new ReferencableTreeListContainer(this, ReceiveMessage.generatesPrefix, NewInformation.sourcePrefix); - this._repeats = new ReferencableListContainer(this, ReceiveMessage.repeatsPrefix, Information.repeatedByPrefix); + this._generates = new ReTreeListContainer(this, ReceiveMessage.generatesPrefix, NewInformation.sourcePrefix); + this._repeats = new ReLinkListContainer(this, ReceiveMessage.repeatsPrefix, Information.repeatedByPrefix); this.$treeChildren.push(this._generates) this.$otherReferences.push(this._repeats) repeats.map(r => this.addRepetition(r)); @@ -222,7 +222,7 @@ export abstract class Information extends Referencable implements Positionable { static readonly isUsedOnPrefix: string = 'isUsedOn' static readonly repeatedByPrefix: string = 'repeatedBy' static readonly targetedByPrefix: string = 'targetedBy' - readonly _causes: ReferencableTreeListContainer; + readonly _causes: ReTreeListContainer; get causes(): InformationLink[] { return this._causes.get(); } @@ -233,7 +233,7 @@ export abstract class Information extends Referencable implements Positionable { this._causes.remove(link) } - readonly _targetedBy: ReferencableListContainer + readonly _targetedBy: ReLinkListContainer get targetedBy(): InformationLink[] { return this._targetedBy.get(); } @@ -244,7 +244,7 @@ export abstract class Information extends Referencable implements Positionable { this._targetedBy.remove(link) } - readonly _isUsedOn: ReferencableListContainer + readonly _isUsedOn: ReLinkListContainer get isUsedOn(): SendMessage[] { return this._isUsedOn.get(); } @@ -255,7 +255,7 @@ export abstract class Information extends Referencable implements Positionable { this._isUsedOn.remove(send) } - readonly _repeatedBy: ReferencableListContainer + readonly _repeatedBy: ReLinkListContainer get repeatedBy(): ReceiveMessage[] { return this._repeatedBy.get(); } @@ -275,10 +275,10 @@ export abstract class Information extends Referencable implements Positionable { ) { super(ref); - this._causes = new ReferencableTreeListContainer(this, NewInformation.causesPrefix, InformationLink.sourcePrefix); - this._targetedBy = new ReferencableListContainer(this, Information.targetedByPrefix, InformationLink.targetPrefix) - this._isUsedOn = new ReferencableListContainer(this, 'isUsedOn', 'uses'); - this._repeatedBy = new ReferencableListContainer(this, NewInformation.repeatedByPrefix, ReceiveMessage.repeatsPrefix); + this._causes = new ReTreeListContainer(this, NewInformation.causesPrefix, InformationLink.sourcePrefix); + this._targetedBy = new ReLinkListContainer(this, Information.targetedByPrefix, InformationLink.targetPrefix) + this._isUsedOn = new ReLinkListContainer(this, 'isUsedOn', 'uses'); + this._repeatedBy = new ReLinkListContainer(this, NewInformation.repeatedByPrefix, ReceiveMessage.repeatsPrefix); this.$treeChildren.push(this._causes) this.$otherReferences.push(this._targetedBy, this._isUsedOn, this._repeatedBy) @@ -322,7 +322,7 @@ export class NewInformation extends Information { public static readonly sourcePrefix = 'source' - readonly _source: ReferencableTreeParentContainer; + readonly _source: ReTreeParentContainer; set source(rec: ReceiveMessage) { this._source.add(rec) } @@ -342,7 +342,7 @@ export class NewInformation extends Information { ) { let refC = RefHandler.createRefIfMissing(EClasses.NewInformation, ref) super(refC, message, isInstruction, position, isUsedOn, repeatedBy, initialTrust, currentTrust, feltTrustImmediately, feltTrustAfterwards); - this._source = new ReferencableTreeParentContainer(this, NewInformation.sourcePrefix, ReceiveMessage.generatesPrefix); + this._source = new ReTreeParentContainer(this, NewInformation.sourcePrefix, ReceiveMessage.generatesPrefix); this.$otherReferences.push(this._source) //todo tree backwards this.source = source } @@ -430,7 +430,7 @@ export class InformationLink extends Referencable { public static readonly sourcePrefix = 'source' public static readonly targetPrefix = 'target' - readonly _source: ReferencableTreeParentContainer + readonly _source: ReTreeParentContainer get source(): Information { return this._source.get()!!; //todo } @@ -438,7 +438,7 @@ export class InformationLink extends Referencable { this._source.add(source) } - readonly _target: ReferencableSingletonContainer + readonly _target: ReLinkSingleContainer get target(): Information { return this._target.get()!!; } @@ -467,8 +467,8 @@ export class InformationLink extends Referencable { ) { let refC = RefHandler.createRefIfMissing(EClasses.InformationLink, ref) super(refC); - this._source = new ReferencableTreeParentContainer(this, InformationLink.sourcePrefix, NewInformation.causesPrefix); - this._target = new ReferencableSingletonContainer(this, InformationLink.targetPrefix, Information.targetedByPrefix); + this._source = new ReTreeParentContainer(this, InformationLink.sourcePrefix, NewInformation.causesPrefix); + this._target = new ReLinkSingleContainer(this, InformationLink.targetPrefix, Information.targetedByPrefix); this.$otherReferences.push(this._source, this._target) this.source = source; From 6847233e343ad0b21eebe95d8b3007c46caaabb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Susanne=20G=C3=B6bel?= Date: Thu, 22 Jan 2026 12:54:19 +0100 Subject: [PATCH 07/11] Enforce a defined value even in cases where the container toJson does not necessarily deliver one --- src/app/shared/keml/core/msg-info.ts | 6 +++--- src/app/shared/keml/json/knowledge-models.ts | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/app/shared/keml/core/msg-info.ts b/src/app/shared/keml/core/msg-info.ts index aa6e26bb..9ea93dbc 100644 --- a/src/app/shared/keml/core/msg-info.ts +++ b/src/app/shared/keml/core/msg-info.ts @@ -64,7 +64,7 @@ export abstract class Message extends Referencable { override toJson(): MessageJson { return { content: this.content, - counterPart: this._counterPart.toJson(), + counterPart: this._counterPart.toJson()!!, eClass: this.ref.eClass, originalContent: this.originalContent, timing: this.timing @@ -481,7 +481,7 @@ export class InformationLink extends Referencable { return { eClass: EClasses.InformationLink, source: this._source.toJson(), - target: this._target.toJson(), + target: this._target.toJson()!!, type: this.type, linkText: this.linkText, } @@ -489,7 +489,7 @@ export class InformationLink extends Referencable { static createTreeBackbone(ref: Ref, context: Deserializer): InformationLink { let infoLinkJson: InformationLinkJson = context.getJsonFromTree(ref.$ref) - let srcRef = RefHandler.createRef(RefHandler.getParentAddress(ref.$ref), infoLinkJson.source.eClass) + let srcRef = RefHandler.createRef(RefHandler.getParentAddress(ref.$ref), infoLinkJson.source!.eClass) let src: Information = context.get(srcRef.$ref) let dummyTarget = new Preknowledge() let infoLink: InformationLink = new InformationLink(src, dummyTarget, infoLinkJson.type, infoLinkJson.linkText, ref) diff --git a/src/app/shared/keml/json/knowledge-models.ts b/src/app/shared/keml/json/knowledge-models.ts index 29258f6b..f636dcdd 100644 --- a/src/app/shared/keml/json/knowledge-models.ts +++ b/src/app/shared/keml/json/knowledge-models.ts @@ -23,14 +23,14 @@ export interface PreknowledgeJson extends InformationJson { } export interface NewInformationJson extends InformationJson { - source: Ref;//ReceiveMessage; //backwards but main + source?: Ref;//ReceiveMessage; //tree parent } export interface InformationLinkJson { eClass: string; linkText?: string; type: InformationLinkType; - source: Ref; //backwards but main + source?: Ref; //tree parent target: Ref; } From e0a9de14f4130d85387d5aca3216be707b4135e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Susanne=20G=C3=B6bel?= Date: Fri, 23 Jan 2026 08:25:46 +0100 Subject: [PATCH 08/11] Update emfular to 5.1.0, remove now unnecessary addition of children to the treeChildren and otherReferences --- .github/actions/buildAndPackage/action.yml | 4 ++-- package.json | 2 +- src/app/shared/keml/core/author.ts | 1 - src/app/shared/keml/core/conversation.ts | 1 - src/app/shared/keml/core/msg-info.ts | 10 ---------- 5 files changed, 3 insertions(+), 15 deletions(-) diff --git a/.github/actions/buildAndPackage/action.yml b/.github/actions/buildAndPackage/action.yml index 46a5bc96..8db5534a 100644 --- a/.github/actions/buildAndPackage/action.yml +++ b/.github/actions/buildAndPackage/action.yml @@ -12,9 +12,9 @@ runs: - name: 'Install for CI' shell: bash run: npm ci - - name: 'Replace emfular by public 3.0.1' + - name: 'Replace emfular by public 5.1.0' shell: bash - run: npm install --no-package-lock --no-save emfular@3.0.1 + run: npm install --no-package-lock --no-save emfular@5.1.0 - name: 'Test with CI configuration' shell: bash run: npm run test:ci diff --git a/package.json b/package.json index 197fad4b..a77f8310 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "@angular/router": "^19.2.4", "@angular/ssr": "^19.2.5", "@types/uuid": "^10.0.0", - "emfular": "^5.0.0", + "emfular": "^5.1.0", "express": "^4.18.2", "material-icons": "^1.13.12", "ngx-svg-graphics": "^1.2.1", diff --git a/src/app/shared/keml/core/author.ts b/src/app/shared/keml/core/author.ts index e11fe1e4..e79ed65c 100644 --- a/src/app/shared/keml/core/author.ts +++ b/src/app/shared/keml/core/author.ts @@ -36,7 +36,6 @@ export class Author extends LifeLine{ super(name, xPosition, refC); this._preknowledge = new ReTreeListContainer(this, Author.preknowledgePrefix) this._messages = new ReTreeListContainer(this, Author.messagesPrefix) - this.$treeChildren.push(this._preknowledge, this._messages) } override toJson(): AuthorJson { diff --git a/src/app/shared/keml/core/conversation.ts b/src/app/shared/keml/core/conversation.ts index 598b56cf..fe620d30 100644 --- a/src/app/shared/keml/core/conversation.ts +++ b/src/app/shared/keml/core/conversation.ts @@ -34,7 +34,6 @@ export class Conversation extends Referencable { super(ref); this._author = new ReTreeSingleContainer(this, Conversation.authorPrefix); this._conversationPartners = new ReTreeListContainer(this, Conversation.conversationPartnersPrefix); - this.$treeChildren.push(this._author, this._conversationPartners); this.title = title; this.author = author; } diff --git a/src/app/shared/keml/core/msg-info.ts b/src/app/shared/keml/core/msg-info.ts index 9ea93dbc..ca8168b2 100644 --- a/src/app/shared/keml/core/msg-info.ts +++ b/src/app/shared/keml/core/msg-info.ts @@ -49,8 +49,6 @@ export abstract class Message extends Referencable { this.timing = timing; this.content = content; this.originalContent = originalContent; - - this.$otherReferences.push(this._counterPart) } static isSend(eClass: string) { @@ -113,7 +111,6 @@ export class SendMessage extends Message { let refC = RefHandler.createRefIfMissing(EClasses.SendMessage, ref) super(refC, counterPart, timing, content, originalContent); this._uses = new ReLinkListContainer(this, SendMessage.usesPrefix, Information.isUsedOnPrefix); - this.$otherReferences.push(this._uses); uses.map(u => this.addUsage(u)) } @@ -174,8 +171,6 @@ export class ReceiveMessage extends Message { super(refC, counterPart, timing, content ? content : "New receive content", originalContent); this._generates = new ReTreeListContainer(this, ReceiveMessage.generatesPrefix, NewInformation.sourcePrefix); this._repeats = new ReLinkListContainer(this, ReceiveMessage.repeatsPrefix, Information.repeatedByPrefix); - this.$treeChildren.push(this._generates) - this.$otherReferences.push(this._repeats) repeats.map(r => this.addRepetition(r)); this.isInterrupted = isInterrupted; } @@ -279,9 +274,6 @@ export abstract class Information extends Referencable implements Positionable { this._targetedBy = new ReLinkListContainer(this, Information.targetedByPrefix, InformationLink.targetPrefix) this._isUsedOn = new ReLinkListContainer(this, 'isUsedOn', 'uses'); this._repeatedBy = new ReLinkListContainer(this, NewInformation.repeatedByPrefix, ReceiveMessage.repeatsPrefix); - this.$treeChildren.push(this._causes) - this.$otherReferences.push(this._targetedBy, this._isUsedOn, this._repeatedBy) - this.message = message; this.isInstruction = isInstruction; this.position = position? position: PositionHelper.newBoundingBox(); @@ -343,7 +335,6 @@ export class NewInformation extends Information { let refC = RefHandler.createRefIfMissing(EClasses.NewInformation, ref) super(refC, message, isInstruction, position, isUsedOn, repeatedBy, initialTrust, currentTrust, feltTrustImmediately, feltTrustAfterwards); this._source = new ReTreeParentContainer(this, NewInformation.sourcePrefix, ReceiveMessage.generatesPrefix); - this.$otherReferences.push(this._source) //todo tree backwards this.source = source } @@ -469,7 +460,6 @@ export class InformationLink extends Referencable { super(refC); this._source = new ReTreeParentContainer(this, InformationLink.sourcePrefix, NewInformation.causesPrefix); this._target = new ReLinkSingleContainer(this, InformationLink.targetPrefix, Information.targetedByPrefix); - this.$otherReferences.push(this._source, this._target) this.source = source; this.target = target; From 1d1d73b0bf36fc52b16ad3acb2f430706f917461 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Susanne=20G=C3=B6bel?= Date: Fri, 23 Jan 2026 09:26:37 +0100 Subject: [PATCH 09/11] Rename the name relationships from EMF, also simplify some toJson calls acc. to emfular 4.0.0 --- src/app/shared/keml/core/author.ts | 12 ++-- src/app/shared/keml/core/conversation.ts | 12 ++-- src/app/shared/keml/core/msg-info.ts | 62 ++++++++++----------- src/app/shared/keml/json2core/json-fixer.ts | 8 +-- 4 files changed, 46 insertions(+), 48 deletions(-) diff --git a/src/app/shared/keml/core/author.ts b/src/app/shared/keml/core/author.ts index e79ed65c..1d927fcc 100644 --- a/src/app/shared/keml/core/author.ts +++ b/src/app/shared/keml/core/author.ts @@ -7,8 +7,8 @@ import {EClasses} from "@app/shared/keml/eclasses"; import {RefHandler, ReTreeListContainer} from "emfular"; export class Author extends LifeLine{ - static readonly preknowledgePrefix: string = 'preknowledge'; - static readonly messagesPrefix: string = 'messages'; + static readonly $preknowledgeName: string = 'preknowledge'; + static readonly $messagesName: string = 'messages'; _preknowledge: ReTreeListContainer; get preknowledge(): Preknowledge[] { @@ -34,8 +34,8 @@ export class Author extends LifeLine{ ref?: Ref) { let refC = RefHandler.createRefIfMissing(EClasses.Author, ref) super(name, xPosition, refC); - this._preknowledge = new ReTreeListContainer(this, Author.preknowledgePrefix) - this._messages = new ReTreeListContainer(this, Author.messagesPrefix) + this._preknowledge = new ReTreeListContainer(this, Author.$preknowledgeName) + this._messages = new ReTreeListContainer(this, Author.$messagesName) } override toJson(): AuthorJson { @@ -50,13 +50,13 @@ export class Author extends LifeLine{ let author = new Author(authorJson.name? authorJson.name : '', authorJson.xPosition, ref) context.put(author) authorJson.messages.map((mj, i) => { - let newRefRef = RefHandler.mixWithPrefixAndIndex(ref.$ref, Author.messagesPrefix, i) + let newRefRef = RefHandler.mixWithPrefixAndIndex(ref.$ref, Author.$messagesName, i) let newRef = RefHandler.createRef(newRefRef, mj.eClass) let m = Message.createTreeBackbone(newRef, context) author.addMessage(m) } ) authorJson.preknowledge.map((_, i) => { - let newRefRef = RefHandler.mixWithPrefixAndIndex(ref.$ref, Author.preknowledgePrefix, i) + let newRefRef = RefHandler.mixWithPrefixAndIndex(ref.$ref, Author.$preknowledgeName, i) let newRef = RefHandler.createRef(newRefRef, EClasses.Preknowledge) let p = Preknowledge.createTreeBackbone(newRef, context) author.addPreknowledge(p) diff --git a/src/app/shared/keml/core/conversation.ts b/src/app/shared/keml/core/conversation.ts index fe620d30..ae65b045 100644 --- a/src/app/shared/keml/core/conversation.ts +++ b/src/app/shared/keml/core/conversation.ts @@ -6,8 +6,8 @@ import {EClasses} from "@app/shared/keml/eclasses"; export class Conversation extends Referencable { - static readonly authorPrefix = 'author'; - static readonly conversationPartnersPrefix = 'conversationPartners'; + static readonly $authorName = 'author'; + static readonly $conversationPartnersName = 'conversationPartners'; title: string; _author: ReTreeSingleContainer; get author(): Author { @@ -32,8 +32,8 @@ export class Conversation extends Referencable { ) { let ref = RefHandler.createRef(RefHandler.rootPath, EClasses.Conversation) super(ref); - this._author = new ReTreeSingleContainer(this, Conversation.authorPrefix); - this._conversationPartners = new ReTreeListContainer(this, Conversation.conversationPartnersPrefix); + this._author = new ReTreeSingleContainer(this, Conversation.$authorName); + this._conversationPartners = new ReTreeListContainer(this, Conversation.$conversationPartnersName); this.title = title; this.author = author; } @@ -66,12 +66,12 @@ export class Conversation extends Referencable { context.put(conv) //trigger children: convJson.conversationPartners.map((_, i) => { - let newRefRef = RefHandler.mixWithPrefixAndIndex(ref.$ref, Conversation.conversationPartnersPrefix, i) + let newRefRef = RefHandler.mixWithPrefixAndIndex(ref.$ref, Conversation.$conversationPartnersName, i) let newRef: Ref = RefHandler.createRef(newRefRef, EClasses.ConversationPartner) let cp = ConversationPartner.createTreeBackbone(newRef, context) conv.addCP(cp) }) - let authorRefRef = RefHandler.computePrefix(ref.$ref, Conversation.authorPrefix) + let authorRefRef = RefHandler.computePrefix(ref.$ref, Conversation.$authorName) let authorRef: Ref = {$ref: authorRefRef, eClass: EClasses.Author} conv.author = Author.createTreeBackbone(authorRef, context) return conv; diff --git a/src/app/shared/keml/core/msg-info.ts b/src/app/shared/keml/core/msg-info.ts index ca8168b2..238011b8 100644 --- a/src/app/shared/keml/core/msg-info.ts +++ b/src/app/shared/keml/core/msg-info.ts @@ -23,9 +23,9 @@ import {BoundingBox, Positionable, PositionHelper} from "ngx-svg-graphics"; export abstract class Message extends Referencable { - public static readonly counterPartPrefix = 'counterPart' + public static readonly $counterPartName = 'counterPart' - _counterPart: ReLinkSingleContainer = new ReLinkSingleContainer(this, Message.counterPartPrefix) + _counterPart: ReLinkSingleContainer = new ReLinkSingleContainer(this, Message.$counterPartName) get counterPart(): ConversationPartner { return this._counterPart.get()!! //todo } @@ -87,7 +87,7 @@ export abstract class Message extends Referencable { } export class SendMessage extends Message { - public static readonly usesPrefix = 'uses' + public static readonly $usesName = 'uses' private readonly _uses: ReLinkListContainer; get uses(): Information[] { @@ -110,7 +110,7 @@ export class SendMessage extends Message { ) { let refC = RefHandler.createRefIfMissing(EClasses.SendMessage, ref) super(refC, counterPart, timing, content, originalContent); - this._uses = new ReLinkListContainer(this, SendMessage.usesPrefix, Information.isUsedOnPrefix); + this._uses = new ReLinkListContainer(this, SendMessage.$usesName, Information.$isUsedOnName); uses.map(u => this.addUsage(u)) } @@ -132,9 +132,8 @@ export class SendMessage extends Message { } export class ReceiveMessage extends Message { - static readonly generatesPrefix: string = 'generates'; - static readonly repeatsPrefix: string = 'repeats'; - + static readonly $generatesName: string = 'generates'; + static readonly $repeatsName: string = 'repeats'; _generates: ReTreeListContainer; get generates(): NewInformation[] { @@ -144,7 +143,6 @@ export class ReceiveMessage extends Message { this._generates.add(news) } - _repeats: ReLinkListContainer; get repeats(): Information[] { return this._repeats.get(); @@ -169,16 +167,16 @@ export class ReceiveMessage extends Message { ) { let refC = RefHandler.createRefIfMissing(EClasses.ReceiveMessage, ref) super(refC, counterPart, timing, content ? content : "New receive content", originalContent); - this._generates = new ReTreeListContainer(this, ReceiveMessage.generatesPrefix, NewInformation.sourcePrefix); - this._repeats = new ReLinkListContainer(this, ReceiveMessage.repeatsPrefix, Information.repeatedByPrefix); + this._generates = new ReTreeListContainer(this, ReceiveMessage.$generatesName, NewInformation.$sourceName); + this._repeats = new ReLinkListContainer(this, ReceiveMessage.$repeatsName, Information.$repeatedByName); repeats.map(r => this.addRepetition(r)); this.isInterrupted = isInterrupted; } override toJson(): ReceiveMessageJson { let res = (super.toJson()); - res.generates = this.generates.map(g => g.toJson()) - res.repeats = this.repeats.map(r => r.getRef()) + res.generates = this._generates.toJson() + res.repeats = this._repeats.toJson() res.isInterrupted = this.isInterrupted return res; } @@ -190,7 +188,7 @@ export class ReceiveMessage extends Message { context.put(rec) let generatesRefs = Deserializer.createRefList( ref!.$ref, - ReceiveMessage.generatesPrefix, + ReceiveMessage.$generatesName, recJson.generates?.map(_ => EClasses.NewInformation)) generatesRefs.map(newRef => rec.addGenerates(NewInformation.createTreeBackbone(newRef, context)) @@ -213,10 +211,10 @@ export abstract class Information extends Referencable implements Positionable { abstract getTiming(): number; - static readonly causesPrefix: string = 'causes' - static readonly isUsedOnPrefix: string = 'isUsedOn' - static readonly repeatedByPrefix: string = 'repeatedBy' - static readonly targetedByPrefix: string = 'targetedBy' + static readonly $causesName: string = 'causes' + static readonly $isUsedOnName: string = 'isUsedOn' + static readonly $repeatedByName: string = 'repeatedBy' + static readonly $targetedByName: string = 'targetedBy' readonly _causes: ReTreeListContainer; get causes(): InformationLink[] { return this._causes.get(); @@ -270,10 +268,10 @@ export abstract class Information extends Referencable implements Positionable { ) { super(ref); - this._causes = new ReTreeListContainer(this, NewInformation.causesPrefix, InformationLink.sourcePrefix); - this._targetedBy = new ReLinkListContainer(this, Information.targetedByPrefix, InformationLink.targetPrefix) + this._causes = new ReTreeListContainer(this, NewInformation.$causesName, InformationLink.$sourceName); + this._targetedBy = new ReLinkListContainer(this, Information.$targetedByName, InformationLink.$targetName) this._isUsedOn = new ReLinkListContainer(this, 'isUsedOn', 'uses'); - this._repeatedBy = new ReLinkListContainer(this, NewInformation.repeatedByPrefix, ReceiveMessage.repeatsPrefix); + this._repeatedBy = new ReLinkListContainer(this, NewInformation.$repeatedByName, ReceiveMessage.$repeatsName); this.message = message; this.isInstruction = isInstruction; this.position = position? position: PositionHelper.newBoundingBox(); @@ -289,17 +287,17 @@ export abstract class Information extends Referencable implements Positionable { override toJson(): InformationJson { return { - causes: this.causes.map(c => c.toJson()), + causes: this._causes.toJson(), currentTrust: this.currentTrust, eClass: this.ref.eClass, initialTrust: this.initialTrust, feltTrustImmediately: this.feltTrustImmediately, feltTrustAfterwards: this.feltTrustAfterwards, isInstruction: this.isInstruction, - isUsedOn: this.isUsedOn.map(m => m.getRef()), + isUsedOn: this._isUsedOn.toJson(), message: this.message, - repeatedBy: this.repeatedBy.map(m => m.getRef()), - targetedBy: this.targetedBy.map(l => l.getRef()), + repeatedBy: this._repeatedBy.toJson(), + targetedBy: this._targetedBy.toJson(), position: this.position, } } @@ -312,7 +310,7 @@ export abstract class Information extends Referencable implements Positionable { export class NewInformation extends Information { - public static readonly sourcePrefix = 'source' + public static readonly $sourceName = 'source' readonly _source: ReTreeParentContainer; set source(rec: ReceiveMessage) { @@ -334,7 +332,7 @@ export class NewInformation extends Information { ) { let refC = RefHandler.createRefIfMissing(EClasses.NewInformation, ref) super(refC, message, isInstruction, position, isUsedOn, repeatedBy, initialTrust, currentTrust, feltTrustImmediately, feltTrustAfterwards); - this._source = new ReTreeParentContainer(this, NewInformation.sourcePrefix, ReceiveMessage.generatesPrefix); + this._source = new ReTreeParentContainer(this, NewInformation.$sourceName, ReceiveMessage.$generatesName); this.source = source } @@ -361,7 +359,7 @@ export class NewInformation extends Information { ref); context.put(newInfo) newInfoJson.causes?.map((_, i) => { - let newRefRef = RefHandler.mixWithPrefixAndIndex(ref.$ref, NewInformation.causesPrefix, i) + let newRefRef = RefHandler.mixWithPrefixAndIndex(ref.$ref, NewInformation.$causesName, i) let newRef = RefHandler.createRef(newRefRef, EClasses.InformationLink) let link = InformationLink.createTreeBackbone(newRef, context) newInfo.addCauses(link) @@ -408,7 +406,7 @@ export class Preknowledge extends Information { ref) context.put(pre) preJson.causes?.map((_, i) => { - let newRefRef = RefHandler.mixWithPrefixAndIndex(ref.$ref, Preknowledge.causesPrefix, i) + let newRefRef = RefHandler.mixWithPrefixAndIndex(ref.$ref, Preknowledge.$causesName, i) let newRef = RefHandler.createRef(newRefRef, EClasses.InformationLink) let link = InformationLink.createTreeBackbone(newRef, context) pre.addCauses(link) @@ -419,8 +417,8 @@ export class Preknowledge extends Information { export class InformationLink extends Referencable { - public static readonly sourcePrefix = 'source' - public static readonly targetPrefix = 'target' + public static readonly $sourceName = 'source' + public static readonly $targetName = 'target' readonly _source: ReTreeParentContainer get source(): Information { return this._source.get()!!; //todo @@ -458,8 +456,8 @@ export class InformationLink extends Referencable { ) { let refC = RefHandler.createRefIfMissing(EClasses.InformationLink, ref) super(refC); - this._source = new ReTreeParentContainer(this, InformationLink.sourcePrefix, NewInformation.causesPrefix); - this._target = new ReLinkSingleContainer(this, InformationLink.targetPrefix, Information.targetedByPrefix); + this._source = new ReTreeParentContainer(this, InformationLink.$sourceName, NewInformation.$causesName); + this._target = new ReLinkSingleContainer(this, InformationLink.$targetName, Information.$targetedByName); this.source = source; this.target = target; diff --git a/src/app/shared/keml/json2core/json-fixer.ts b/src/app/shared/keml/json2core/json-fixer.ts index 02b6b912..b6105c89 100644 --- a/src/app/shared/keml/json2core/json-fixer.ts +++ b/src/app/shared/keml/json2core/json-fixer.ts @@ -33,11 +33,11 @@ export class JsonFixer { for each informationLink check the causes list and add the link itself as source to each entry */ static prepareJsonInfoLinkSources(conv: ConversationJson) { - let authorPrefix = RefHandler.computePrefix( RefHandler.rootPath, Conversation.authorPrefix) + let authorPrefix = RefHandler.computePrefix( RefHandler.rootPath, Conversation.$authorName) conv.author.preknowledge?.map((p, index) => { let ref = RefHandler.createRef( RefHandler.mixWithIndex( - RefHandler.computePrefix(authorPrefix, Author.preknowledgePrefix), + RefHandler.computePrefix(authorPrefix, Author.$preknowledgeName), index ), EClasses.Preknowledge @@ -50,11 +50,11 @@ export class JsonFixer { conv.author.messages.map( (m, index) => { if (!Message.isSend(m.eClass)) { - let msgPath = RefHandler.mixWithIndex(RefHandler.computePrefix(authorPrefix, Author.messagesPrefix), index) + let msgPath = RefHandler.mixWithIndex(RefHandler.computePrefix(authorPrefix, Author.$messagesName), index) let rec = m as ReceiveMessageJson rec.generates?.map((newInfo, index2) => { let infoPath = RefHandler.mixWithIndex( - RefHandler.computePrefix(msgPath, ReceiveMessage.generatesPrefix), + RefHandler.computePrefix(msgPath, ReceiveMessage.$generatesName), index2) let ref = RefHandler.createRef(infoPath, EClasses.NewInformation) newInfo.causes?.forEach(infoLink => infoLink.source = ref) From fb33f03a5794ac049feefa1df3262649cf7065a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Susanne=20G=C3=B6bel?= Date: Mon, 26 Jan 2026 10:54:20 +0100 Subject: [PATCH 10/11] Simplify usage by using npm link to use the local version, no changed build on github needed now --- .github/actions/buildAndPackage/action.yml | 3 --- package.json | 1 - 2 files changed, 4 deletions(-) diff --git a/.github/actions/buildAndPackage/action.yml b/.github/actions/buildAndPackage/action.yml index 8db5534a..1790430c 100644 --- a/.github/actions/buildAndPackage/action.yml +++ b/.github/actions/buildAndPackage/action.yml @@ -12,9 +12,6 @@ runs: - name: 'Install for CI' shell: bash run: npm ci - - name: 'Replace emfular by public 5.1.0' - shell: bash - run: npm install --no-package-lock --no-save emfular@5.1.0 - name: 'Test with CI configuration' shell: bash run: npm run test:ci diff --git a/package.json b/package.json index a77f8310..af0ce5d0 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,6 @@ "@types/express": "^4.17.17", "@types/jasmine": "~5.1.0", "@types/node": "^18.18.0", - "emfular": "file:../../../EMFular/projects/emfular/src/lib", "jasmine-core": "~5.1.0", "karma": "~6.4.0", "karma-chrome-launcher": "~3.2.0", From 19bc11ea3d902baab574df149b7f96f8cea5b133 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Susanne=20G=C3=B6bel?= Date: Mon, 26 Jan 2026 10:57:07 +0100 Subject: [PATCH 11/11] Package lock in sync now --- package-lock.json | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0d38f8b2..b3e45acf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -21,7 +21,7 @@ "@angular/router": "^19.2.4", "@angular/ssr": "^19.2.5", "@types/uuid": "^10.0.0", - "emfular": "^3.0.1", + "emfular": "^5.1.0", "express": "^4.18.2", "material-icons": "^1.13.12", "ngx-emfular-helper": "^0.3.1", @@ -37,7 +37,6 @@ "@types/express": "^4.17.17", "@types/jasmine": "~5.1.0", "@types/node": "^18.18.0", - "emfular": "file:../../../EMFular/projects/emfular/src/lib", "jasmine-core": "~5.1.0", "karma": "~6.4.0", "karma-chrome-launcher": "~3.2.0", @@ -47,9 +46,6 @@ "typescript": "~5.8.2" } }, - "../../../EMFular/projects/emfular/src/lib": { - "dev": true - }, "node_modules/@ampproject/remapping": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", @@ -7244,8 +7240,15 @@ "license": "ISC" }, "node_modules/emfular": { - "resolved": "../../../EMFular/projects/emfular/src/lib", - "link": true + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/emfular/-/emfular-5.1.0.tgz", + "integrity": "sha512-lT9cBc97I9VQLWKlX0lNzlMUmfjTJZ9gj5H0nY/N512o7ambLVvgOP1eAz9P2UEwz5tvBRAnUQG0hoTWBOZANw==", + "dependencies": { + "tslib": "^2.3.0" + }, + "peerDependencies": { + "@types/uuid": "^10.0.0" + } }, "node_modules/emoji-regex": { "version": "10.4.0",