diff --git a/delta/command/AddPartition.delta.json b/delta/command/AddPartition.delta.json new file mode 100644 index 0000000..3671bed --- /dev/null +++ b/delta/command/AddPartition.delta.json @@ -0,0 +1,46 @@ +{ + "messageKind": "AddPartition", + "newPartition": { + "nodes": [ + { + "id": "a", + "classifier": { + "language": "myLang", + "version": "1", + "key": "myConcept" + }, + "properties": [], + "containments": [], + "references": [], + "annotations": [], + "parent": null + }, + { + "id": "b", + "classifier": { + "language": "myLang", + "version": "1", + "key": "myConcept" + }, + "properties": [], + "containments": [], + "references": [], + "annotations": [], + "parent": "a" + } + ] + }, + "commandId": "cmdId", + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/command/ChangeClassifier.delta.json b/delta/command/ChangeClassifier.delta.json new file mode 100644 index 0000000..34538c7 --- /dev/null +++ b/delta/command/ChangeClassifier.delta.json @@ -0,0 +1,22 @@ +{ + "messageKind": "ChangeClassifier", + "node": "nodeId", + "newClassifier": { + "language": "MyLang", + "version": "3", + "key": "MyClassifier" + }, + "commandId": "cmdId", + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/command/CommandResponse.json b/delta/command/CommandResponse.json new file mode 100644 index 0000000..95aaf24 --- /dev/null +++ b/delta/command/CommandResponse.json @@ -0,0 +1,16 @@ +{ + "messageKind": "CommandResponse", + "commandId": "cmdId", + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/command/CompositeCommand.delta.json b/delta/command/CompositeCommand.delta.json new file mode 100644 index 0000000..a212c7e --- /dev/null +++ b/delta/command/CompositeCommand.delta.json @@ -0,0 +1,81 @@ +{ + "messageKind": "CompositeCommand", + "parts": [ + { + "messageKind": "AddProperty", + "node": "nodeId", + "property": { + "language": "MyLang", + "version": "4", + "key": "MyProperty" + }, + "newValue": "hello", + "commandId": "cmdId0", + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] + }, + { + "messageKind": "ChangeClassifier", + "node": "nodeId", + "newClassifier": { + "language": "MyLang", + "version": "3", + "key": "MyClassifier" + }, + "commandId": "cmdId1", + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] + }, + { + "messageKind": "CompositeCommand", + "parts": [ + { + "messageKind": "DeleteChild", + "parent": "nodeId", + "containment": { + "language": "MyLang", + "version": "4", + "key": "MyContainment" + }, + "index": 3, + "deletedChild": "a", + "commandId": "cmdId2" + } + ], + "commandId": "cmdId3" + } + ], + "commandId": "cmdId4", + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/command/DeletePartition.delta.json b/delta/command/DeletePartition.delta.json new file mode 100644 index 0000000..8edeaa8 --- /dev/null +++ b/delta/command/DeletePartition.delta.json @@ -0,0 +1,17 @@ +{ + "messageKind": "DeletePartition", + "deletedPartition": "nodeId", + "commandId": "cmdId", + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/command/annotation/AddAnnotation.delta.json b/delta/command/annotation/AddAnnotation.delta.json new file mode 100644 index 0000000..6ce22ec --- /dev/null +++ b/delta/command/annotation/AddAnnotation.delta.json @@ -0,0 +1,48 @@ +{ + "messageKind": "AddAnnotation", + "parent": "nodeId", + "newAnnotation": { + "nodes": [ + { + "id": "a", + "classifier": { + "language": "myLang", + "version": "1", + "key": "myConcept" + }, + "properties": [], + "containments": [], + "references": [], + "annotations": [], + "parent": null + }, + { + "id": "b", + "classifier": { + "language": "myLang", + "version": "1", + "key": "myConcept" + }, + "properties": [], + "containments": [], + "references": [], + "annotations": [], + "parent": "a" + } + ] + }, + "index": 3, + "commandId": "cmdId", + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/command/annotation/DeleteAnnotation.delta.json b/delta/command/annotation/DeleteAnnotation.delta.json new file mode 100644 index 0000000..0db9c16 --- /dev/null +++ b/delta/command/annotation/DeleteAnnotation.delta.json @@ -0,0 +1,19 @@ +{ + "messageKind": "DeleteAnnotation", + "parent": "nodeId", + "index": 3, + "deletedAnnotation": "deletedNodeId", + "commandId": "cmdId", + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/command/annotation/MoveAndReplaceAnnotationFromOtherParent.delta.json b/delta/command/annotation/MoveAndReplaceAnnotationFromOtherParent.delta.json new file mode 100644 index 0000000..dd30c11 --- /dev/null +++ b/delta/command/annotation/MoveAndReplaceAnnotationFromOtherParent.delta.json @@ -0,0 +1,20 @@ +{ + "messageKind": "MoveAndReplaceAnnotationFromOtherParent", + "newParent": "nodeId", + "newIndex": 3, + "replacedAnnotation": "replacedNodeId", + "movedAnnotation": "otherNodeId", + "commandId": "cmdId", + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/command/annotation/MoveAndReplaceAnnotationInSameParent.delta.json b/delta/command/annotation/MoveAndReplaceAnnotationInSameParent.delta.json new file mode 100644 index 0000000..fa6f885 --- /dev/null +++ b/delta/command/annotation/MoveAndReplaceAnnotationInSameParent.delta.json @@ -0,0 +1,19 @@ +{ + "messageKind": "MoveAndReplaceAnnotationInSameParent", + "newIndex": 3, + "replacedAnnotation": "replacedNodeId", + "movedAnnotation": "otherNodeId", + "commandId": "cmdId", + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/command/annotation/MoveAnnotationFromOtherParent.delta.json b/delta/command/annotation/MoveAnnotationFromOtherParent.delta.json new file mode 100644 index 0000000..0789bb6 --- /dev/null +++ b/delta/command/annotation/MoveAnnotationFromOtherParent.delta.json @@ -0,0 +1,19 @@ +{ + "messageKind": "MoveAnnotationFromOtherParent", + "newParent": "nodeId", + "newIndex": 3, + "movedAnnotation": "otherNodeId", + "commandId": "cmdId", + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/command/annotation/MoveAnnotationInSameParent.delta.json b/delta/command/annotation/MoveAnnotationInSameParent.delta.json new file mode 100644 index 0000000..1f7dd2b --- /dev/null +++ b/delta/command/annotation/MoveAnnotationInSameParent.delta.json @@ -0,0 +1,18 @@ +{ + "messageKind": "MoveAnnotationInSameParent", + "newIndex": 3, + "movedAnnotation": "otherNodeId", + "commandId": "cmdId", + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/command/annotation/ReplaceAnnotation.delta.json b/delta/command/annotation/ReplaceAnnotation.delta.json new file mode 100644 index 0000000..55ec5e2 --- /dev/null +++ b/delta/command/annotation/ReplaceAnnotation.delta.json @@ -0,0 +1,49 @@ +{ + "messageKind": "ReplaceAnnotation", + "parent": "nodeId", + "newAnnotation": { + "nodes": [ + { + "id": "a", + "classifier": { + "language": "myLang", + "version": "1", + "key": "myConcept" + }, + "properties": [], + "containments": [], + "references": [], + "annotations": [], + "parent": null + }, + { + "id": "b", + "classifier": { + "language": "myLang", + "version": "1", + "key": "myConcept" + }, + "properties": [], + "containments": [], + "references": [], + "annotations": [], + "parent": "a" + } + ] + }, + "index": 3, + "replacedAnnotation": "replacedNodeId", + "commandId": "cmdId", + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/command/containment/AddChild.delta.json b/delta/command/containment/AddChild.delta.json new file mode 100644 index 0000000..d28175d --- /dev/null +++ b/delta/command/containment/AddChild.delta.json @@ -0,0 +1,53 @@ +{ + "messageKind": "AddChild", + "parent": "nodeId", + "newChild": { + "nodes": [ + { + "id": "a", + "classifier": { + "language": "myLang", + "version": "1", + "key": "myConcept" + }, + "properties": [], + "containments": [], + "references": [], + "annotations": [], + "parent": null + }, + { + "id": "b", + "classifier": { + "language": "myLang", + "version": "1", + "key": "myConcept" + }, + "properties": [], + "containments": [], + "references": [], + "annotations": [], + "parent": "a" + } + ] + }, + "containment": { + "language": "MyLang", + "version": "4", + "key": "MyContainment" + }, + "index": 3, + "commandId": "cmdId", + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/command/containment/DeleteChild.delta.json b/delta/command/containment/DeleteChild.delta.json new file mode 100644 index 0000000..6782be4 --- /dev/null +++ b/delta/command/containment/DeleteChild.delta.json @@ -0,0 +1,24 @@ +{ + "messageKind": "DeleteChild", + "parent": "nodeId", + "containment": { + "language": "MyLang", + "version": "4", + "key": "MyContainment" + }, + "index": 3, + "deletedChild": "deletedNodeId", + "commandId": "cmdId", + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/command/containment/MoveAndReplaceChildFromOtherContainment.delta.json b/delta/command/containment/MoveAndReplaceChildFromOtherContainment.delta.json new file mode 100644 index 0000000..9df4d79 --- /dev/null +++ b/delta/command/containment/MoveAndReplaceChildFromOtherContainment.delta.json @@ -0,0 +1,25 @@ +{ + "messageKind": "MoveAndReplaceChildFromOtherContainment", + "newParent": "nodeId", + "newContainment": { + "language": "MyLang", + "version": "4", + "key": "MyContainment" + }, + "newIndex": 3, + "replacedChild": "replacedNodeId", + "movedChild": "otherNodeId", + "commandId": "cmdId", + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/command/containment/MoveAndReplaceChildFromOtherContainmentInSameParent.delta.json b/delta/command/containment/MoveAndReplaceChildFromOtherContainmentInSameParent.delta.json new file mode 100644 index 0000000..9ee55bc --- /dev/null +++ b/delta/command/containment/MoveAndReplaceChildFromOtherContainmentInSameParent.delta.json @@ -0,0 +1,24 @@ +{ + "messageKind": "MoveAndReplaceChildFromOtherContainmentInSameParent", + "newContainment": { + "language": "MyLang", + "version": "4", + "key": "MyContainment" + }, + "newIndex": 3, + "replacedChild": "replacedNodeId", + "movedChild": "otherNodeId", + "commandId": "cmdId", + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/command/containment/MoveAndReplaceChildInSameContainment.delta.json b/delta/command/containment/MoveAndReplaceChildInSameContainment.delta.json new file mode 100644 index 0000000..78365fc --- /dev/null +++ b/delta/command/containment/MoveAndReplaceChildInSameContainment.delta.json @@ -0,0 +1,19 @@ +{ + "messageKind": "MoveAndReplaceChildInSameContainment", + "newIndex": 3, + "replacedChild": "replacedNodeId", + "movedChild": "otherNodeId", + "commandId": "cmdId", + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/command/containment/MoveChildFromOtherContainment.delta.json b/delta/command/containment/MoveChildFromOtherContainment.delta.json new file mode 100644 index 0000000..925cbfe --- /dev/null +++ b/delta/command/containment/MoveChildFromOtherContainment.delta.json @@ -0,0 +1,24 @@ +{ + "messageKind": "MoveChildFromOtherContainment", + "newParent": "nodeId", + "newContainment": { + "language": "MyLang", + "version": "4", + "key": "MyContainment" + }, + "newIndex": 3, + "movedChild": "otherNodeId", + "commandId": "cmdId", + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/command/containment/MoveChildFromOtherContainmentInSameParent.delta.json b/delta/command/containment/MoveChildFromOtherContainmentInSameParent.delta.json new file mode 100644 index 0000000..cd37708 --- /dev/null +++ b/delta/command/containment/MoveChildFromOtherContainmentInSameParent.delta.json @@ -0,0 +1,23 @@ +{ + "messageKind": "MoveChildFromOtherContainmentInSameParent", + "newContainment": { + "language": "MyLang", + "version": "4", + "key": "MyContainment" + }, + "newIndex": 3, + "movedChild": "otherNodeId", + "commandId": "cmdId", + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/command/containment/MoveChildInSameContainment.delta.json b/delta/command/containment/MoveChildInSameContainment.delta.json new file mode 100644 index 0000000..e72d425 --- /dev/null +++ b/delta/command/containment/MoveChildInSameContainment.delta.json @@ -0,0 +1,18 @@ +{ + "messageKind": "MoveChildInSameContainment", + "newIndex": 3, + "movedChild": "otherNodeId", + "commandId": "cmdId", + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/command/containment/ReplaceChild.delta.json b/delta/command/containment/ReplaceChild.delta.json new file mode 100644 index 0000000..ef3d900 --- /dev/null +++ b/delta/command/containment/ReplaceChild.delta.json @@ -0,0 +1,54 @@ +{ + "messageKind": "ReplaceChild", + "parent": "nodeId", + "newChild": { + "nodes": [ + { + "id": "a", + "classifier": { + "language": "myLang", + "version": "1", + "key": "myConcept" + }, + "properties": [], + "containments": [], + "references": [], + "annotations": [], + "parent": null + }, + { + "id": "b", + "classifier": { + "language": "myLang", + "version": "1", + "key": "myConcept" + }, + "properties": [], + "containments": [], + "references": [], + "annotations": [], + "parent": "a" + } + ] + }, + "containment": { + "language": "MyLang", + "version": "4", + "key": "MyProperty" + }, + "index": 3, + "replacedChild": "replacedNodeId", + "commandId": "cmdId", + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/command/property/AddProperty.delta.json b/delta/command/property/AddProperty.delta.json new file mode 100644 index 0000000..5d38f5c --- /dev/null +++ b/delta/command/property/AddProperty.delta.json @@ -0,0 +1,23 @@ +{ + "messageKind": "AddProperty", + "node": "nodeId", + "property": { + "language": "MyLang", + "version": "4", + "key": "MyProperty" + }, + "newValue": "hello", + "commandId": "cmdId", + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/command/property/ChangeProperty.delta.json b/delta/command/property/ChangeProperty.delta.json new file mode 100644 index 0000000..8f3a970 --- /dev/null +++ b/delta/command/property/ChangeProperty.delta.json @@ -0,0 +1,23 @@ +{ + "messageKind": "ChangeProperty", + "node": "nodeId", + "property": { + "language": "MyLang", + "version": "4", + "key": "MyProperty" + }, + "newValue": "hello", + "commandId": "cmdId", + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/command/property/DeleteProperty.delta.json b/delta/command/property/DeleteProperty.delta.json new file mode 100644 index 0000000..3253f2b --- /dev/null +++ b/delta/command/property/DeleteProperty.delta.json @@ -0,0 +1,22 @@ +{ + "messageKind": "DeleteProperty", + "node": "nodeId", + "property": { + "language": "MyLang", + "version": "4", + "key": "MyProperty" + }, + "commandId": "cmdId", + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/command/reference/AddReference.delta.json b/delta/command/reference/AddReference.delta.json new file mode 100644 index 0000000..e44075b --- /dev/null +++ b/delta/command/reference/AddReference.delta.json @@ -0,0 +1,25 @@ +{ + "messageKind": "AddReference", + "parent": "nodeId", + "reference": { + "language": "MyLang", + "version": "4", + "key": "MyReference" + }, + "index": 3, + "newTarget": "otherNodeId", + "newResolveInfo": "otherNode name", + "commandId": "cmdId", + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/command/reference/AddReferenceResolveInfo.delta.json b/delta/command/reference/AddReferenceResolveInfo.delta.json new file mode 100644 index 0000000..944e583 --- /dev/null +++ b/delta/command/reference/AddReferenceResolveInfo.delta.json @@ -0,0 +1,25 @@ +{ + "messageKind": "AddReferenceResolveInfo", + "parent": "nodeId", + "reference": { + "language": "MyLang", + "version": "4", + "key": "MyReference" + }, + "index": 3, + "target": "targetNodeId", + "newResolveInfo": "TargetNode name", + "commandId": "cmdId", + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/command/reference/AddReferenceTarget.delta.json b/delta/command/reference/AddReferenceTarget.delta.json new file mode 100644 index 0000000..3327e92 --- /dev/null +++ b/delta/command/reference/AddReferenceTarget.delta.json @@ -0,0 +1,25 @@ +{ + "messageKind": "AddReferenceTarget", + "parent": "nodeId", + "reference": { + "language": "MyLang", + "version": "4", + "key": "MyReference" + }, + "index": 3, + "resolveInfo": "TargetNode name", + "newTarget": "targetNodeId", + "commandId": "cmdId", + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/command/reference/ChangeReference.delta.json b/delta/command/reference/ChangeReference.delta.json new file mode 100644 index 0000000..9b89087 --- /dev/null +++ b/delta/command/reference/ChangeReference.delta.json @@ -0,0 +1,27 @@ +{ + "messageKind": "ChangeReference", + "parent": "nodeId", + "reference": { + "language": "MyLang", + "version": "4", + "key": "MyReference" + }, + "index": 3, + "oldTarget": "oldTargetNodeId", + "oldResolveInfo": "TargetNode name", + "newTarget": "otherNodeId", + "newResolveInfo": "otherNode name", + "commandId": "cmdId", + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/command/reference/ChangeReferenceResolveInfo.delta.json b/delta/command/reference/ChangeReferenceResolveInfo.delta.json new file mode 100644 index 0000000..22e184f --- /dev/null +++ b/delta/command/reference/ChangeReferenceResolveInfo.delta.json @@ -0,0 +1,26 @@ +{ + "messageKind": "ChangeReferenceResolveInfo", + "parent": "nodeId", + "reference": { + "language": "MyLang", + "version": "4", + "key": "MyReference" + }, + "index": 3, + "target": "targetNodeId", + "oldResolveInfo": "TargetNode old name", + "newResolveInfo": "TargetNode name", + "commandId": "cmdId", + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/command/reference/ChangeReferenceTarget.delta.json b/delta/command/reference/ChangeReferenceTarget.delta.json new file mode 100644 index 0000000..727ecc6 --- /dev/null +++ b/delta/command/reference/ChangeReferenceTarget.delta.json @@ -0,0 +1,26 @@ +{ + "messageKind": "ChangeReferenceTarget", + "parent": "nodeId", + "reference": { + "language": "MyLang", + "version": "4", + "key": "MyReference" + }, + "index": 3, + "resolveInfo": "TargetNode name", + "oldTarget": "oldTargetNodeId", + "newTarget": "targetNodeId", + "commandId": "cmdId", + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/command/reference/DeleteReference.delta.json b/delta/command/reference/DeleteReference.delta.json new file mode 100644 index 0000000..bbde8a4 --- /dev/null +++ b/delta/command/reference/DeleteReference.delta.json @@ -0,0 +1,25 @@ +{ + "messageKind": "DeleteReference", + "parent": "nodeId", + "reference": { + "language": "MyLang", + "version": "4", + "key": "MyReference" + }, + "index": 3, + "deletedTarget": "targetNodeId", + "deletedResolveInfo": "TargetNode name", + "commandId": "cmdId", + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/command/reference/DeleteReferenceResolveInfo.delta.json b/delta/command/reference/DeleteReferenceResolveInfo.delta.json new file mode 100644 index 0000000..342fd2c --- /dev/null +++ b/delta/command/reference/DeleteReferenceResolveInfo.delta.json @@ -0,0 +1,25 @@ +{ + "messageKind": "DeleteReferenceResolveInfo", + "parent": "nodeId", + "reference": { + "language": "MyLang", + "version": "4", + "key": "MyReference" + }, + "index": 3, + "target": "targetNodeId", + "deletedResolveInfo": "TargetNode name", + "commandId": "cmdId", + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/command/reference/DeleteReferenceTarget.delta.json b/delta/command/reference/DeleteReferenceTarget.delta.json new file mode 100644 index 0000000..4cddcd2 --- /dev/null +++ b/delta/command/reference/DeleteReferenceTarget.delta.json @@ -0,0 +1,25 @@ +{ + "messageKind": "DeleteReferenceTarget", + "parent": "nodeId", + "reference": { + "language": "MyLang", + "version": "4", + "key": "MyReference" + }, + "index": 3, + "resolveInfo": "TargetNode name", + "deletedTarget": "targetNodeId", + "commandId": "cmdId", + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/command/reference/MoveAndReplaceEntryFromOtherReference.delta.json b/delta/command/reference/MoveAndReplaceEntryFromOtherReference.delta.json new file mode 100644 index 0000000..f34d8aa --- /dev/null +++ b/delta/command/reference/MoveAndReplaceEntryFromOtherReference.delta.json @@ -0,0 +1,34 @@ +{ + "messageKind": "MoveAndReplaceEntryFromOtherReference", + "newParent": "nodeId", + "newReference": { + "language": "MyLang", + "version": "4", + "key": "MyNewReference" + }, + "newIndex": 3, + "replacedTarget": "replacedTargetNodeId", + "replacedResolveInfo": "Replaced TargetNode name", + "oldParent": "oldNodeId", + "oldReference": { + "language": "MyLang", + "version": "4", + "key": "MyOldReference" + }, + "oldIndex": 23, + "movedTarget": "targetNodeId", + "movedResolveInfo": "TargetNode name", + "commandId": "cmdId", + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/command/reference/MoveAndReplaceEntryFromOtherReferenceInSameParent.delta.json b/delta/command/reference/MoveAndReplaceEntryFromOtherReferenceInSameParent.delta.json new file mode 100644 index 0000000..7cb80c0 --- /dev/null +++ b/delta/command/reference/MoveAndReplaceEntryFromOtherReferenceInSameParent.delta.json @@ -0,0 +1,33 @@ +{ + "messageKind": "MoveAndReplaceEntryFromOtherReferenceInSameParent", + "parent": "nodeId", + "newReference": { + "language": "MyLang", + "version": "4", + "key": "MyNewReference" + }, + "newIndex": 3, + "replacedTarget": "replacedTargetNodeId", + "replacedResolveInfo": "Replaced TargetNode name", + "oldReference": { + "language": "MyLang", + "version": "4", + "key": "MyOldReference" + }, + "oldIndex": 23, + "movedTarget": "targetNodeId", + "movedResolveInfo": "TargetNode name", + "commandId": "cmdId", + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/command/reference/MoveAndReplaceEntryInSameReference.delta.json b/delta/command/reference/MoveAndReplaceEntryInSameReference.delta.json new file mode 100644 index 0000000..8da0874 --- /dev/null +++ b/delta/command/reference/MoveAndReplaceEntryInSameReference.delta.json @@ -0,0 +1,28 @@ +{ + "messageKind": "MoveAndReplaceEntryInSameReference", + "parent": "nodeId", + "reference": { + "language": "MyLang", + "version": "4", + "key": "MyReference" + }, + "newIndex": 3, + "movedTarget": "targetNodeId", + "movedResolveInfo": "TargetNode name", + "oldIndex": 23, + "replacedTarget": "replacedTargetNodeId", + "replacedResolveInfo": "Replaced TargetNode name", + "commandId": "cmdId", + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/command/reference/MoveEntryFromOtherReference.delta.json b/delta/command/reference/MoveEntryFromOtherReference.delta.json new file mode 100644 index 0000000..5dd2d29 --- /dev/null +++ b/delta/command/reference/MoveEntryFromOtherReference.delta.json @@ -0,0 +1,32 @@ +{ + "messageKind": "MoveEntryFromOtherReference", + "newParent": "nodeId", + "newReference": { + "language": "MyLang", + "version": "4", + "key": "MyNewReference" + }, + "newIndex": 3, + "oldParent": "oldNodeId", + "oldReference": { + "language": "MyLang", + "version": "4", + "key": "MyOldReference" + }, + "oldIndex": 23, + "movedTarget": "targetNodeId", + "movedResolveInfo": "TargetNode name", + "commandId": "cmdId", + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/command/reference/MoveEntryFromOtherReferenceInSameParent.delta.json b/delta/command/reference/MoveEntryFromOtherReferenceInSameParent.delta.json new file mode 100644 index 0000000..b707cc2 --- /dev/null +++ b/delta/command/reference/MoveEntryFromOtherReferenceInSameParent.delta.json @@ -0,0 +1,31 @@ +{ + "messageKind": "MoveEntryFromOtherReferenceInSameParent", + "parent": "nodeId", + "newReference": { + "language": "MyLang", + "version": "4", + "key": "MyNewReference" + }, + "newIndex": 3, + "oldReference": { + "language": "MyLang", + "version": "4", + "key": "MyOldReference" + }, + "oldIndex": 23, + "movedTarget": "targetNodeId", + "movedResolveInfo": "TargetNode name", + "commandId": "cmdId", + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/command/reference/MoveEntryInSameReference.delta.json b/delta/command/reference/MoveEntryInSameReference.delta.json new file mode 100644 index 0000000..5ef5ce5 --- /dev/null +++ b/delta/command/reference/MoveEntryInSameReference.delta.json @@ -0,0 +1,26 @@ +{ + "messageKind": "MoveEntryInSameReference", + "parent": "nodeId", + "reference": { + "language": "MyLang", + "version": "4", + "key": "MyReference" + }, + "newIndex": 3, + "oldIndex": 23, + "movedTarget": "targetNodeId", + "movedResolveInfo": "TargetNode name", + "commandId": "cmdId", + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/event/ClassifierChanged.delta.json b/delta/event/ClassifierChanged.delta.json new file mode 100644 index 0000000..c7cbb24 --- /dev/null +++ b/delta/event/ClassifierChanged.delta.json @@ -0,0 +1,37 @@ +{ + "messageKind": "ClassifierChanged", + "node": "nodeId", + "newClassifier": { + "language": "MyLang", + "version": "3", + "key": "MyClassifier" + }, + "oldClassifier": { + "language": "MyOldLang", + "version": "5", + "key": "MyOldClassifier" + }, + "originCommands": [ + { + "participationId": "partId", + "commandId": "cmdId" + }, + { + "participationId": "otherPartId", + "commandId": "otherCmdId" + } + ], + "sequenceNumber": 123, + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/event/CompositeEvent.delta.json b/delta/event/CompositeEvent.delta.json new file mode 100644 index 0000000..2ea76c7 --- /dev/null +++ b/delta/event/CompositeEvent.delta.json @@ -0,0 +1,141 @@ +{ + "messageKind": "CompositeEvent", + "parts": [ + { + "messageKind": "ChildAdded", + "parent": "nodeId", + "newChild": { + "nodes": [ + { + "id": "a", + "classifier": { + "language": "myLang", + "version": "1", + "key": "myConcept" + }, + "properties": [], + "containments": [], + "references": [], + "annotations": [], + "parent": null + }, + { + "id": "b", + "classifier": { + "language": "myLang", + "version": "1", + "key": "myConcept" + }, + "properties": [], + "containments": [], + "references": [], + "annotations": [], + "parent": "a" + } + ] + }, + "containment": { + "language": "MyLang", + "version": "4", + "key": "MyContainment" + }, + "index": 3, + "originCommands": [ + { + "participationId": "partId", + "commandId": "cmdId" + }, + { + "participationId": "otherPartId", + "commandId": "otherCmdId" + } + ], + "sequenceNumber": 122, + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] + }, + { + "messageKind": "PartitionDeleted", + "deletedPartition": "a", + "deletedDescendants": [ + "b" + ], + "originCommands": [ + { + "participationId": "partId", + "commandId": "cmdId" + }, + { + "participationId": "otherPartId", + "commandId": "otherCmdId" + } + ], + "sequenceNumber": 123, + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] + }, + { + "messageKind": "ChildDeleted", + "parent": "nodeId", + "deletedChild": "a", + "deletedDescendants": [], + "containment": { + "language": "MyLang", + "version": "4", + "key": "MyContainment" + }, + "index": 3, + "originCommands": [ + { + "participationId": "partId", + "commandId": "cmdId" + } + ], + "sequenceNumber": 124 + }, + { + "messageKind": "Error", + "errorCode": "myErrorCode", + "message": "something is not right", + "originCommands": [ + { + "participationId": "partId", + "commandId": "cmdId" + } + ], + "sequenceNumber": 125 + } + ], + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/event/Error.delta.json b/delta/event/Error.delta.json new file mode 100644 index 0000000..815bb16 --- /dev/null +++ b/delta/event/Error.delta.json @@ -0,0 +1,28 @@ +{ + "messageKind": "Error", + "errorCode": "myErrorCode", + "message": "something is not right", + "originCommands": [ + { + "participationId": "partId", + "commandId": "cmdId" + }, + { + "participationId": "otherPartId", + "commandId": "otherCmdId" + } + ], + "sequenceNumber": 123, + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/event/NoOpEvent.delta.json b/delta/event/NoOpEvent.delta.json new file mode 100644 index 0000000..a08e813 --- /dev/null +++ b/delta/event/NoOpEvent.delta.json @@ -0,0 +1,26 @@ +{ + "messageKind": "NoOpEvent", + "originCommands": [ + { + "participationId": "partId", + "commandId": "cmdId" + }, + { + "participationId": "otherPartId", + "commandId": "otherCmdId" + } + ], + "sequenceNumber": 123, + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/event/PartitionAdded.delta.json b/delta/event/PartitionAdded.delta.json new file mode 100644 index 0000000..fd28b53 --- /dev/null +++ b/delta/event/PartitionAdded.delta.json @@ -0,0 +1,56 @@ +{ + "messageKind": "PartitionAdded", + "newPartition": { + "nodes": [ + { + "id": "a", + "classifier": { + "language": "myLang", + "version": "1", + "key": "myConcept" + }, + "properties": [], + "containments": [], + "references": [], + "annotations": [], + "parent": null + }, + { + "id": "b", + "classifier": { + "language": "myLang", + "version": "1", + "key": "myConcept" + }, + "properties": [], + "containments": [], + "references": [], + "annotations": [], + "parent": "a" + } + ] + }, + "originCommands": [ + { + "participationId": "partId", + "commandId": "cmdId" + }, + { + "participationId": "otherPartId", + "commandId": "otherCmdId" + } + ], + "sequenceNumber": 123, + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/event/PartitionDeleted.delta.json b/delta/event/PartitionDeleted.delta.json new file mode 100644 index 0000000..9a66084 --- /dev/null +++ b/delta/event/PartitionDeleted.delta.json @@ -0,0 +1,30 @@ +{ + "messageKind": "PartitionDeleted", + "deletedPartition": "a", + "deletedDescendants": [ + "b" + ], + "originCommands": [ + { + "participationId": "partId", + "commandId": "cmdId" + }, + { + "participationId": "otherPartId", + "commandId": "otherCmdId" + } + ], + "sequenceNumber": 123, + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/event/annotation/AnnotationAdded.delta.json b/delta/event/annotation/AnnotationAdded.delta.json new file mode 100644 index 0000000..d60a058 --- /dev/null +++ b/delta/event/annotation/AnnotationAdded.delta.json @@ -0,0 +1,58 @@ +{ + "messageKind": "AnnotationAdded", + "parent": "nodeId", + "newAnnotation": { + "nodes": [ + { + "id": "a", + "classifier": { + "language": "myLang", + "version": "1", + "key": "myConcept" + }, + "properties": [], + "containments": [], + "references": [], + "annotations": [], + "parent": null + }, + { + "id": "b", + "classifier": { + "language": "myLang", + "version": "1", + "key": "myConcept" + }, + "properties": [], + "containments": [], + "references": [], + "annotations": [], + "parent": "a" + } + ] + }, + "index": 3, + "originCommands": [ + { + "participationId": "partId", + "commandId": "cmdId" + }, + { + "participationId": "otherPartId", + "commandId": "otherCmdId" + } + ], + "sequenceNumber": 123, + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/event/annotation/AnnotationDeleted.delta.json b/delta/event/annotation/AnnotationDeleted.delta.json new file mode 100644 index 0000000..bfbbf94 --- /dev/null +++ b/delta/event/annotation/AnnotationDeleted.delta.json @@ -0,0 +1,32 @@ +{ + "messageKind": "AnnotationDeleted", + "parent": "nodeId", + "deletedAnnotation": "a", + "deletedDescendants": [ + "b" + ], + "index": 3, + "originCommands": [ + { + "participationId": "partId", + "commandId": "cmdId" + }, + { + "participationId": "otherPartId", + "commandId": "otherCmdId" + } + ], + "sequenceNumber": 123, + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/event/annotation/AnnotationMovedAndReplacedFromOtherParent.delta.json b/delta/event/annotation/AnnotationMovedAndReplacedFromOtherParent.delta.json new file mode 100644 index 0000000..583eeac --- /dev/null +++ b/delta/event/annotation/AnnotationMovedAndReplacedFromOtherParent.delta.json @@ -0,0 +1,35 @@ +{ + "messageKind": "AnnotationMovedAndReplacedFromOtherParent", + "newParent": "newNodeId", + "newIndex": 3, + "movedAnnotation": "movedNodeId", + "oldParent": "oldNodeId", + "oldIndex": 44, + "replacedAnnotation": "c", + "replacedDescendants": [ + "d" + ], + "originCommands": [ + { + "participationId": "partId", + "commandId": "cmdId" + }, + { + "participationId": "otherPartId", + "commandId": "otherCmdId" + } + ], + "sequenceNumber": 123, + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/event/annotation/AnnotationMovedAndReplacedInSameParent.delta.json b/delta/event/annotation/AnnotationMovedAndReplacedInSameParent.delta.json new file mode 100644 index 0000000..d8fa6ef --- /dev/null +++ b/delta/event/annotation/AnnotationMovedAndReplacedInSameParent.delta.json @@ -0,0 +1,34 @@ +{ + "messageKind": "AnnotationMovedAndReplacedInSameParent", + "newIndex": 3, + "movedAnnotation": "movedNodeId", + "parent": "nodeId", + "oldIndex": 44, + "replacedAnnotation": "c", + "replacedDescendants": [ + "d" + ], + "originCommands": [ + { + "participationId": "partId", + "commandId": "cmdId" + }, + { + "participationId": "otherPartId", + "commandId": "otherCmdId" + } + ], + "sequenceNumber": 123, + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/event/annotation/AnnotationMovedFromOtherParent.delta.json b/delta/event/annotation/AnnotationMovedFromOtherParent.delta.json new file mode 100644 index 0000000..f1da190 --- /dev/null +++ b/delta/event/annotation/AnnotationMovedFromOtherParent.delta.json @@ -0,0 +1,31 @@ +{ + "messageKind": "AnnotationMovedFromOtherParent", + "newParent": "newNodeId", + "newIndex": 3, + "movedAnnotation": "movedNodeId", + "oldParent": "oldNodeId", + "oldIndex": 44, + "originCommands": [ + { + "participationId": "partId", + "commandId": "cmdId" + }, + { + "participationId": "otherPartId", + "commandId": "otherCmdId" + } + ], + "sequenceNumber": 123, + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/event/annotation/AnnotationMovedInSameParent.delta.json b/delta/event/annotation/AnnotationMovedInSameParent.delta.json new file mode 100644 index 0000000..c9803ba --- /dev/null +++ b/delta/event/annotation/AnnotationMovedInSameParent.delta.json @@ -0,0 +1,30 @@ +{ + "messageKind": "AnnotationMovedInSameParent", + "newIndex": 3, + "movedAnnotation": "movedNodeId", + "parent": "nodeId", + "oldIndex": 44, + "originCommands": [ + { + "participationId": "partId", + "commandId": "cmdId" + }, + { + "participationId": "otherPartId", + "commandId": "otherCmdId" + } + ], + "sequenceNumber": 123, + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/event/annotation/AnnotationReplaced.delta.json b/delta/event/annotation/AnnotationReplaced.delta.json new file mode 100644 index 0000000..d83c817 --- /dev/null +++ b/delta/event/annotation/AnnotationReplaced.delta.json @@ -0,0 +1,62 @@ +{ + "messageKind": "AnnotationReplaced", + "parent": "nodeId", + "newAnnotation": { + "nodes": [ + { + "id": "a", + "classifier": { + "language": "myLang", + "version": "1", + "key": "myConcept" + }, + "properties": [], + "containments": [], + "references": [], + "annotations": [], + "parent": null + }, + { + "id": "b", + "classifier": { + "language": "myLang", + "version": "1", + "key": "myConcept" + }, + "properties": [], + "containments": [], + "references": [], + "annotations": [], + "parent": "a" + } + ] + }, + "replacedAnnotation": "c", + "replacedDescendants": [ + "d" + ], + "index": 3, + "originCommands": [ + { + "participationId": "partId", + "commandId": "cmdId" + }, + { + "participationId": "otherPartId", + "commandId": "otherCmdId" + } + ], + "sequenceNumber": 123, + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/event/containment/ChildAdded.delta.json b/delta/event/containment/ChildAdded.delta.json new file mode 100644 index 0000000..5dfb15b --- /dev/null +++ b/delta/event/containment/ChildAdded.delta.json @@ -0,0 +1,63 @@ +{ + "messageKind": "ChildAdded", + "parent": "nodeId", + "newChild": { + "nodes": [ + { + "id": "a", + "classifier": { + "language": "myLang", + "version": "1", + "key": "myConcept" + }, + "properties": [], + "containments": [], + "references": [], + "annotations": [], + "parent": null + }, + { + "id": "b", + "classifier": { + "language": "myLang", + "version": "1", + "key": "myConcept" + }, + "properties": [], + "containments": [], + "references": [], + "annotations": [], + "parent": "a" + } + ] + }, + "containment": { + "language": "MyLang", + "version": "4", + "key": "MyContainment" + }, + "index": 3, + "originCommands": [ + { + "participationId": "partId", + "commandId": "cmdId" + }, + { + "participationId": "otherPartId", + "commandId": "otherCmdId" + } + ], + "sequenceNumber": 123, + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/event/containment/ChildDeleted.delta.json b/delta/event/containment/ChildDeleted.delta.json new file mode 100644 index 0000000..b2e4c02 --- /dev/null +++ b/delta/event/containment/ChildDeleted.delta.json @@ -0,0 +1,37 @@ +{ + "messageKind": "ChildDeleted", + "parent": "nodeId", + "deletedChild": "a", + "deletedDescendants": [ + "b" + ], + "containment": { + "language": "MyLang", + "version": "4", + "key": "MyContainment" + }, + "index": 3, + "originCommands": [ + { + "participationId": "partId", + "commandId": "cmdId" + }, + { + "participationId": "otherPartId", + "commandId": "otherCmdId" + } + ], + "sequenceNumber": 123, + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/event/containment/ChildMovedAndReplacedFromOtherContainment.delta.json b/delta/event/containment/ChildMovedAndReplacedFromOtherContainment.delta.json new file mode 100644 index 0000000..35e9808 --- /dev/null +++ b/delta/event/containment/ChildMovedAndReplacedFromOtherContainment.delta.json @@ -0,0 +1,45 @@ +{ + "messageKind": "ChildMovedAndReplacedFromOtherContainment", + "newParent": "nodeId", + "newContainment": { + "language": "MyLang", + "version": "4", + "key": "MyNewContainment" + }, + "newIndex": 3, + "movedChild": "movedNodeId", + "oldParent": "oldNodeId", + "oldContainment": { + "language": "MyLang", + "version": "4", + "key": "MyOldContainment" + }, + "oldIndex": 55, + "replacedChild": "a", + "replacedDescendants": [ + "b" + ], + "originCommands": [ + { + "participationId": "partId", + "commandId": "cmdId" + }, + { + "participationId": "otherPartId", + "commandId": "otherCmdId" + } + ], + "sequenceNumber": 123, + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/event/containment/ChildMovedAndReplacedFromOtherContainmentInSameParent.delta.json b/delta/event/containment/ChildMovedAndReplacedFromOtherContainmentInSameParent.delta.json new file mode 100644 index 0000000..91ebbde --- /dev/null +++ b/delta/event/containment/ChildMovedAndReplacedFromOtherContainmentInSameParent.delta.json @@ -0,0 +1,44 @@ +{ + "messageKind": "ChildMovedAndReplacedFromOtherContainmentInSameParent", + "newContainment": { + "language": "MyLang", + "version": "4", + "key": "MyNewContainment" + }, + "newIndex": 3, + "movedChild": "movedNodeId", + "parent": "nodeId", + "oldContainment": { + "language": "MyLang", + "version": "4", + "key": "MyOldContainment" + }, + "oldIndex": 55, + "replacedChild": "a", + "replacedDescendants": [ + "b" + ], + "originCommands": [ + { + "participationId": "partId", + "commandId": "cmdId" + }, + { + "participationId": "otherPartId", + "commandId": "otherCmdId" + } + ], + "sequenceNumber": 123, + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/event/containment/ChildMovedAndReplacedInSameContainment.delta.json b/delta/event/containment/ChildMovedAndReplacedInSameContainment.delta.json new file mode 100644 index 0000000..154b164 --- /dev/null +++ b/delta/event/containment/ChildMovedAndReplacedInSameContainment.delta.json @@ -0,0 +1,39 @@ +{ + "messageKind": "ChildMovedAndReplacedInSameContainment", + "newIndex": 3, + "movedChild": "movedNodeId", + "parent": "nodeId", + "containment": { + "language": "MyLang", + "version": "4", + "key": "MyContainment" + }, + "oldIndex": 55, + "replacedChild": "a", + "replacedDescendants": [ + "b" + ], + "originCommands": [ + { + "participationId": "partId", + "commandId": "cmdId" + }, + { + "participationId": "otherPartId", + "commandId": "otherCmdId" + } + ], + "sequenceNumber": 123, + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/event/containment/ChildMovedFromOtherContainment.delta.json b/delta/event/containment/ChildMovedFromOtherContainment.delta.json new file mode 100644 index 0000000..31317a1 --- /dev/null +++ b/delta/event/containment/ChildMovedFromOtherContainment.delta.json @@ -0,0 +1,41 @@ +{ + "messageKind": "ChildMovedFromOtherContainment", + "newParent": "nodeId", + "newContainment": { + "language": "MyLang", + "version": "4", + "key": "MyNewContainment" + }, + "newIndex": 3, + "movedChild": "movedNodeId", + "oldParent": "oldNodeId", + "oldContainment": { + "language": "MyLang", + "version": "4", + "key": "MyOldContainment" + }, + "oldIndex": 55, + "originCommands": [ + { + "participationId": "partId", + "commandId": "cmdId" + }, + { + "participationId": "otherPartId", + "commandId": "otherCmdId" + } + ], + "sequenceNumber": 123, + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/event/containment/ChildMovedFromOtherContainmentInSameParent.delta.json b/delta/event/containment/ChildMovedFromOtherContainmentInSameParent.delta.json new file mode 100644 index 0000000..da66533 --- /dev/null +++ b/delta/event/containment/ChildMovedFromOtherContainmentInSameParent.delta.json @@ -0,0 +1,40 @@ +{ + "messageKind": "ChildMovedFromOtherContainmentInSameParent", + "newContainment": { + "language": "MyLang", + "version": "4", + "key": "MyNewContainment" + }, + "newIndex": 3, + "movedChild": "movedNodeId", + "parent": "nodeId", + "oldContainment": { + "language": "MyLang", + "version": "4", + "key": "MyOldContainment" + }, + "oldIndex": 55, + "originCommands": [ + { + "participationId": "partId", + "commandId": "cmdId" + }, + { + "participationId": "otherPartId", + "commandId": "otherCmdId" + } + ], + "sequenceNumber": 123, + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/event/containment/ChildMovedInSameContainment.delta.json b/delta/event/containment/ChildMovedInSameContainment.delta.json new file mode 100644 index 0000000..90b722a --- /dev/null +++ b/delta/event/containment/ChildMovedInSameContainment.delta.json @@ -0,0 +1,35 @@ +{ + "messageKind": "ChildMovedInSameContainment", + "newIndex": 3, + "movedChild": "movedNodeId", + "parent": "nodeId", + "containment": { + "language": "MyLang", + "version": "4", + "key": "MyContainment" + }, + "oldIndex": 55, + "originCommands": [ + { + "participationId": "partId", + "commandId": "cmdId" + }, + { + "participationId": "otherPartId", + "commandId": "otherCmdId" + } + ], + "sequenceNumber": 123, + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/event/containment/ChildReplaced.delta.json b/delta/event/containment/ChildReplaced.delta.json new file mode 100644 index 0000000..c137ff1 --- /dev/null +++ b/delta/event/containment/ChildReplaced.delta.json @@ -0,0 +1,67 @@ +{ + "messageKind": "ChildReplaced", + "parent": "nodeId", + "newChild": { + "nodes": [ + { + "id": "a", + "classifier": { + "language": "myLang", + "version": "1", + "key": "myConcept" + }, + "properties": [], + "containments": [], + "references": [], + "annotations": [], + "parent": null + }, + { + "id": "b", + "classifier": { + "language": "myLang", + "version": "1", + "key": "myConcept" + }, + "properties": [], + "containments": [], + "references": [], + "annotations": [], + "parent": "a" + } + ] + }, + "replacedChild": "c", + "replacedDescendants": [ + "d" + ], + "containment": { + "language": "MyLang", + "version": "4", + "key": "MyContainment" + }, + "index": 3, + "originCommands": [ + { + "participationId": "partId", + "commandId": "cmdId" + }, + { + "participationId": "otherPartId", + "commandId": "otherCmdId" + } + ], + "sequenceNumber": 123, + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/event/property/PropertyAdded.delta.json b/delta/event/property/PropertyAdded.delta.json new file mode 100644 index 0000000..28ec005 --- /dev/null +++ b/delta/event/property/PropertyAdded.delta.json @@ -0,0 +1,33 @@ +{ + "messageKind": "PropertyAdded", + "node": "nodeId", + "property": { + "language": "MyLang", + "version": "4", + "key": "MyProperty" + }, + "newValue": "hello", + "originCommands": [ + { + "participationId": "partId", + "commandId": "cmdId" + }, + { + "participationId": "otherPartId", + "commandId": "otherCmdId" + } + ], + "sequenceNumber": 123, + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/event/property/PropertyChanged.delta.json b/delta/event/property/PropertyChanged.delta.json new file mode 100644 index 0000000..bd5ccb6 --- /dev/null +++ b/delta/event/property/PropertyChanged.delta.json @@ -0,0 +1,34 @@ +{ + "messageKind": "PropertyChanged", + "node": "nodeId", + "property": { + "language": "MyLang", + "version": "4", + "key": "MyProperty" + }, + "oldValue": "hello", + "newValue": "bye", + "originCommands": [ + { + "participationId": "partId", + "commandId": "cmdId" + }, + { + "participationId": "otherPartId", + "commandId": "otherCmdId" + } + ], + "sequenceNumber": 123, + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/event/property/PropertyDeleted.delta.json b/delta/event/property/PropertyDeleted.delta.json new file mode 100644 index 0000000..67458c6 --- /dev/null +++ b/delta/event/property/PropertyDeleted.delta.json @@ -0,0 +1,33 @@ +{ + "messageKind": "PropertyDeleted", + "node": "nodeId", + "property": { + "language": "MyLang", + "version": "4", + "key": "MyProperty" + }, + "oldValue": "hello", + "originCommands": [ + { + "participationId": "partId", + "commandId": "cmdId" + }, + { + "participationId": "otherPartId", + "commandId": "otherCmdId" + } + ], + "sequenceNumber": 123, + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/event/reference/EntryMovedAndReplacedFromOtherReference.delta.json b/delta/event/reference/EntryMovedAndReplacedFromOtherReference.delta.json new file mode 100644 index 0000000..344f547 --- /dev/null +++ b/delta/event/reference/EntryMovedAndReplacedFromOtherReference.delta.json @@ -0,0 +1,44 @@ +{ + "messageKind": "EntryMovedAndReplacedFromOtherReference", + "newParent": "nodeId", + "newReference": { + "language": "MyLang", + "version": "4", + "key": "MyReference" + }, + "newIndex": 3, + "movedTarget": "targetNodeId", + "movedResolveInfo": "otherNode name", + "oldParent": "oldNodeId", + "oldReference": { + "language": "MyLang", + "version": "4", + "key": "MyOtherReference" + }, + "oldIndex": 55, + "replacedTarget": "replacedNodeId", + "replacedResolveInfo": "replacedNode name", + "originCommands": [ + { + "participationId": "partId", + "commandId": "cmdId" + }, + { + "participationId": "otherPartId", + "commandId": "otherCmdId" + } + ], + "sequenceNumber": 123, + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/event/reference/EntryMovedAndReplacedFromOtherReferenceInSameParent.delta.json b/delta/event/reference/EntryMovedAndReplacedFromOtherReferenceInSameParent.delta.json new file mode 100644 index 0000000..05455d2 --- /dev/null +++ b/delta/event/reference/EntryMovedAndReplacedFromOtherReferenceInSameParent.delta.json @@ -0,0 +1,43 @@ +{ + "messageKind": "EntryMovedAndReplacedFromOtherReferenceInSameParent", + "parent": "nodeId", + "newReference": { + "language": "MyLang", + "version": "4", + "key": "MyReference" + }, + "newIndex": 3, + "movedTarget": "targetNodeId", + "movedResolveInfo": "otherNode name", + "oldReference": { + "language": "MyLang", + "version": "4", + "key": "MyOtherReference" + }, + "oldIndex": 55, + "replacedTarget": "replacedNodeId", + "replacedResolveInfo": "replacedNode name", + "originCommands": [ + { + "participationId": "partId", + "commandId": "cmdId" + }, + { + "participationId": "otherPartId", + "commandId": "otherCmdId" + } + ], + "sequenceNumber": 123, + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/event/reference/EntryMovedAndReplacedInSameReference.delta.json b/delta/event/reference/EntryMovedAndReplacedInSameReference.delta.json new file mode 100644 index 0000000..1c5329e --- /dev/null +++ b/delta/event/reference/EntryMovedAndReplacedInSameReference.delta.json @@ -0,0 +1,38 @@ +{ + "messageKind": "EntryMovedAndReplacedInSameReference", + "parent": "nodeId", + "reference": { + "language": "MyLang", + "version": "4", + "key": "MyReference" + }, + "newIndex": 3, + "movedTarget": "targetNodeId", + "movedResolveInfo": "otherNode name", + "oldIndex": 55, + "replacedTarget": "replacedNodeId", + "replacedResolveInfo": "replacedNode name", + "originCommands": [ + { + "participationId": "partId", + "commandId": "cmdId" + }, + { + "participationId": "otherPartId", + "commandId": "otherCmdId" + } + ], + "sequenceNumber": 123, + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/event/reference/EntryMovedFromOtherReference.delta.json b/delta/event/reference/EntryMovedFromOtherReference.delta.json new file mode 100644 index 0000000..26521b0 --- /dev/null +++ b/delta/event/reference/EntryMovedFromOtherReference.delta.json @@ -0,0 +1,42 @@ +{ + "messageKind": "EntryMovedFromOtherReference", + "newParent": "nodeId", + "newReference": { + "language": "MyLang", + "version": "4", + "key": "MyReference" + }, + "newIndex": 3, + "oldParent": "oldNodeId", + "oldReference": { + "language": "MyLang", + "version": "4", + "key": "MyOtherReference" + }, + "oldIndex": 55, + "target": "targetNodeId", + "resolveInfo": "otherNode name", + "originCommands": [ + { + "participationId": "partId", + "commandId": "cmdId" + }, + { + "participationId": "otherPartId", + "commandId": "otherCmdId" + } + ], + "sequenceNumber": 123, + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/event/reference/EntryMovedFromOtherReferenceInSameParent.delta.json b/delta/event/reference/EntryMovedFromOtherReferenceInSameParent.delta.json new file mode 100644 index 0000000..7c55369 --- /dev/null +++ b/delta/event/reference/EntryMovedFromOtherReferenceInSameParent.delta.json @@ -0,0 +1,41 @@ +{ + "messageKind": "EntryMovedFromOtherReferenceInSameParent", + "parent": "nodeId", + "newReference": { + "language": "MyLang", + "version": "4", + "key": "MyReference" + }, + "newIndex": 3, + "oldReference": { + "language": "MyLang", + "version": "4", + "key": "MyOtherReference" + }, + "oldIndex": 55, + "target": "targetNodeId", + "resolveInfo": "otherNode name", + "originCommands": [ + { + "participationId": "partId", + "commandId": "cmdId" + }, + { + "participationId": "otherPartId", + "commandId": "otherCmdId" + } + ], + "sequenceNumber": 123, + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/event/reference/EntryMovedInSameReference.delta.json b/delta/event/reference/EntryMovedInSameReference.delta.json new file mode 100644 index 0000000..9be4ec9 --- /dev/null +++ b/delta/event/reference/EntryMovedInSameReference.delta.json @@ -0,0 +1,36 @@ +{ + "messageKind": "EntryMovedInSameReference", + "parent": "nodeId", + "reference": { + "language": "MyLang", + "version": "4", + "key": "MyReference" + }, + "newIndex": 3, + "oldIndex": 55, + "target": "targetNodeId", + "resolveInfo": "otherNode name", + "originCommands": [ + { + "participationId": "partId", + "commandId": "cmdId" + }, + { + "participationId": "otherPartId", + "commandId": "otherCmdId" + } + ], + "sequenceNumber": 123, + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/event/reference/ReferenceAdded.delta.json b/delta/event/reference/ReferenceAdded.delta.json new file mode 100644 index 0000000..424954a --- /dev/null +++ b/delta/event/reference/ReferenceAdded.delta.json @@ -0,0 +1,35 @@ +{ + "messageKind": "ReferenceAdded", + "parent": "nodeId", + "reference": { + "language": "MyLang", + "version": "4", + "key": "MyReference" + }, + "index": 3, + "newTarget": "targetNodeId", + "newResolveInfo": "otherNode name", + "originCommands": [ + { + "participationId": "partId", + "commandId": "cmdId" + }, + { + "participationId": "otherPartId", + "commandId": "otherCmdId" + } + ], + "sequenceNumber": 123, + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/event/reference/ReferenceChanged.delta.json b/delta/event/reference/ReferenceChanged.delta.json new file mode 100644 index 0000000..dbbe3e2 --- /dev/null +++ b/delta/event/reference/ReferenceChanged.delta.json @@ -0,0 +1,37 @@ +{ + "messageKind": "ReferenceChanged", + "parent": "nodeId", + "reference": { + "language": "MyLang", + "version": "4", + "key": "MyReference" + }, + "index": 3, + "newTarget": "targetNodeId", + "newResolveInfo": "otherNode name", + "oldTarget": "replacedNodeId", + "oldResolveInfo": "replacedNode name", + "originCommands": [ + { + "participationId": "partId", + "commandId": "cmdId" + }, + { + "participationId": "otherPartId", + "commandId": "otherCmdId" + } + ], + "sequenceNumber": 123, + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/event/reference/ReferenceDeleted.delta.json b/delta/event/reference/ReferenceDeleted.delta.json new file mode 100644 index 0000000..04f61e5 --- /dev/null +++ b/delta/event/reference/ReferenceDeleted.delta.json @@ -0,0 +1,35 @@ +{ + "messageKind": "ReferenceDeleted", + "parent": "nodeId", + "reference": { + "language": "MyLang", + "version": "4", + "key": "MyReference" + }, + "index": 3, + "deletedTarget": "targetNodeId", + "deletedResolveInfo": "otherNode name", + "originCommands": [ + { + "participationId": "partId", + "commandId": "cmdId" + }, + { + "participationId": "otherPartId", + "commandId": "otherCmdId" + } + ], + "sequenceNumber": 123, + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/event/reference/ReferenceResolveInfoAdded.delta.json b/delta/event/reference/ReferenceResolveInfoAdded.delta.json new file mode 100644 index 0000000..225b00b --- /dev/null +++ b/delta/event/reference/ReferenceResolveInfoAdded.delta.json @@ -0,0 +1,35 @@ +{ + "messageKind": "ReferenceResolveInfoAdded", + "parent": "nodeId", + "reference": { + "language": "MyLang", + "version": "4", + "key": "MyReference" + }, + "index": 3, + "newResolveInfo": "otherNode name", + "target": "targetNodeId", + "originCommands": [ + { + "participationId": "partId", + "commandId": "cmdId" + }, + { + "participationId": "otherPartId", + "commandId": "otherCmdId" + } + ], + "sequenceNumber": 123, + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/event/reference/ReferenceResolveInfoChanged.delta.json b/delta/event/reference/ReferenceResolveInfoChanged.delta.json new file mode 100644 index 0000000..ab8fc52 --- /dev/null +++ b/delta/event/reference/ReferenceResolveInfoChanged.delta.json @@ -0,0 +1,36 @@ +{ + "messageKind": "ReferenceResolveInfoChanged", + "parent": "nodeId", + "reference": { + "language": "MyLang", + "version": "4", + "key": "MyReference" + }, + "index": 3, + "newResolveInfo": "targetNode new name", + "target": "targetNodeId", + "replacedResolveInfo": "targetNode old name", + "originCommands": [ + { + "participationId": "partId", + "commandId": "cmdId" + }, + { + "participationId": "otherPartId", + "commandId": "otherCmdId" + } + ], + "sequenceNumber": 123, + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/event/reference/ReferenceResolveInfoDeleted.delta.json b/delta/event/reference/ReferenceResolveInfoDeleted.delta.json new file mode 100644 index 0000000..5063dd5 --- /dev/null +++ b/delta/event/reference/ReferenceResolveInfoDeleted.delta.json @@ -0,0 +1,35 @@ +{ + "messageKind": "ReferenceResolveInfoDeleted", + "parent": "nodeId", + "reference": { + "language": "MyLang", + "version": "4", + "key": "MyReference" + }, + "index": 3, + "deletedResolveInfo": "otherNode name", + "target": "targetNodeId", + "originCommands": [ + { + "participationId": "partId", + "commandId": "cmdId" + }, + { + "participationId": "otherPartId", + "commandId": "otherCmdId" + } + ], + "sequenceNumber": 123, + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/event/reference/ReferenceTargetAdded.delta.json b/delta/event/reference/ReferenceTargetAdded.delta.json new file mode 100644 index 0000000..a67d8d6 --- /dev/null +++ b/delta/event/reference/ReferenceTargetAdded.delta.json @@ -0,0 +1,35 @@ +{ + "messageKind": "ReferenceTargetAdded", + "parent": "nodeId", + "reference": { + "language": "MyLang", + "version": "4", + "key": "MyReference" + }, + "index": 3, + "newTarget": "newTargetNodeId", + "resolveInfo": "targetNode name", + "originCommands": [ + { + "participationId": "partId", + "commandId": "cmdId" + }, + { + "participationId": "otherPartId", + "commandId": "otherCmdId" + } + ], + "sequenceNumber": 123, + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/event/reference/ReferenceTargetChanged.delta.json b/delta/event/reference/ReferenceTargetChanged.delta.json new file mode 100644 index 0000000..2a81744 --- /dev/null +++ b/delta/event/reference/ReferenceTargetChanged.delta.json @@ -0,0 +1,36 @@ +{ + "messageKind": "ReferenceTargetChanged", + "parent": "nodeId", + "reference": { + "language": "MyLang", + "version": "4", + "key": "MyReference" + }, + "index": 3, + "newTarget": "newTargetNodeId", + "resolveInfo": "targetNode name", + "replacedTarget": "replacedTargetNodeId", + "originCommands": [ + { + "participationId": "partId", + "commandId": "cmdId" + }, + { + "participationId": "otherPartId", + "commandId": "otherCmdId" + } + ], + "sequenceNumber": 123, + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/event/reference/ReferenceTargetDeleted.delta.json b/delta/event/reference/ReferenceTargetDeleted.delta.json new file mode 100644 index 0000000..1e70231 --- /dev/null +++ b/delta/event/reference/ReferenceTargetDeleted.delta.json @@ -0,0 +1,35 @@ +{ + "messageKind": "ReferenceTargetDeleted", + "parent": "nodeId", + "reference": { + "language": "MyLang", + "version": "4", + "key": "MyReference" + }, + "index": 3, + "deletedTarget": "deletedTargetNodeId", + "resolveInfo": "targetNode name", + "originCommands": [ + { + "participationId": "partId", + "commandId": "cmdId" + }, + { + "participationId": "otherPartId", + "commandId": "otherCmdId" + } + ], + "sequenceNumber": 123, + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/query/GetAvailableIdsRequest.delta.json b/delta/query/GetAvailableIdsRequest.delta.json new file mode 100644 index 0000000..91ac982 --- /dev/null +++ b/delta/query/GetAvailableIdsRequest.delta.json @@ -0,0 +1,17 @@ +{ + "messageKind": "GetAvailableIdsRequest", + "count": 3, + "queryId": "q1", + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/query/GetAvailableIdsResponse.delta.json b/delta/query/GetAvailableIdsResponse.delta.json new file mode 100644 index 0000000..cc25fb4 --- /dev/null +++ b/delta/query/GetAvailableIdsResponse.delta.json @@ -0,0 +1,21 @@ +{ + "messageKind": "GetAvailableIdsResponse", + "ids": [ + "freeId0", + "freeId1", + "freeId2" + ], + "queryId": "q1", + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/query/ListPartitionsRequest.delta.json b/delta/query/ListPartitionsRequest.delta.json new file mode 100644 index 0000000..9488b9b --- /dev/null +++ b/delta/query/ListPartitionsRequest.delta.json @@ -0,0 +1,16 @@ +{ + "messageKind": "ListPartitionsRequest", + "queryId": "q1", + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/query/ListPartitionsResponse.delta.json b/delta/query/ListPartitionsResponse.delta.json new file mode 100644 index 0000000..10465d8 --- /dev/null +++ b/delta/query/ListPartitionsResponse.delta.json @@ -0,0 +1,46 @@ +{ + "messageKind": "ListPartitionsResponse", + "partitions": { + "nodes": [ + { + "id": "a", + "classifier": { + "language": "myLang", + "version": "1", + "key": "myConcept" + }, + "properties": [], + "containments": [], + "references": [], + "annotations": [], + "parent": null + }, + { + "id": "b", + "classifier": { + "language": "myLang", + "version": "1", + "key": "myConcept" + }, + "properties": [], + "containments": [], + "references": [], + "annotations": [], + "parent": "a" + } + ] + }, + "queryId": "q1", + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/query/ReconnectRequest.delta.json b/delta/query/ReconnectRequest.delta.json new file mode 100644 index 0000000..54f2b89 --- /dev/null +++ b/delta/query/ReconnectRequest.delta.json @@ -0,0 +1,18 @@ +{ + "messageKind": "ReconnectRequest", + "participationId": "partipId", + "lastReceivedSequenceNumber": "123", + "queryId": "q1", + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/query/ReconnectResponse.delta.json b/delta/query/ReconnectResponse.delta.json new file mode 100644 index 0000000..7be4485 --- /dev/null +++ b/delta/query/ReconnectResponse.delta.json @@ -0,0 +1,17 @@ +{ + "messageKind": "ReconnectResponse", + "lastSentSequenceNumber": "123", + "queryId": "q1", + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/query/SignOffRequest.delta.json b/delta/query/SignOffRequest.delta.json new file mode 100644 index 0000000..d408af4 --- /dev/null +++ b/delta/query/SignOffRequest.delta.json @@ -0,0 +1,16 @@ +{ + "messageKind": "SignOffRequest", + "queryId": "q1", + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/query/SignOffResponse.delta.json b/delta/query/SignOffResponse.delta.json new file mode 100644 index 0000000..e6ce773 --- /dev/null +++ b/delta/query/SignOffResponse.delta.json @@ -0,0 +1,16 @@ +{ + "messageKind": "SignOffResponse", + "queryId": "q1", + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/query/SignOnRequest.delta.json b/delta/query/SignOnRequest.delta.json new file mode 100644 index 0000000..b555bad --- /dev/null +++ b/delta/query/SignOnRequest.delta.json @@ -0,0 +1,17 @@ +{ + "messageKind": "SignOnRequest", + "deltaProtocolVersion": "2025.1", + "queryId": "q1", + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/query/SignOnResponse.delta.json b/delta/query/SignOnResponse.delta.json new file mode 100644 index 0000000..6c2287a --- /dev/null +++ b/delta/query/SignOnResponse.delta.json @@ -0,0 +1,17 @@ +{ + "messageKind": "SignOnResponse", + "participationId": "participation01", + "queryId": "q1", + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/query/SubscribeToChangingPartitionsRequest.delta.json b/delta/query/SubscribeToChangingPartitionsRequest.delta.json new file mode 100644 index 0000000..6a71905 --- /dev/null +++ b/delta/query/SubscribeToChangingPartitionsRequest.delta.json @@ -0,0 +1,19 @@ +{ + "messageKind": "SubscribeToChangingPartitionsRequest", + "creation": false, + "deletion": false, + "partitions": false, + "queryId": "q1", + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/query/SubscribeToChangingPartitionsResponse.delta.json b/delta/query/SubscribeToChangingPartitionsResponse.delta.json new file mode 100644 index 0000000..3572ad5 --- /dev/null +++ b/delta/query/SubscribeToChangingPartitionsResponse.delta.json @@ -0,0 +1,16 @@ +{ + "messageKind": "SubscribeToChangingPartitionsResponse", + "queryId": "q1", + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/query/SubscribeToPartitionContentsRequest.delta.json b/delta/query/SubscribeToPartitionContentsRequest.delta.json new file mode 100644 index 0000000..0a74e6d --- /dev/null +++ b/delta/query/SubscribeToPartitionContentsRequest.delta.json @@ -0,0 +1,17 @@ +{ + "messageKind": "SubscribeToPartitionContentsRequest", + "partition": "nodeId", + "queryId": "q1", + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/query/SubscribeToPartitionContentsResponse.delta.json b/delta/query/SubscribeToPartitionContentsResponse.delta.json new file mode 100644 index 0000000..55864d3 --- /dev/null +++ b/delta/query/SubscribeToPartitionContentsResponse.delta.json @@ -0,0 +1,46 @@ +{ + "messageKind": "SubscribeToPartitionContentsResponse", + "contents": { + "nodes": [ + { + "id": "a", + "classifier": { + "language": "myLang", + "version": "1", + "key": "myConcept" + }, + "properties": [], + "containments": [], + "references": [], + "annotations": [], + "parent": null + }, + { + "id": "b", + "classifier": { + "language": "myLang", + "version": "1", + "key": "myConcept" + }, + "properties": [], + "containments": [], + "references": [], + "annotations": [], + "parent": "a" + } + ] + }, + "queryId": "q1", + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/query/UnsubscribeFromPartitionContentsRequest.delta.json b/delta/query/UnsubscribeFromPartitionContentsRequest.delta.json new file mode 100644 index 0000000..730d418 --- /dev/null +++ b/delta/query/UnsubscribeFromPartitionContentsRequest.delta.json @@ -0,0 +1,17 @@ +{ + "messageKind": "UnsubscribeFromPartitionContentsRequest", + "partition": "nodeId", + "queryId": "q1", + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/delta/query/UnsubscribeFromPartitionContentsResponse.delta.json b/delta/query/UnsubscribeFromPartitionContentsResponse.delta.json new file mode 100644 index 0000000..0d91aa9 --- /dev/null +++ b/delta/query/UnsubscribeFromPartitionContentsResponse.delta.json @@ -0,0 +1,16 @@ +{ + "messageKind": "UnsubscribeFromPartitionContentsResponse", + "queryId": "q1", + "protocolMessages": [ + { + "kind": "msgKind", + "message": "Human message", + "data": [ + { + "key": "dataKey", + "value": "dataValue" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/cs/.gitignore b/src/cs/.gitignore new file mode 100644 index 0000000..164379a --- /dev/null +++ b/src/cs/.gitignore @@ -0,0 +1,365 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Ww][Ii][Nn]32/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Rider files +.idea/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# ASP.NET Scaffolding +ScaffoldingReadMe.txt + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Coverlet is a free, cross platform Code Coverage Tool +coverage*.json +coverage*.xml +coverage*.info + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ + +# Fody - auto-generated XML schema +FodyWeavers.xsd diff --git a/src/cs/Directory.Build.props b/src/cs/Directory.Build.props new file mode 100644 index 0000000..cfa97bf --- /dev/null +++ b/src/cs/Directory.Build.props @@ -0,0 +1,47 @@ + + + + + net8.0 + enable + 12 + enable + LionWeb.Integration + + true + $(MinVerVersion) + $(MinVerMajor).$(MinVerMinor).$(MinVerPatch).0 + $(MinVerVersion) + $(MinVerMajor).0.0.0 + + $([System.DateTime]::Now.Year) + Copyright $(CurrentYear) LionWeb contributors + LionWeb Project + LionWeb-CSharp-Integration + LionWeb contributors + true + git + 0.2.2 + https://github.com/LionWeb-io/lionweb-integration-testing + https://github.com/LionWeb-io/lionweb-integration-testing.git + Apache-2.0 + false + false + true + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + \ No newline at end of file diff --git a/src/cs/Directory.Packages.props b/src/cs/Directory.Packages.props new file mode 100644 index 0000000..fdab09e --- /dev/null +++ b/src/cs/Directory.Packages.props @@ -0,0 +1,24 @@ + + + + true + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + \ No newline at end of file diff --git a/src/cs/LionWeb-CSharp-Integration.sln b/src/cs/LionWeb-CSharp-Integration.sln new file mode 100644 index 0000000..46bee5a --- /dev/null +++ b/src/cs/LionWeb-CSharp-Integration.sln @@ -0,0 +1,99 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LionWeb.Integration.WebSocket.Tests", "LionWeb.Integration.WebSocket.Tests\LionWeb.Integration.WebSocket.Tests.csproj", "{64E9D29F-1F71-44A8-ABA4-2001A4E3DCD1}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{3DB0E241-2809-4754-84DF-2798122585D6}" + ProjectSection(SolutionItems) = preProject + Directory.Build.props = Directory.Build.props + Directory.Packages.props = Directory.Packages.props + EndProjectSection +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LionWeb.Core", "..\..\..\lionweb-csharp\src\LionWeb.Core\LionWeb.Core.csproj", "{DC2F0113-2B6B-44C9-BDAC-E0A82EC06722}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Imported", "Imported", "{A7AD74F7-DCEF-411B-9913-228A914A7234}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LionWeb.Core.Test", "..\..\..\lionweb-csharp\test\LionWeb.Core.Test\LionWeb.Core.Test.csproj", "{1B1EF9C7-BDE9-48E1-A3DC-FF87DBE12503}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LionWeb.Integration.Build", "LionWeb.Integration.Build\LionWeb.Integration.Build.csproj", "{B7797C67-28D2-4C0C-9753-9E43C824E452}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LionWeb.Generator", "..\..\..\lionweb-csharp\src\LionWeb.Generator\LionWeb.Generator.csproj", "{1E4D2FC6-6146-4375-AC61-C74FD27B3C4B}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LionWeb.Integration.WebSocket.Server", "LionWeb.Integration.WebSocket.Server\LionWeb.Integration.WebSocket.Server.csproj", "{A5A3FC0E-379A-43D7-909B-395EA6D2E1C0}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LionWeb.Integration.Languages", "LionWeb.Integration.Languages\LionWeb.Integration.Languages.csproj", "{A2ADB115-27FE-4E19-A640-016231B94762}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LionWeb.Integration.WebSocket.Client", "LionWeb.Integration.WebSocket.Client\LionWeb.Integration.WebSocket.Client.csproj", "{AE07F89A-476F-456F-A15E-A081E281499D}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LionWeb-CSharp-Build", "..\..\..\lionweb-csharp\build\LionWeb-CSharp-build\LionWeb-CSharp-Build.csproj", "{482BFF5C-548C-4588-86EF-70779A2A0B7C}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LionWeb.Generator.MpsSpecific", "..\..\..\lionweb-csharp\src\LionWeb.Generator.MpsSpecific\LionWeb.Generator.MpsSpecific.csproj", "{E78162CC-3E79-4A5E-BCD5-BF24D6F8A63F}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LionWeb.Protocol.Delta", "..\..\..\lionweb-csharp\src\LionWeb.Protocol.Delta\LionWeb.Protocol.Delta.csproj", "{0EB3B7AC-DBC3-45A9-877D-C0AF04F8D229}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LionWeb.Protocol.Delta.Test", "..\..\..\lionweb-csharp\test\LionWeb.Protocol.Delta.Test\LionWeb.Protocol.Delta.Test.csproj", "{533F261E-8449-4D16-8873-57D1E578D081}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {64E9D29F-1F71-44A8-ABA4-2001A4E3DCD1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {64E9D29F-1F71-44A8-ABA4-2001A4E3DCD1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {64E9D29F-1F71-44A8-ABA4-2001A4E3DCD1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {64E9D29F-1F71-44A8-ABA4-2001A4E3DCD1}.Release|Any CPU.Build.0 = Release|Any CPU + {DC2F0113-2B6B-44C9-BDAC-E0A82EC06722}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DC2F0113-2B6B-44C9-BDAC-E0A82EC06722}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DC2F0113-2B6B-44C9-BDAC-E0A82EC06722}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DC2F0113-2B6B-44C9-BDAC-E0A82EC06722}.Release|Any CPU.Build.0 = Release|Any CPU + {1B1EF9C7-BDE9-48E1-A3DC-FF87DBE12503}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1B1EF9C7-BDE9-48E1-A3DC-FF87DBE12503}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1B1EF9C7-BDE9-48E1-A3DC-FF87DBE12503}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1B1EF9C7-BDE9-48E1-A3DC-FF87DBE12503}.Release|Any CPU.Build.0 = Release|Any CPU + {B7797C67-28D2-4C0C-9753-9E43C824E452}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B7797C67-28D2-4C0C-9753-9E43C824E452}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B7797C67-28D2-4C0C-9753-9E43C824E452}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B7797C67-28D2-4C0C-9753-9E43C824E452}.Release|Any CPU.Build.0 = Release|Any CPU + {1E4D2FC6-6146-4375-AC61-C74FD27B3C4B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1E4D2FC6-6146-4375-AC61-C74FD27B3C4B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1E4D2FC6-6146-4375-AC61-C74FD27B3C4B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1E4D2FC6-6146-4375-AC61-C74FD27B3C4B}.Release|Any CPU.Build.0 = Release|Any CPU + {A5A3FC0E-379A-43D7-909B-395EA6D2E1C0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A5A3FC0E-379A-43D7-909B-395EA6D2E1C0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A5A3FC0E-379A-43D7-909B-395EA6D2E1C0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A5A3FC0E-379A-43D7-909B-395EA6D2E1C0}.Release|Any CPU.Build.0 = Release|Any CPU + {A2ADB115-27FE-4E19-A640-016231B94762}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A2ADB115-27FE-4E19-A640-016231B94762}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A2ADB115-27FE-4E19-A640-016231B94762}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A2ADB115-27FE-4E19-A640-016231B94762}.Release|Any CPU.Build.0 = Release|Any CPU + {AE07F89A-476F-456F-A15E-A081E281499D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AE07F89A-476F-456F-A15E-A081E281499D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AE07F89A-476F-456F-A15E-A081E281499D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AE07F89A-476F-456F-A15E-A081E281499D}.Release|Any CPU.Build.0 = Release|Any CPU + {482BFF5C-548C-4588-86EF-70779A2A0B7C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {482BFF5C-548C-4588-86EF-70779A2A0B7C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {482BFF5C-548C-4588-86EF-70779A2A0B7C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {482BFF5C-548C-4588-86EF-70779A2A0B7C}.Release|Any CPU.Build.0 = Release|Any CPU + {E78162CC-3E79-4A5E-BCD5-BF24D6F8A63F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E78162CC-3E79-4A5E-BCD5-BF24D6F8A63F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E78162CC-3E79-4A5E-BCD5-BF24D6F8A63F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E78162CC-3E79-4A5E-BCD5-BF24D6F8A63F}.Release|Any CPU.Build.0 = Release|Any CPU + {0EB3B7AC-DBC3-45A9-877D-C0AF04F8D229}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0EB3B7AC-DBC3-45A9-877D-C0AF04F8D229}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0EB3B7AC-DBC3-45A9-877D-C0AF04F8D229}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0EB3B7AC-DBC3-45A9-877D-C0AF04F8D229}.Release|Any CPU.Build.0 = Release|Any CPU + {533F261E-8449-4D16-8873-57D1E578D081}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {533F261E-8449-4D16-8873-57D1E578D081}.Debug|Any CPU.Build.0 = Debug|Any CPU + {533F261E-8449-4D16-8873-57D1E578D081}.Release|Any CPU.ActiveCfg = Release|Any CPU + {533F261E-8449-4D16-8873-57D1E578D081}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {DC2F0113-2B6B-44C9-BDAC-E0A82EC06722} = {A7AD74F7-DCEF-411B-9913-228A914A7234} + {1B1EF9C7-BDE9-48E1-A3DC-FF87DBE12503} = {A7AD74F7-DCEF-411B-9913-228A914A7234} + {1E4D2FC6-6146-4375-AC61-C74FD27B3C4B} = {A7AD74F7-DCEF-411B-9913-228A914A7234} + {482BFF5C-548C-4588-86EF-70779A2A0B7C} = {A7AD74F7-DCEF-411B-9913-228A914A7234} + {E78162CC-3E79-4A5E-BCD5-BF24D6F8A63F} = {A7AD74F7-DCEF-411B-9913-228A914A7234} + {0EB3B7AC-DBC3-45A9-877D-C0AF04F8D229} = {A7AD74F7-DCEF-411B-9913-228A914A7234} + {533F261E-8449-4D16-8873-57D1E578D081} = {A7AD74F7-DCEF-411B-9913-228A914A7234} + EndGlobalSection +EndGlobal diff --git a/src/cs/LionWeb.Integration.Build/Generate.cs b/src/cs/LionWeb.Integration.Build/Generate.cs new file mode 100644 index 0000000..5122de0 --- /dev/null +++ b/src/cs/LionWeb.Integration.Build/Generate.cs @@ -0,0 +1,64 @@ +// Copyright 2024 TRUMPF Laser SE and other contributors +// +// Licensed 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. +// +// SPDX-FileCopyrightText: 2024 TRUMPF Laser SE and other contributors +// SPDX-License-Identifier: Apache-2.0 + +using LionWeb.Core; +using LionWeb.Core.M2; +using LionWeb.Core.M3; +using LionWeb.Core.Serialization; +using LionWeb.Generator; +using LionWeb.Generator.Names; + +foreach (LionWebVersions lionWebVersion in LionWebVersions.AllPureVersions) +{ + Console.WriteLine($"\n### LionWeb specification version: {lionWebVersion}\n"); + + var shapesLanguage = DeserializeExternalLanguage(lionWebVersion, "shapes").First(); + var testLanguage = DeserializeExternalLanguage(lionWebVersion, "testLanguage").First(); + + var lionWebVersionDirectory = "V" + lionWebVersion.VersionString.Replace('.', '_'); + string prefix = $"LionWeb.Integration.Languages.Generated.{lionWebVersionDirectory}"; + List names = + [ + new(shapesLanguage, $"{prefix}.Shapes.M2"), + new(testLanguage, $"{prefix}.TestLanguage.M2") + ]; + + var generationPath = $"../../../../LionWeb.Integration.Languages/Generated/{lionWebVersionDirectory}"; + Directory.CreateDirectory(generationPath); + + foreach (var name in names) + { + var generator = new GeneratorFacade { Names = name, LionWebVersion = lionWebVersion}; + generator.Generate(); + Console.WriteLine($"generated code for: {name.Language.Name}"); + + var path = @$"{generationPath}/{name.Language.Name}.g.cs"; + generator.Persist(path); + Console.WriteLine($"persisted to: {path}"); + } +} + +return; + +DynamicLanguage[] DeserializeExternalLanguage(LionWebVersions lionWebVersion, string name, params Language[] dependentLanguages) +{ + SerializationChunk serializationChunk = JsonUtils.ReadJsonFromString(File.ReadAllText($"../../../../../languages/{name}.{lionWebVersion.VersionString}.json")); + return new LanguageDeserializer(lionWebVersion) + { + StoreUncompressedIds = true + }.Deserialize(serializationChunk, dependentLanguages).ToArray(); +} diff --git a/src/cs/LionWeb.Integration.Build/LionWeb.Integration.Build.csproj b/src/cs/LionWeb.Integration.Build/LionWeb.Integration.Build.csproj new file mode 100644 index 0000000..72187e2 --- /dev/null +++ b/src/cs/LionWeb.Integration.Build/LionWeb.Integration.Build.csproj @@ -0,0 +1,27 @@ + + + + Exe + LionWeb.Integration.Build + + + + + + + + + + languages\shapes.2023.1.json + + + languages\shapes.2024.1.json + + + languages\testLanguage.2023.1.json + + + languages\testLanguage.2024.1.json + + + diff --git a/src/cs/LionWeb.Integration.Languages/Generated/V2023_1/Shapes.g.cs b/src/cs/LionWeb.Integration.Languages/Generated/V2023_1/Shapes.g.cs new file mode 100644 index 0000000..77ffd1e --- /dev/null +++ b/src/cs/LionWeb.Integration.Languages/Generated/V2023_1/Shapes.g.cs @@ -0,0 +1,2637 @@ +// Generated by the C# M2TypesGenerator: modify at your own risk! +// ReSharper disable InconsistentNaming +// ReSharper disable SuggestVarOrType_SimpleTypes +// ReSharper disable SuggestVarOrType_Elsewhere +#pragma warning disable 1591 +#nullable enable +namespace LionWeb.Integration.Languages.Generated.V2023_1.Shapes.M2; +using LionWeb.Core; +using LionWeb.Core.M1.Event.Partition; +using LionWeb.Core.M1.Event.Partition.Emitter; +using LionWeb.Core.M2; +using LionWeb.Core.M3; +using LionWeb.Core.Utilities; +using LionWeb.Core.VersionSpecific.V2023_1; +using System; +using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; +using Time = string; + +[LionCoreLanguage(Key = "key-Shapes", Version = "1")] +public partial class ShapesLanguage : LanguageBase +{ + public static readonly ShapesLanguage Instance = new Lazy(() => new("id-Shapes")).Value; + public ShapesLanguage(string id) : base(id, LionWebVersions.v2023_1) + { + _billOfMaterials = new(() => new AnnotationBase("id-BillOfMaterials", this) { Key = "key-BillOfMaterials", Name = "BillOfMaterials", AnnotatesLazy = new(() => _builtIns.Node), FeaturesLazy = new(() => [BillOfMaterials_altGroups, BillOfMaterials_defaultGroup, BillOfMaterials_groups, BillOfMaterials_materials]) }); + _billOfMaterials_altGroups = new(() => new ContainmentBase("id-alt-groups", BillOfMaterials, this) { Key = "key-alt-groups", Name = "altGroups", Optional = true, Multiple = true, Type = MaterialGroup }); + _billOfMaterials_defaultGroup = new(() => new ContainmentBase("id-default-group", BillOfMaterials, this) { Key = "key-default-group", Name = "defaultGroup", Optional = true, Multiple = false, Type = MaterialGroup }); + _billOfMaterials_groups = new(() => new ContainmentBase("id-groups", BillOfMaterials, this) { Key = "key-groups", Name = "groups", Optional = true, Multiple = true, Type = MaterialGroup }); + _billOfMaterials_materials = new(() => new ReferenceBase("id-materials", BillOfMaterials, this) { Key = "key-materials", Name = "materials", Optional = true, Multiple = true, Type = IShape }); + _circle = new(() => new ConceptBase("id-Circle", this) { Key = "key-Circle", Name = "Circle", Abstract = false, Partition = false, ExtendsLazy = new(() => Shape), FeaturesLazy = new(() => [Circle_center, Circle_r]) }); + _circle_center = new(() => new ContainmentBase("id-center", Circle, this) { Key = "key-center", Name = "center", Optional = false, Multiple = false, Type = Coord }); + _circle_r = new(() => new PropertyBase("id-r", Circle, this) { Key = "key-r", Name = "r", Optional = false, Type = _builtIns.Integer }); + _compositeShape = new(() => new ConceptBase("id-CompositeShape", this) { Key = "key-CompositeShape", Name = "CompositeShape", Abstract = false, Partition = false, ExtendsLazy = new(() => Shape), FeaturesLazy = new(() => [CompositeShape_disabledParts, CompositeShape_evilPart, CompositeShape_parts]) }); + _compositeShape_disabledParts = new(() => new ContainmentBase("id-disabled-parts", CompositeShape, this) { Key = "key-disabled-parts", Name = "disabledParts", Optional = false, Multiple = true, Type = IShape }); + _compositeShape_evilPart = new(() => new ContainmentBase("id-evil-part", CompositeShape, this) { Key = "key-evil-part", Name = "evilPart", Optional = false, Multiple = false, Type = IShape }); + _compositeShape_parts = new(() => new ContainmentBase("id-parts", CompositeShape, this) { Key = "key-parts", Name = "parts", Optional = false, Multiple = true, Type = IShape }); + _coord = new(() => new ConceptBase("id-Coord", this) { Key = "key-Coord", Name = "Coord", Abstract = false, Partition = false, FeaturesLazy = new(() => [Coord_x, Coord_y, Coord_z]) }); + _coord_x = new(() => new PropertyBase("id-x", Coord, this) { Key = "key-x", Name = "x", Optional = false, Type = _builtIns.Integer }); + _coord_y = new(() => new PropertyBase("id-y", Coord, this) { Key = "key-y", Name = "y", Optional = false, Type = _builtIns.Integer }); + _coord_z = new(() => new PropertyBase("id-z", Coord, this) { Key = "key-z", Name = "z", Optional = false, Type = _builtIns.Integer }); + _documentation = new(() => new AnnotationBase("id-Documentation", this) { Key = "key-Documentation", Name = "Documentation", AnnotatesLazy = new(() => Shape), FeaturesLazy = new(() => [Documentation_technical, Documentation_text]) }); + _documentation_technical = new(() => new PropertyBase("id-technical", Documentation, this) { Key = "key-technical", Name = "technical", Optional = true, Type = _builtIns.Boolean }); + _documentation_text = new(() => new PropertyBase("id-text", Documentation, this) { Key = "key-text", Name = "text", Optional = true, Type = _builtIns.String }); + _geometry = new(() => new ConceptBase("id-Geometry", this) { Key = "key-Geometry", Name = "Geometry", Abstract = false, Partition = true, FeaturesLazy = new(() => [Geometry_documentation, Geometry_shapes]) }); + _geometry_documentation = new(() => new ContainmentBase("id-documentation", Geometry, this) { Key = "key-documentation", Name = "documentation", Optional = true, Multiple = false, Type = Documentation }); + _geometry_shapes = new(() => new ContainmentBase("id-shapes", Geometry, this) { Key = "key-shapes", Name = "shapes", Optional = true, Multiple = true, Type = IShape }); + _iShape = new(() => new InterfaceBase("id-IShape", this) { Key = "key-IShape", Name = "IShape", FeaturesLazy = new(() => [IShape_fixpoints, IShape_uuid]) }); + _iShape_fixpoints = new(() => new ContainmentBase("id-fixpoints", IShape, this) { Key = "key-fixpoints", Name = "fixpoints", Optional = true, Multiple = true, Type = Coord }); + _iShape_uuid = new(() => new PropertyBase("id-uuid", IShape, this) { Key = "key-uuid", Name = "uuid", Optional = false, Type = _builtIns.String }); + _line = new(() => new ConceptBase("id-Line", this) { Key = "key-Line", Name = "Line", Abstract = false, Partition = false, ExtendsLazy = new(() => Shape), ImplementsLazy = new(() => [_builtIns.INamed]), FeaturesLazy = new(() => [Line_end, Line_start]) }); + _line_end = new(() => new ContainmentBase("id-end", Line, this) { Key = "key-end", Name = "end", Optional = false, Multiple = false, Type = Coord }); + _line_start = new(() => new ContainmentBase("id-start", Line, this) { Key = "key-start", Name = "start", Optional = false, Multiple = false, Type = Coord }); + _materialGroup = new(() => new ConceptBase("id-MaterialGroup", this) { Key = "key-MaterialGroup", Name = "MaterialGroup", Abstract = false, Partition = false, FeaturesLazy = new(() => [MaterialGroup_defaultShape, MaterialGroup_materials, MaterialGroup_matterState]) }); + _materialGroup_defaultShape = new(() => new ContainmentBase("id-default-shape", MaterialGroup, this) { Key = "key-default-shape", Name = "defaultShape", Optional = true, Multiple = false, Type = IShape }); + _materialGroup_materials = new(() => new ReferenceBase("id-group-materials", MaterialGroup, this) { Key = "key-group-materials", Name = "materials", Optional = false, Multiple = true, Type = IShape }); + _materialGroup_matterState = new(() => new PropertyBase("id-matter-state", MaterialGroup, this) { Key = "key-matter-state", Name = "matterState", Optional = true, Type = MatterState }); + _matterState = new(() => new EnumerationBase("id-MatterState", this) { Key = "key-MatterState", Name = "MatterState", LiteralsLazy = new(() => [MatterState_gas, MatterState_liquid, MatterState_solid]) }); + _matterState_gas = new(() => new EnumerationLiteralBase("id-gas", MatterState, this) { Key = "key-gas", Name = "gas" }); + _matterState_liquid = new(() => new EnumerationLiteralBase("id-liquid", MatterState, this) { Key = "key-liquid", Name = "liquid" }); + _matterState_solid = new(() => new EnumerationLiteralBase("id-solid", MatterState, this) { Key = "key-solid", Name = "solid" }); + _offsetDuplicate = new(() => new ConceptBase("id-OffsetDuplicate", this) { Key = "key-OffsetDuplicate", Name = "OffsetDuplicate", Abstract = false, Partition = false, ExtendsLazy = new(() => Shape), FeaturesLazy = new(() => [OffsetDuplicate_altSource, OffsetDuplicate_docs, OffsetDuplicate_offset, OffsetDuplicate_secretDocs, OffsetDuplicate_source]) }); + _offsetDuplicate_altSource = new(() => new ReferenceBase("id-alt-source", OffsetDuplicate, this) { Key = "key-alt-source", Name = "altSource", Optional = true, Multiple = false, Type = Shape }); + _offsetDuplicate_docs = new(() => new ContainmentBase("id-docs", OffsetDuplicate, this) { Key = "key-docs", Name = "docs", Optional = true, Multiple = false, Type = Documentation }); + _offsetDuplicate_offset = new(() => new ContainmentBase("id-offset", OffsetDuplicate, this) { Key = "key-offset", Name = "offset", Optional = false, Multiple = false, Type = Coord }); + _offsetDuplicate_secretDocs = new(() => new ContainmentBase("id-secret-docs", OffsetDuplicate, this) { Key = "key-secret-docs", Name = "secretDocs", Optional = true, Multiple = false, Type = Documentation }); + _offsetDuplicate_source = new(() => new ReferenceBase("id-source", OffsetDuplicate, this) { Key = "key-source", Name = "source", Optional = false, Multiple = false, Type = Shape }); + _referenceGeometry = new(() => new ConceptBase("id-ReferenceGeometry", this) { Key = "key-ReferenceGeometry", Name = "ReferenceGeometry", Abstract = false, Partition = true, FeaturesLazy = new(() => [ReferenceGeometry_shapes]) }); + _referenceGeometry_shapes = new(() => new ReferenceBase("id-shape-references", ReferenceGeometry, this) { Key = "key-shapes-references", Name = "shapes", Optional = true, Multiple = true, Type = IShape }); + _shape = new(() => new ConceptBase("id-Shape", this) { Key = "key-Shape", Name = "Shape", Abstract = true, Partition = false, ImplementsLazy = new(() => [_builtIns.INamed, IShape]), FeaturesLazy = new(() => [Shape_shapeDocs]) }); + _shape_shapeDocs = new(() => new ContainmentBase("id-shape-docs", Shape, this) { Key = "key-shape-docs", Name = "shapeDocs", Optional = true, Multiple = false, Type = Documentation }); + _time = new(() => new PrimitiveTypeBase("id-Time", this) { Key = "key-Time", Name = "Time" }); + _factory = new ShapesFactory(this); + } + + /// + public override IReadOnlyList Entities => [BillOfMaterials, Circle, CompositeShape, Coord, Documentation, Geometry, IShape, Line, MaterialGroup, MatterState, OffsetDuplicate, ReferenceGeometry, Shape]; + /// + public override IReadOnlyList DependsOn => []; + + private const string _key = "key-Shapes"; + /// + public override string Key => _key; + + private const string _name = "Shapes"; + /// + public override string Name => _name; + + private const string _version = "1"; + /// + public override string Version => _version; + + private readonly Lazy _billOfMaterials; + public Annotation BillOfMaterials => _billOfMaterials.Value; + + private readonly Lazy _billOfMaterials_altGroups; + public Containment BillOfMaterials_altGroups => _billOfMaterials_altGroups.Value; + + private readonly Lazy _billOfMaterials_defaultGroup; + public Containment BillOfMaterials_defaultGroup => _billOfMaterials_defaultGroup.Value; + + private readonly Lazy _billOfMaterials_groups; + public Containment BillOfMaterials_groups => _billOfMaterials_groups.Value; + + private readonly Lazy _billOfMaterials_materials; + public Reference BillOfMaterials_materials => _billOfMaterials_materials.Value; + + private readonly Lazy _circle; + public Concept Circle => _circle.Value; + + private readonly Lazy _circle_center; + public Containment Circle_center => _circle_center.Value; + + private readonly Lazy _circle_r; + public Property Circle_r => _circle_r.Value; + + private readonly Lazy _compositeShape; + public Concept CompositeShape => _compositeShape.Value; + + private readonly Lazy _compositeShape_disabledParts; + public Containment CompositeShape_disabledParts => _compositeShape_disabledParts.Value; + + private readonly Lazy _compositeShape_evilPart; + public Containment CompositeShape_evilPart => _compositeShape_evilPart.Value; + + private readonly Lazy _compositeShape_parts; + public Containment CompositeShape_parts => _compositeShape_parts.Value; + + private readonly Lazy _coord; + public Concept Coord => _coord.Value; + + private readonly Lazy _coord_x; + public Property Coord_x => _coord_x.Value; + + private readonly Lazy _coord_y; + public Property Coord_y => _coord_y.Value; + + private readonly Lazy _coord_z; + public Property Coord_z => _coord_z.Value; + + private readonly Lazy _documentation; + public Annotation Documentation => _documentation.Value; + + private readonly Lazy _documentation_technical; + public Property Documentation_technical => _documentation_technical.Value; + + private readonly Lazy _documentation_text; + public Property Documentation_text => _documentation_text.Value; + + private readonly Lazy _geometry; + public Concept Geometry => _geometry.Value; + + private readonly Lazy _geometry_documentation; + public Containment Geometry_documentation => _geometry_documentation.Value; + + private readonly Lazy _geometry_shapes; + public Containment Geometry_shapes => _geometry_shapes.Value; + + private readonly Lazy _iShape; + public Interface IShape => _iShape.Value; + + private readonly Lazy _iShape_fixpoints; + public Containment IShape_fixpoints => _iShape_fixpoints.Value; + + private readonly Lazy _iShape_uuid; + public Property IShape_uuid => _iShape_uuid.Value; + + private readonly Lazy _line; + public Concept Line => _line.Value; + + private readonly Lazy _line_end; + public Containment Line_end => _line_end.Value; + + private readonly Lazy _line_start; + public Containment Line_start => _line_start.Value; + + private readonly Lazy _materialGroup; + public Concept MaterialGroup => _materialGroup.Value; + + private readonly Lazy _materialGroup_defaultShape; + public Containment MaterialGroup_defaultShape => _materialGroup_defaultShape.Value; + + private readonly Lazy _materialGroup_materials; + public Reference MaterialGroup_materials => _materialGroup_materials.Value; + + private readonly Lazy _materialGroup_matterState; + public Property MaterialGroup_matterState => _materialGroup_matterState.Value; + + private readonly Lazy _matterState; + public Enumeration MatterState => _matterState.Value; + + private readonly Lazy _matterState_gas; + public EnumerationLiteral MatterState_gas => _matterState_gas.Value; + + private readonly Lazy _matterState_liquid; + public EnumerationLiteral MatterState_liquid => _matterState_liquid.Value; + + private readonly Lazy _matterState_solid; + public EnumerationLiteral MatterState_solid => _matterState_solid.Value; + + private readonly Lazy _offsetDuplicate; + public Concept OffsetDuplicate => _offsetDuplicate.Value; + + private readonly Lazy _offsetDuplicate_altSource; + public Reference OffsetDuplicate_altSource => _offsetDuplicate_altSource.Value; + + private readonly Lazy _offsetDuplicate_docs; + public Containment OffsetDuplicate_docs => _offsetDuplicate_docs.Value; + + private readonly Lazy _offsetDuplicate_offset; + public Containment OffsetDuplicate_offset => _offsetDuplicate_offset.Value; + + private readonly Lazy _offsetDuplicate_secretDocs; + public Containment OffsetDuplicate_secretDocs => _offsetDuplicate_secretDocs.Value; + + private readonly Lazy _offsetDuplicate_source; + public Reference OffsetDuplicate_source => _offsetDuplicate_source.Value; + + private readonly Lazy _referenceGeometry; + public Concept ReferenceGeometry => _referenceGeometry.Value; + + private readonly Lazy _referenceGeometry_shapes; + public Reference ReferenceGeometry_shapes => _referenceGeometry_shapes.Value; + + private readonly Lazy _shape; + public Concept Shape => _shape.Value; + + private readonly Lazy _shape_shapeDocs; + public Containment Shape_shapeDocs => _shape_shapeDocs.Value; + + private readonly Lazy _time; + public PrimitiveType Time => _time.Value; +} + +public partial interface IShapesFactory : INodeFactory +{ + public BillOfMaterials NewBillOfMaterials(string id); + public BillOfMaterials CreateBillOfMaterials(); + public Circle NewCircle(string id); + public Circle CreateCircle(); + public CompositeShape NewCompositeShape(string id); + public CompositeShape CreateCompositeShape(); + public Coord NewCoord(string id); + public Coord CreateCoord(); + public Documentation NewDocumentation(string id); + public Documentation CreateDocumentation(); + public Geometry NewGeometry(string id); + public Geometry CreateGeometry(); + public Line NewLine(string id); + public Line CreateLine(); + public MaterialGroup NewMaterialGroup(string id); + public MaterialGroup CreateMaterialGroup(); + public OffsetDuplicate NewOffsetDuplicate(string id); + public OffsetDuplicate CreateOffsetDuplicate(); + public ReferenceGeometry NewReferenceGeometry(string id); + public ReferenceGeometry CreateReferenceGeometry(); +} + +public class ShapesFactory : AbstractBaseNodeFactory, IShapesFactory +{ + private readonly ShapesLanguage _language; + public ShapesFactory(ShapesLanguage language) : base(language) + { + _language = language; + } + + /// + public override INode CreateNode(string id, Classifier classifier) + { + if (_language.BillOfMaterials.EqualsIdentity(classifier)) + return NewBillOfMaterials(id); + if (_language.Circle.EqualsIdentity(classifier)) + return NewCircle(id); + if (_language.CompositeShape.EqualsIdentity(classifier)) + return NewCompositeShape(id); + if (_language.Coord.EqualsIdentity(classifier)) + return NewCoord(id); + if (_language.Documentation.EqualsIdentity(classifier)) + return NewDocumentation(id); + if (_language.Geometry.EqualsIdentity(classifier)) + return NewGeometry(id); + if (_language.Line.EqualsIdentity(classifier)) + return NewLine(id); + if (_language.MaterialGroup.EqualsIdentity(classifier)) + return NewMaterialGroup(id); + if (_language.OffsetDuplicate.EqualsIdentity(classifier)) + return NewOffsetDuplicate(id); + if (_language.ReferenceGeometry.EqualsIdentity(classifier)) + return NewReferenceGeometry(id); + throw new UnsupportedClassifierException(classifier); + } + + /// + public override Enum GetEnumerationLiteral(EnumerationLiteral literal) + { + if (_language.MatterState.EqualsIdentity(literal.GetEnumeration())) + return EnumValueFor(literal); + throw new UnsupportedEnumerationLiteralException(literal); + } + + /// + public override IStructuredDataTypeInstance CreateStructuredDataTypeInstance(StructuredDataType structuredDataType, IFieldValues fieldValues) + { + throw new UnsupportedStructuredDataTypeException(structuredDataType); + } + + public virtual BillOfMaterials NewBillOfMaterials(string id) => new(id); + public virtual BillOfMaterials CreateBillOfMaterials() => NewBillOfMaterials(GetNewId()); + public virtual Circle NewCircle(string id) => new(id); + public virtual Circle CreateCircle() => NewCircle(GetNewId()); + public virtual CompositeShape NewCompositeShape(string id) => new(id); + public virtual CompositeShape CreateCompositeShape() => NewCompositeShape(GetNewId()); + public virtual Coord NewCoord(string id) => new(id); + public virtual Coord CreateCoord() => NewCoord(GetNewId()); + public virtual Documentation NewDocumentation(string id) => new(id); + public virtual Documentation CreateDocumentation() => NewDocumentation(GetNewId()); + public virtual Geometry NewGeometry(string id) => new(id); + public virtual Geometry CreateGeometry() => NewGeometry(GetNewId()); + public virtual Line NewLine(string id) => new(id); + public virtual Line CreateLine() => NewLine(GetNewId()); + public virtual MaterialGroup NewMaterialGroup(string id) => new(id); + public virtual MaterialGroup CreateMaterialGroup() => NewMaterialGroup(GetNewId()); + public virtual OffsetDuplicate NewOffsetDuplicate(string id) => new(id); + public virtual OffsetDuplicate CreateOffsetDuplicate() => NewOffsetDuplicate(GetNewId()); + public virtual ReferenceGeometry NewReferenceGeometry(string id) => new(id); + public virtual ReferenceGeometry CreateReferenceGeometry() => NewReferenceGeometry(GetNewId()); +} + +[LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-BillOfMaterials")] +public partial class BillOfMaterials : AnnotationInstanceBase +{ + private readonly List _altGroups = []; + /// Optional Multiple Containment + [LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-alt-groups")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Containment, Optional = true, Multiple = true)] + public IReadOnlyList AltGroups { get => _altGroups.AsReadOnly(); init => AddAltGroups(value); } + + /// Optional Multiple Containment + public bool TryGetAltGroups([NotNullWhenAttribute(true)] out IReadOnlyList altGroups) + { + altGroups = _altGroups; + return _altGroups.Count != 0; + } + + /// Optional Multiple Containment + public BillOfMaterials AddAltGroups(IEnumerable nodes) + { + var safeNodes = nodes?.ToList(); + AssureNotNull(safeNodes, ShapesLanguage.Instance.BillOfMaterials_altGroups); + AssureNotNullMembers(safeNodes, ShapesLanguage.Instance.BillOfMaterials_altGroups); + ContainmentAddMultipleEventEmitter evt = new(ShapesLanguage.Instance.BillOfMaterials_altGroups, this, safeNodes, _altGroups, null); + evt.CollectOldData(); + _altGroups.AddRange(SetSelfParent(safeNodes, ShapesLanguage.Instance.BillOfMaterials_altGroups)); + evt.RaiseEvent(); + return this; + } + + /// Optional Multiple Containment + public BillOfMaterials InsertAltGroups(int index, IEnumerable nodes) + { + AssureInRange(index, _altGroups); + var safeNodes = nodes?.ToList(); + AssureNotNull(safeNodes, ShapesLanguage.Instance.BillOfMaterials_altGroups); + AssureNoSelfMove(index, safeNodes, _altGroups); + AssureNotNullMembers(safeNodes, ShapesLanguage.Instance.BillOfMaterials_altGroups); + ContainmentAddMultipleEventEmitter evt = new(ShapesLanguage.Instance.BillOfMaterials_altGroups, this, safeNodes, _altGroups, index); + evt.CollectOldData(); + _altGroups.InsertRange(index, SetSelfParent(safeNodes, ShapesLanguage.Instance.BillOfMaterials_altGroups)); + evt.RaiseEvent(); + return this; + } + + /// Optional Multiple Containment + public BillOfMaterials RemoveAltGroups(IEnumerable nodes) + { + RemoveSelfParent(nodes?.ToList(), _altGroups, ShapesLanguage.Instance.BillOfMaterials_altGroups, ContainmentRemover(ShapesLanguage.Instance.BillOfMaterials_altGroups)); + return this; + } + + private MaterialGroup? _defaultGroup = null; + /// Optional Single Containment + [LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-default-group")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Containment, Optional = true, Multiple = true)] + public MaterialGroup? DefaultGroup { get => _defaultGroup; set => SetDefaultGroup(value); } + + /// Optional Single Containment + public bool TryGetDefaultGroup([NotNullWhenAttribute(true)] out MaterialGroup? defaultGroup) + { + defaultGroup = _defaultGroup; + return _defaultGroup != null; + } + + /// Optional Single Containment + public BillOfMaterials SetDefaultGroup(MaterialGroup? value) + { + ContainmentSingleEventEmitter evt = new(ShapesLanguage.Instance.BillOfMaterials_defaultGroup, this, value, _defaultGroup); + evt.CollectOldData(); + SetParentNull(_defaultGroup); + AttachChild(value); + _defaultGroup = value; + evt.RaiseEvent(); + return this; + } + + private readonly List _groups = []; + /// Optional Multiple Containment + [LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-groups")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Containment, Optional = true, Multiple = true)] + public IReadOnlyList Groups { get => _groups.AsReadOnly(); init => AddGroups(value); } + + /// Optional Multiple Containment + public bool TryGetGroups([NotNullWhenAttribute(true)] out IReadOnlyList groups) + { + groups = _groups; + return _groups.Count != 0; + } + + /// Optional Multiple Containment + public BillOfMaterials AddGroups(IEnumerable nodes) + { + var safeNodes = nodes?.ToList(); + AssureNotNull(safeNodes, ShapesLanguage.Instance.BillOfMaterials_groups); + AssureNotNullMembers(safeNodes, ShapesLanguage.Instance.BillOfMaterials_groups); + ContainmentAddMultipleEventEmitter evt = new(ShapesLanguage.Instance.BillOfMaterials_groups, this, safeNodes, _groups, null); + evt.CollectOldData(); + _groups.AddRange(SetSelfParent(safeNodes, ShapesLanguage.Instance.BillOfMaterials_groups)); + evt.RaiseEvent(); + return this; + } + + /// Optional Multiple Containment + public BillOfMaterials InsertGroups(int index, IEnumerable nodes) + { + AssureInRange(index, _groups); + var safeNodes = nodes?.ToList(); + AssureNotNull(safeNodes, ShapesLanguage.Instance.BillOfMaterials_groups); + AssureNoSelfMove(index, safeNodes, _groups); + AssureNotNullMembers(safeNodes, ShapesLanguage.Instance.BillOfMaterials_groups); + ContainmentAddMultipleEventEmitter evt = new(ShapesLanguage.Instance.BillOfMaterials_groups, this, safeNodes, _groups, index); + evt.CollectOldData(); + _groups.InsertRange(index, SetSelfParent(safeNodes, ShapesLanguage.Instance.BillOfMaterials_groups)); + evt.RaiseEvent(); + return this; + } + + /// Optional Multiple Containment + public BillOfMaterials RemoveGroups(IEnumerable nodes) + { + RemoveSelfParent(nodes?.ToList(), _groups, ShapesLanguage.Instance.BillOfMaterials_groups, ContainmentRemover(ShapesLanguage.Instance.BillOfMaterials_groups)); + return this; + } + + private readonly List _materials = []; + /// Optional Multiple Reference + [LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-materials")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Reference, Optional = true, Multiple = true)] + public IReadOnlyList Materials { get => _materials.AsReadOnly(); init => AddMaterials(value); } + + /// Optional Multiple Reference + public bool TryGetMaterials([NotNullWhenAttribute(true)] out IReadOnlyList materials) + { + materials = _materials; + return _materials.Count != 0; + } + + /// Optional Multiple Reference + public BillOfMaterials AddMaterials(IEnumerable nodes) + { + var safeNodes = nodes?.ToList(); + AssureNotNull(safeNodes, ShapesLanguage.Instance.BillOfMaterials_materials); + AssureNotNullMembers(safeNodes, ShapesLanguage.Instance.BillOfMaterials_materials); + ReferenceAddMultipleEventEmitter evt = new(ShapesLanguage.Instance.BillOfMaterials_materials, this, safeNodes, _materials.Count); + evt.CollectOldData(); + _materials.AddRange(safeNodes); + evt.RaiseEvent(); + return this; + } + + /// Optional Multiple Reference + public BillOfMaterials InsertMaterials(int index, IEnumerable nodes) + { + AssureInRange(index, _materials); + var safeNodes = nodes?.ToList(); + AssureNotNull(safeNodes, ShapesLanguage.Instance.BillOfMaterials_materials); + AssureNotNullMembers(safeNodes, ShapesLanguage.Instance.BillOfMaterials_materials); + ReferenceAddMultipleEventEmitter evt = new(ShapesLanguage.Instance.BillOfMaterials_materials, this, safeNodes, index); + evt.CollectOldData(); + _materials.InsertRange(index, safeNodes); + evt.RaiseEvent(); + return this; + } + + /// Optional Multiple Reference + public BillOfMaterials RemoveMaterials(IEnumerable nodes) + { + var safeNodes = nodes?.ToList(); + AssureNotNull(safeNodes, ShapesLanguage.Instance.BillOfMaterials_materials); + AssureNotNullMembers(safeNodes, ShapesLanguage.Instance.BillOfMaterials_materials); + RemoveAll(safeNodes, _materials, ReferenceRemover(ShapesLanguage.Instance.BillOfMaterials_materials)); + return this; + } + + public BillOfMaterials(string id) : base(id) + { + } + + /// + public override Annotation GetAnnotation() => ShapesLanguage.Instance.BillOfMaterials; + /// + protected override bool GetInternal(Feature? feature, out Object? result) + { + if (base.GetInternal(feature, out result)) + return true; + if (ShapesLanguage.Instance.BillOfMaterials_altGroups.EqualsIdentity(feature)) + { + result = AltGroups; + return true; + } + + if (ShapesLanguage.Instance.BillOfMaterials_defaultGroup.EqualsIdentity(feature)) + { + result = DefaultGroup; + return true; + } + + if (ShapesLanguage.Instance.BillOfMaterials_groups.EqualsIdentity(feature)) + { + result = Groups; + return true; + } + + if (ShapesLanguage.Instance.BillOfMaterials_materials.EqualsIdentity(feature)) + { + result = Materials; + return true; + } + + return false; + } + + /// + protected override bool SetInternal(Feature? feature, Object? value) + { + if (base.SetInternal(feature, value)) + return true; + if (ShapesLanguage.Instance.BillOfMaterials_altGroups.EqualsIdentity(feature)) + { + var safeNodes = ShapesLanguage.Instance.BillOfMaterials_altGroups.AsNodes(value).ToList(); + ContainmentSetEventEmitter evt = new(ShapesLanguage.Instance.BillOfMaterials_altGroups, this, safeNodes, _altGroups); + evt.CollectOldData(); + RemoveSelfParent(_altGroups.ToList(), _altGroups, ShapesLanguage.Instance.BillOfMaterials_altGroups); + _altGroups.AddRange(SetSelfParent(safeNodes, ShapesLanguage.Instance.BillOfMaterials_altGroups)); + evt.RaiseEvent(); + return true; + } + + if (ShapesLanguage.Instance.BillOfMaterials_defaultGroup.EqualsIdentity(feature)) + { + if (value is null or LionWeb.Integration.Languages.Generated.V2023_1.Shapes.M2.MaterialGroup) + { + DefaultGroup = (LionWeb.Integration.Languages.Generated.V2023_1.Shapes.M2.MaterialGroup?)value; + return true; + } + + throw new InvalidValueException(feature, value); + } + + if (ShapesLanguage.Instance.BillOfMaterials_groups.EqualsIdentity(feature)) + { + var safeNodes = ShapesLanguage.Instance.BillOfMaterials_groups.AsNodes(value).ToList(); + ContainmentSetEventEmitter evt = new(ShapesLanguage.Instance.BillOfMaterials_groups, this, safeNodes, _groups); + evt.CollectOldData(); + RemoveSelfParent(_groups.ToList(), _groups, ShapesLanguage.Instance.BillOfMaterials_groups); + _groups.AddRange(SetSelfParent(safeNodes, ShapesLanguage.Instance.BillOfMaterials_groups)); + evt.RaiseEvent(); + return true; + } + + if (ShapesLanguage.Instance.BillOfMaterials_materials.EqualsIdentity(feature)) + { + var safeNodes = ShapesLanguage.Instance.BillOfMaterials_materials.AsNodes(value).ToList(); + AssureNotNull(safeNodes, ShapesLanguage.Instance.BillOfMaterials_materials); + AssureNotNullMembers(safeNodes, ShapesLanguage.Instance.BillOfMaterials_materials); + ReferenceSetEventEmitter evt = new(ShapesLanguage.Instance.BillOfMaterials_materials, this, safeNodes, _materials); + evt.CollectOldData(); + _materials.Clear(); + _materials.AddRange(safeNodes); + evt.RaiseEvent(); + return true; + } + + return false; + } + + /// + public override IEnumerable CollectAllSetFeatures() + { + List result = base.CollectAllSetFeatures().ToList(); + if (_altGroups.Count != 0) + result.Add(ShapesLanguage.Instance.BillOfMaterials_altGroups); + if (_defaultGroup != default) + result.Add(ShapesLanguage.Instance.BillOfMaterials_defaultGroup); + if (_groups.Count != 0) + result.Add(ShapesLanguage.Instance.BillOfMaterials_groups); + if (_materials.Count != 0) + result.Add(ShapesLanguage.Instance.BillOfMaterials_materials); + return result; + } + + /// + protected override bool DetachChild(INode child) + { + if (base.DetachChild(child)) + return true; + Containment? c = GetContainmentOf(child); + if (ShapesLanguage.Instance.BillOfMaterials_altGroups.EqualsIdentity(c)) + { + RemoveSelfParent(child, _altGroups, ShapesLanguage.Instance.BillOfMaterials_altGroups); + return true; + } + + if (ShapesLanguage.Instance.BillOfMaterials_defaultGroup.EqualsIdentity(c)) + { + _defaultGroup = null; + return true; + } + + if (ShapesLanguage.Instance.BillOfMaterials_groups.EqualsIdentity(c)) + { + RemoveSelfParent(child, _groups, ShapesLanguage.Instance.BillOfMaterials_groups); + return true; + } + + return false; + } + + /// + public override Containment? GetContainmentOf(INode child) + { + Containment? result = base.GetContainmentOf(child); + if (result != null) + return result; + if (child is MaterialGroup child0 && _altGroups.Contains(child0)) + return ShapesLanguage.Instance.BillOfMaterials_altGroups; + if (ReferenceEquals(_defaultGroup, child)) + return ShapesLanguage.Instance.BillOfMaterials_defaultGroup; + if (child is MaterialGroup child2 && _groups.Contains(child2)) + return ShapesLanguage.Instance.BillOfMaterials_groups; + return null; + } +} + +[LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-Circle")] +public partial class Circle : Shape +{ + private Coord? _center = null; + /// Required Single Containment + /// If Center has not been set + /// If set to null + [LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-center")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Containment, Optional = false, Multiple = false)] + public Coord Center { get => _center ?? throw new UnsetFeatureException(ShapesLanguage.Instance.Circle_center); set => SetCenter(value); } + + /// Required Single Containment + public bool TryGetCenter([NotNullWhenAttribute(true)] out Coord? center) + { + center = _center; + return _center != null; + } + + /// Required Single Containment + /// If set to null + public Circle SetCenter(Coord value) + { + AssureNotNull(value, ShapesLanguage.Instance.Circle_center); + ContainmentSingleEventEmitter evt = new(ShapesLanguage.Instance.Circle_center, this, value, _center); + evt.CollectOldData(); + SetParentNull(_center); + AttachChild(value); + _center = value; + evt.RaiseEvent(); + return this; + } + + private int? _r = null; + /// Required Property + /// If R has not been set + [LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-r")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Property, Optional = false, Multiple = false)] + public int R { get => _r ?? throw new UnsetFeatureException(ShapesLanguage.Instance.Circle_r); set => SetR(value); } + + /// Required Property + public bool TryGetR([NotNullWhenAttribute(true)] out int? r) + { + r = _r; + return _r != null; + } + + /// Required Property + public Circle SetR(int value) + { + PropertyEventEmitter evt = new(ShapesLanguage.Instance.Circle_r, this, value, _r); + evt.CollectOldData(); + _r = value; + evt.RaiseEvent(); + return this; + } + + public Circle(string id) : base(id) + { + } + + /// + public override Concept GetConcept() => ShapesLanguage.Instance.Circle; + /// + protected override bool GetInternal(Feature? feature, out Object? result) + { + if (base.GetInternal(feature, out result)) + return true; + if (ShapesLanguage.Instance.Circle_center.EqualsIdentity(feature)) + { + result = Center; + return true; + } + + if (ShapesLanguage.Instance.Circle_r.EqualsIdentity(feature)) + { + result = R; + return true; + } + + return false; + } + + /// + protected override bool SetInternal(Feature? feature, Object? value) + { + if (base.SetInternal(feature, value)) + return true; + if (ShapesLanguage.Instance.Circle_center.EqualsIdentity(feature)) + { + if (value is LionWeb.Integration.Languages.Generated.V2023_1.Shapes.M2.Coord v) + { + Center = v; + return true; + } + + throw new InvalidValueException(feature, value); + } + + if (ShapesLanguage.Instance.Circle_r.EqualsIdentity(feature)) + { + if (value is int v) + { + R = v; + return true; + } + + throw new InvalidValueException(feature, value); + } + + return false; + } + + /// + public override IEnumerable CollectAllSetFeatures() + { + List result = base.CollectAllSetFeatures().ToList(); + if (_center != default) + result.Add(ShapesLanguage.Instance.Circle_center); + if (_r != default) + result.Add(ShapesLanguage.Instance.Circle_r); + return result; + } + + /// + protected override bool DetachChild(INode child) + { + if (base.DetachChild(child)) + return true; + Containment? c = GetContainmentOf(child); + if (ShapesLanguage.Instance.Circle_center.EqualsIdentity(c)) + { + _center = null; + return true; + } + + return false; + } + + /// + public override Containment? GetContainmentOf(INode child) + { + Containment? result = base.GetContainmentOf(child); + if (result != null) + return result; + if (ReferenceEquals(_center, child)) + return ShapesLanguage.Instance.Circle_center; + return null; + } +} + +[LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-CompositeShape")] +public partial class CompositeShape : Shape +{ + private readonly List _disabledParts = []; + /// Required Multiple Containment + /// If DisabledParts is empty + [LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-disabled-parts")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Containment, Optional = false, Multiple = false)] + public IReadOnlyList DisabledParts { get => AsNonEmptyReadOnly(_disabledParts, ShapesLanguage.Instance.CompositeShape_disabledParts); init => AddDisabledParts(value); } + + /// Required Multiple Containment + public bool TryGetDisabledParts([NotNullWhenAttribute(true)] out IReadOnlyList disabledParts) + { + disabledParts = _disabledParts; + return _disabledParts.Count != 0; + } + + /// Required Multiple Containment + /// If both DisabledParts and nodes are empty + public CompositeShape AddDisabledParts(IEnumerable nodes) + { + var safeNodes = nodes?.ToList(); + AssureNonEmpty(safeNodes, _disabledParts, ShapesLanguage.Instance.CompositeShape_disabledParts); + ContainmentAddMultipleEventEmitter evt = new(ShapesLanguage.Instance.CompositeShape_disabledParts, this, safeNodes, _disabledParts, null); + evt.CollectOldData(); + _disabledParts.AddRange(SetSelfParent(safeNodes, ShapesLanguage.Instance.CompositeShape_disabledParts)); + evt.RaiseEvent(); + return this; + } + + /// Required Multiple Containment + /// If both DisabledParts and nodes are empty + /// If index negative or greater than DisabledParts.Count + public CompositeShape InsertDisabledParts(int index, IEnumerable nodes) + { + AssureInRange(index, _disabledParts); + var safeNodes = nodes?.ToList(); + AssureNonEmpty(safeNodes, _disabledParts, ShapesLanguage.Instance.CompositeShape_disabledParts); + AssureNoSelfMove(index, safeNodes, _disabledParts); + ContainmentAddMultipleEventEmitter evt = new(ShapesLanguage.Instance.CompositeShape_disabledParts, this, safeNodes, _disabledParts, index); + evt.CollectOldData(); + _disabledParts.InsertRange(index, SetSelfParent(safeNodes, ShapesLanguage.Instance.CompositeShape_disabledParts)); + evt.RaiseEvent(); + return this; + } + + /// Required Multiple Containment + /// If DisabledParts would be empty + public CompositeShape RemoveDisabledParts(IEnumerable nodes) + { + var safeNodes = nodes?.ToList(); + AssureNotNull(safeNodes, ShapesLanguage.Instance.CompositeShape_disabledParts); + AssureNotClearing(safeNodes, _disabledParts, ShapesLanguage.Instance.CompositeShape_disabledParts); + RemoveSelfParent(safeNodes, _disabledParts, ShapesLanguage.Instance.CompositeShape_disabledParts, ContainmentRemover(ShapesLanguage.Instance.CompositeShape_disabledParts)); + return this; + } + + private IShape? _evilPart = null; + /// Required Single Containment + /// If EvilPart has not been set + /// If set to null + [LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-evil-part")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Containment, Optional = false, Multiple = false)] + public IShape EvilPart { get => _evilPart ?? throw new UnsetFeatureException(ShapesLanguage.Instance.CompositeShape_evilPart); set => SetEvilPart(value); } + + /// Required Single Containment + public bool TryGetEvilPart([NotNullWhenAttribute(true)] out IShape? evilPart) + { + evilPart = _evilPart; + return _evilPart != null; + } + + /// Required Single Containment + /// If set to null + public CompositeShape SetEvilPart(IShape value) + { + AssureNotNull(value, ShapesLanguage.Instance.CompositeShape_evilPart); + ContainmentSingleEventEmitter evt = new(ShapesLanguage.Instance.CompositeShape_evilPart, this, value, _evilPart); + evt.CollectOldData(); + SetParentNull(_evilPart); + AttachChild(value); + _evilPart = value; + evt.RaiseEvent(); + return this; + } + + private readonly List _parts = []; + /// Required Multiple Containment + /// If Parts is empty + [LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-parts")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Containment, Optional = false, Multiple = false)] + public IReadOnlyList Parts { get => AsNonEmptyReadOnly(_parts, ShapesLanguage.Instance.CompositeShape_parts); init => AddParts(value); } + + /// Required Multiple Containment + public bool TryGetParts([NotNullWhenAttribute(true)] out IReadOnlyList parts) + { + parts = _parts; + return _parts.Count != 0; + } + + /// Required Multiple Containment + /// If both Parts and nodes are empty + public CompositeShape AddParts(IEnumerable nodes) + { + var safeNodes = nodes?.ToList(); + AssureNonEmpty(safeNodes, _parts, ShapesLanguage.Instance.CompositeShape_parts); + ContainmentAddMultipleEventEmitter evt = new(ShapesLanguage.Instance.CompositeShape_parts, this, safeNodes, _parts, null); + evt.CollectOldData(); + _parts.AddRange(SetSelfParent(safeNodes, ShapesLanguage.Instance.CompositeShape_parts)); + evt.RaiseEvent(); + return this; + } + + /// Required Multiple Containment + /// If both Parts and nodes are empty + /// If index negative or greater than Parts.Count + public CompositeShape InsertParts(int index, IEnumerable nodes) + { + AssureInRange(index, _parts); + var safeNodes = nodes?.ToList(); + AssureNonEmpty(safeNodes, _parts, ShapesLanguage.Instance.CompositeShape_parts); + AssureNoSelfMove(index, safeNodes, _parts); + ContainmentAddMultipleEventEmitter evt = new(ShapesLanguage.Instance.CompositeShape_parts, this, safeNodes, _parts, index); + evt.CollectOldData(); + _parts.InsertRange(index, SetSelfParent(safeNodes, ShapesLanguage.Instance.CompositeShape_parts)); + evt.RaiseEvent(); + return this; + } + + /// Required Multiple Containment + /// If Parts would be empty + public CompositeShape RemoveParts(IEnumerable nodes) + { + var safeNodes = nodes?.ToList(); + AssureNotNull(safeNodes, ShapesLanguage.Instance.CompositeShape_parts); + AssureNotClearing(safeNodes, _parts, ShapesLanguage.Instance.CompositeShape_parts); + RemoveSelfParent(safeNodes, _parts, ShapesLanguage.Instance.CompositeShape_parts, ContainmentRemover(ShapesLanguage.Instance.CompositeShape_parts)); + return this; + } + + public CompositeShape(string id) : base(id) + { + } + + /// + public override Concept GetConcept() => ShapesLanguage.Instance.CompositeShape; + /// + protected override bool GetInternal(Feature? feature, out Object? result) + { + if (base.GetInternal(feature, out result)) + return true; + if (ShapesLanguage.Instance.CompositeShape_disabledParts.EqualsIdentity(feature)) + { + result = DisabledParts; + return true; + } + + if (ShapesLanguage.Instance.CompositeShape_evilPart.EqualsIdentity(feature)) + { + result = EvilPart; + return true; + } + + if (ShapesLanguage.Instance.CompositeShape_parts.EqualsIdentity(feature)) + { + result = Parts; + return true; + } + + return false; + } + + /// + protected override bool SetInternal(Feature? feature, Object? value) + { + if (base.SetInternal(feature, value)) + return true; + if (ShapesLanguage.Instance.CompositeShape_disabledParts.EqualsIdentity(feature)) + { + var safeNodes = ShapesLanguage.Instance.CompositeShape_disabledParts.AsNodes(value).ToList(); + AssureNonEmpty(safeNodes, ShapesLanguage.Instance.CompositeShape_disabledParts); + ContainmentSetEventEmitter evt = new(ShapesLanguage.Instance.CompositeShape_disabledParts, this, safeNodes, _disabledParts); + evt.CollectOldData(); + RemoveSelfParent(_disabledParts.ToList(), _disabledParts, ShapesLanguage.Instance.CompositeShape_disabledParts); + _disabledParts.AddRange(SetSelfParent(safeNodes, ShapesLanguage.Instance.CompositeShape_disabledParts)); + evt.RaiseEvent(); + return true; + } + + if (ShapesLanguage.Instance.CompositeShape_evilPart.EqualsIdentity(feature)) + { + if (value is LionWeb.Integration.Languages.Generated.V2023_1.Shapes.M2.IShape v) + { + EvilPart = v; + return true; + } + + throw new InvalidValueException(feature, value); + } + + if (ShapesLanguage.Instance.CompositeShape_parts.EqualsIdentity(feature)) + { + var safeNodes = ShapesLanguage.Instance.CompositeShape_parts.AsNodes(value).ToList(); + AssureNonEmpty(safeNodes, ShapesLanguage.Instance.CompositeShape_parts); + ContainmentSetEventEmitter evt = new(ShapesLanguage.Instance.CompositeShape_parts, this, safeNodes, _parts); + evt.CollectOldData(); + RemoveSelfParent(_parts.ToList(), _parts, ShapesLanguage.Instance.CompositeShape_parts); + _parts.AddRange(SetSelfParent(safeNodes, ShapesLanguage.Instance.CompositeShape_parts)); + evt.RaiseEvent(); + return true; + } + + return false; + } + + /// + public override IEnumerable CollectAllSetFeatures() + { + List result = base.CollectAllSetFeatures().ToList(); + if (_disabledParts.Count != 0) + result.Add(ShapesLanguage.Instance.CompositeShape_disabledParts); + if (_evilPart != default) + result.Add(ShapesLanguage.Instance.CompositeShape_evilPart); + if (_parts.Count != 0) + result.Add(ShapesLanguage.Instance.CompositeShape_parts); + return result; + } + + /// + protected override bool DetachChild(INode child) + { + if (base.DetachChild(child)) + return true; + Containment? c = GetContainmentOf(child); + if (ShapesLanguage.Instance.CompositeShape_disabledParts.EqualsIdentity(c)) + { + RemoveSelfParent(child, _disabledParts, ShapesLanguage.Instance.CompositeShape_disabledParts); + return true; + } + + if (ShapesLanguage.Instance.CompositeShape_evilPart.EqualsIdentity(c)) + { + _evilPart = null; + return true; + } + + if (ShapesLanguage.Instance.CompositeShape_parts.EqualsIdentity(c)) + { + RemoveSelfParent(child, _parts, ShapesLanguage.Instance.CompositeShape_parts); + return true; + } + + return false; + } + + /// + public override Containment? GetContainmentOf(INode child) + { + Containment? result = base.GetContainmentOf(child); + if (result != null) + return result; + if (child is IShape child0 && _disabledParts.Contains(child0)) + return ShapesLanguage.Instance.CompositeShape_disabledParts; + if (ReferenceEquals(_evilPart, child)) + return ShapesLanguage.Instance.CompositeShape_evilPart; + if (child is IShape child2 && _parts.Contains(child2)) + return ShapesLanguage.Instance.CompositeShape_parts; + return null; + } +} + +[LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-Coord")] +public partial class Coord : ConceptInstanceBase +{ + private int? _x = null; + /// Required Property + /// If X has not been set + [LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-x")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Property, Optional = false, Multiple = false)] + public int X { get => _x ?? throw new UnsetFeatureException(ShapesLanguage.Instance.Coord_x); set => SetX(value); } + + /// Required Property + public bool TryGetX([NotNullWhenAttribute(true)] out int? x) + { + x = _x; + return _x != null; + } + + /// Required Property + public Coord SetX(int value) + { + PropertyEventEmitter evt = new(ShapesLanguage.Instance.Coord_x, this, value, _x); + evt.CollectOldData(); + _x = value; + evt.RaiseEvent(); + return this; + } + + private int? _y = null; + /// Required Property + /// If Y has not been set + [LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-y")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Property, Optional = false, Multiple = false)] + public int Y { get => _y ?? throw new UnsetFeatureException(ShapesLanguage.Instance.Coord_y); set => SetY(value); } + + /// Required Property + public bool TryGetY([NotNullWhenAttribute(true)] out int? y) + { + y = _y; + return _y != null; + } + + /// Required Property + public Coord SetY(int value) + { + PropertyEventEmitter evt = new(ShapesLanguage.Instance.Coord_y, this, value, _y); + evt.CollectOldData(); + _y = value; + evt.RaiseEvent(); + return this; + } + + private int? _z = null; + /// Required Property + /// If Z has not been set + [LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-z")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Property, Optional = false, Multiple = false)] + public int Z { get => _z ?? throw new UnsetFeatureException(ShapesLanguage.Instance.Coord_z); set => SetZ(value); } + + /// Required Property + public bool TryGetZ([NotNullWhenAttribute(true)] out int? z) + { + z = _z; + return _z != null; + } + + /// Required Property + public Coord SetZ(int value) + { + PropertyEventEmitter evt = new(ShapesLanguage.Instance.Coord_z, this, value, _z); + evt.CollectOldData(); + _z = value; + evt.RaiseEvent(); + return this; + } + + public Coord(string id) : base(id) + { + } + + /// + public override Concept GetConcept() => ShapesLanguage.Instance.Coord; + /// + protected override bool GetInternal(Feature? feature, out Object? result) + { + if (base.GetInternal(feature, out result)) + return true; + if (ShapesLanguage.Instance.Coord_x.EqualsIdentity(feature)) + { + result = X; + return true; + } + + if (ShapesLanguage.Instance.Coord_y.EqualsIdentity(feature)) + { + result = Y; + return true; + } + + if (ShapesLanguage.Instance.Coord_z.EqualsIdentity(feature)) + { + result = Z; + return true; + } + + return false; + } + + /// + protected override bool SetInternal(Feature? feature, Object? value) + { + if (base.SetInternal(feature, value)) + return true; + if (ShapesLanguage.Instance.Coord_x.EqualsIdentity(feature)) + { + if (value is int v) + { + X = v; + return true; + } + + throw new InvalidValueException(feature, value); + } + + if (ShapesLanguage.Instance.Coord_y.EqualsIdentity(feature)) + { + if (value is int v) + { + Y = v; + return true; + } + + throw new InvalidValueException(feature, value); + } + + if (ShapesLanguage.Instance.Coord_z.EqualsIdentity(feature)) + { + if (value is int v) + { + Z = v; + return true; + } + + throw new InvalidValueException(feature, value); + } + + return false; + } + + /// + public override IEnumerable CollectAllSetFeatures() + { + List result = base.CollectAllSetFeatures().ToList(); + if (_x != default) + result.Add(ShapesLanguage.Instance.Coord_x); + if (_y != default) + result.Add(ShapesLanguage.Instance.Coord_y); + if (_z != default) + result.Add(ShapesLanguage.Instance.Coord_z); + return result; + } +} + +[LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-Documentation")] +public partial class Documentation : AnnotationInstanceBase +{ + private bool? _technical = null; + /// Optional Property + [LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-technical")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Property, Optional = true, Multiple = false)] + public bool? Technical { get => _technical; set => SetTechnical(value); } + + /// Optional Property + public bool TryGetTechnical([NotNullWhenAttribute(true)] out bool? technical) + { + technical = _technical; + return _technical != null; + } + + /// Optional Property + public Documentation SetTechnical(bool? value) + { + PropertyEventEmitter evt = new(ShapesLanguage.Instance.Documentation_technical, this, value, _technical); + evt.CollectOldData(); + _technical = value; + evt.RaiseEvent(); + return this; + } + + private string? _text = null; + /// Optional Property + [LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-text")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Property, Optional = true, Multiple = false)] + public string? Text { get => _text; set => SetText(value); } + + /// Optional Property + public bool TryGetText([NotNullWhenAttribute(true)] out string? text) + { + text = _text; + return _text != null; + } + + /// Optional Property + public Documentation SetText(string? value) + { + PropertyEventEmitter evt = new(ShapesLanguage.Instance.Documentation_text, this, value, _text); + evt.CollectOldData(); + _text = value; + evt.RaiseEvent(); + return this; + } + + public Documentation(string id) : base(id) + { + } + + /// + public override Annotation GetAnnotation() => ShapesLanguage.Instance.Documentation; + /// + protected override bool GetInternal(Feature? feature, out Object? result) + { + if (base.GetInternal(feature, out result)) + return true; + if (ShapesLanguage.Instance.Documentation_technical.EqualsIdentity(feature)) + { + result = Technical; + return true; + } + + if (ShapesLanguage.Instance.Documentation_text.EqualsIdentity(feature)) + { + result = Text; + return true; + } + + return false; + } + + /// + protected override bool SetInternal(Feature? feature, Object? value) + { + if (base.SetInternal(feature, value)) + return true; + if (ShapesLanguage.Instance.Documentation_technical.EqualsIdentity(feature)) + { + if (value is null or bool) + { + Technical = (bool?)value; + return true; + } + + throw new InvalidValueException(feature, value); + } + + if (ShapesLanguage.Instance.Documentation_text.EqualsIdentity(feature)) + { + if (value is null or string) + { + Text = (string?)value; + return true; + } + + throw new InvalidValueException(feature, value); + } + + return false; + } + + /// + public override IEnumerable CollectAllSetFeatures() + { + List result = base.CollectAllSetFeatures().ToList(); + if (_technical != default) + result.Add(ShapesLanguage.Instance.Documentation_technical); + if (_text != default) + result.Add(ShapesLanguage.Instance.Documentation_text); + return result; + } +} + +[LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-Geometry")] +public partial class Geometry : ConceptInstanceBase, IPartitionInstance +{ + private Documentation? _documentation = null; + /// Optional Single Containment + [LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-documentation")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Containment, Optional = true, Multiple = true)] + public Documentation? Documentation { get => _documentation; set => SetDocumentation(value); } + + /// Optional Single Containment + public bool TryGetDocumentation([NotNullWhenAttribute(true)] out Documentation? documentation) + { + documentation = _documentation; + return _documentation != null; + } + + /// Optional Single Containment + public Geometry SetDocumentation(Documentation? value) + { + ContainmentSingleEventEmitter evt = new(ShapesLanguage.Instance.Geometry_documentation, this, value, _documentation); + evt.CollectOldData(); + SetParentNull(_documentation); + AttachChild(value); + _documentation = value; + evt.RaiseEvent(); + return this; + } + + private readonly List _shapes = []; + /// Optional Multiple Containment + [LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-shapes")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Containment, Optional = true, Multiple = true)] + public IReadOnlyList Shapes { get => _shapes.AsReadOnly(); init => AddShapes(value); } + + /// Optional Multiple Containment + public bool TryGetShapes([NotNullWhenAttribute(true)] out IReadOnlyList shapes) + { + shapes = _shapes; + return _shapes.Count != 0; + } + + /// Optional Multiple Containment + public Geometry AddShapes(IEnumerable nodes) + { + var safeNodes = nodes?.ToList(); + AssureNotNull(safeNodes, ShapesLanguage.Instance.Geometry_shapes); + AssureNotNullMembers(safeNodes, ShapesLanguage.Instance.Geometry_shapes); + ContainmentAddMultipleEventEmitter evt = new(ShapesLanguage.Instance.Geometry_shapes, this, safeNodes, _shapes, null); + evt.CollectOldData(); + _shapes.AddRange(SetSelfParent(safeNodes, ShapesLanguage.Instance.Geometry_shapes)); + evt.RaiseEvent(); + return this; + } + + /// Optional Multiple Containment + public Geometry InsertShapes(int index, IEnumerable nodes) + { + AssureInRange(index, _shapes); + var safeNodes = nodes?.ToList(); + AssureNotNull(safeNodes, ShapesLanguage.Instance.Geometry_shapes); + AssureNoSelfMove(index, safeNodes, _shapes); + AssureNotNullMembers(safeNodes, ShapesLanguage.Instance.Geometry_shapes); + ContainmentAddMultipleEventEmitter evt = new(ShapesLanguage.Instance.Geometry_shapes, this, safeNodes, _shapes, index); + evt.CollectOldData(); + _shapes.InsertRange(index, SetSelfParent(safeNodes, ShapesLanguage.Instance.Geometry_shapes)); + evt.RaiseEvent(); + return this; + } + + /// Optional Multiple Containment + public Geometry RemoveShapes(IEnumerable nodes) + { + RemoveSelfParent(nodes?.ToList(), _shapes, ShapesLanguage.Instance.Geometry_shapes, ContainmentRemover(ShapesLanguage.Instance.Geometry_shapes)); + return this; + } + + public Geometry(string id) : base(id) + { + _eventHandler = new(this); + } + + /// + public override Concept GetConcept() => ShapesLanguage.Instance.Geometry; + private readonly PartitionEventHandler _eventHandler; + public IPartitionPublisher? GetPublisher() => _eventHandler; + public IPartitionCommander? GetCommander() => _eventHandler; + /// + protected override bool GetInternal(Feature? feature, out Object? result) + { + if (base.GetInternal(feature, out result)) + return true; + if (ShapesLanguage.Instance.Geometry_documentation.EqualsIdentity(feature)) + { + result = Documentation; + return true; + } + + if (ShapesLanguage.Instance.Geometry_shapes.EqualsIdentity(feature)) + { + result = Shapes; + return true; + } + + return false; + } + + /// + protected override bool SetInternal(Feature? feature, Object? value) + { + if (base.SetInternal(feature, value)) + return true; + if (ShapesLanguage.Instance.Geometry_documentation.EqualsIdentity(feature)) + { + if (value is null or LionWeb.Integration.Languages.Generated.V2023_1.Shapes.M2.Documentation) + { + Documentation = (LionWeb.Integration.Languages.Generated.V2023_1.Shapes.M2.Documentation?)value; + return true; + } + + throw new InvalidValueException(feature, value); + } + + if (ShapesLanguage.Instance.Geometry_shapes.EqualsIdentity(feature)) + { + var safeNodes = ShapesLanguage.Instance.Geometry_shapes.AsNodes(value).ToList(); + ContainmentSetEventEmitter evt = new(ShapesLanguage.Instance.Geometry_shapes, this, safeNodes, _shapes); + evt.CollectOldData(); + RemoveSelfParent(_shapes.ToList(), _shapes, ShapesLanguage.Instance.Geometry_shapes); + _shapes.AddRange(SetSelfParent(safeNodes, ShapesLanguage.Instance.Geometry_shapes)); + evt.RaiseEvent(); + return true; + } + + return false; + } + + /// + public override IEnumerable CollectAllSetFeatures() + { + List result = base.CollectAllSetFeatures().ToList(); + if (_documentation != default) + result.Add(ShapesLanguage.Instance.Geometry_documentation); + if (_shapes.Count != 0) + result.Add(ShapesLanguage.Instance.Geometry_shapes); + return result; + } + + /// + protected override bool DetachChild(INode child) + { + if (base.DetachChild(child)) + return true; + Containment? c = GetContainmentOf(child); + if (ShapesLanguage.Instance.Geometry_documentation.EqualsIdentity(c)) + { + _documentation = null; + return true; + } + + if (ShapesLanguage.Instance.Geometry_shapes.EqualsIdentity(c)) + { + RemoveSelfParent(child, _shapes, ShapesLanguage.Instance.Geometry_shapes); + return true; + } + + return false; + } + + /// + public override Containment? GetContainmentOf(INode child) + { + Containment? result = base.GetContainmentOf(child); + if (result != null) + return result; + if (ReferenceEquals(_documentation, child)) + return ShapesLanguage.Instance.Geometry_documentation; + if (child is IShape child1 && _shapes.Contains(child1)) + return ShapesLanguage.Instance.Geometry_shapes; + return null; + } +} + +[LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-IShape")] +public partial interface IShape : INode +{ + /// Optional Multiple Containment + [LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-fixpoints")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Containment, Optional = true, Multiple = true)] + public IReadOnlyList Fixpoints { get; init; } + + /// Optional Multiple Containment + public IShape AddFixpoints(IEnumerable nodes); + /// Optional Multiple Containment + public IShape InsertFixpoints(int index, IEnumerable nodes); + /// Optional Multiple Containment + public IShape RemoveFixpoints(IEnumerable nodes); + /// Required Property + [LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-uuid")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Property, Optional = false, Multiple = false)] + public string Uuid { get; set; } + + /// Required Property + public IShape SetUuid(string value); +} + +[LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-Line")] +public partial class Line : Shape, INamedWritable +{ + private Coord? _end = null; + /// Required Single Containment + /// If End has not been set + /// If set to null + [LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-end")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Containment, Optional = false, Multiple = false)] + public Coord End { get => _end ?? throw new UnsetFeatureException(ShapesLanguage.Instance.Line_end); set => SetEnd(value); } + + /// Required Single Containment + public bool TryGetEnd([NotNullWhenAttribute(true)] out Coord? end) + { + end = _end; + return _end != null; + } + + /// Required Single Containment + /// If set to null + public Line SetEnd(Coord value) + { + AssureNotNull(value, ShapesLanguage.Instance.Line_end); + ContainmentSingleEventEmitter evt = new(ShapesLanguage.Instance.Line_end, this, value, _end); + evt.CollectOldData(); + SetParentNull(_end); + AttachChild(value); + _end = value; + evt.RaiseEvent(); + return this; + } + + private Coord? _start = null; + /// Required Single Containment + /// If Start has not been set + /// If set to null + [LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-start")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Containment, Optional = false, Multiple = false)] + public Coord Start { get => _start ?? throw new UnsetFeatureException(ShapesLanguage.Instance.Line_start); set => SetStart(value); } + + /// Required Single Containment + public bool TryGetStart([NotNullWhenAttribute(true)] out Coord? start) + { + start = _start; + return _start != null; + } + + /// Required Single Containment + /// If set to null + public Line SetStart(Coord value) + { + AssureNotNull(value, ShapesLanguage.Instance.Line_start); + ContainmentSingleEventEmitter evt = new(ShapesLanguage.Instance.Line_start, this, value, _start); + evt.CollectOldData(); + SetParentNull(_start); + AttachChild(value); + _start = value; + evt.RaiseEvent(); + return this; + } + + public Line(string id) : base(id) + { + } + + /// + public override Concept GetConcept() => ShapesLanguage.Instance.Line; + /// + protected override bool GetInternal(Feature? feature, out Object? result) + { + if (base.GetInternal(feature, out result)) + return true; + if (ShapesLanguage.Instance.Line_end.EqualsIdentity(feature)) + { + result = End; + return true; + } + + if (ShapesLanguage.Instance.Line_start.EqualsIdentity(feature)) + { + result = Start; + return true; + } + + return false; + } + + /// + protected override bool SetInternal(Feature? feature, Object? value) + { + if (base.SetInternal(feature, value)) + return true; + if (ShapesLanguage.Instance.Line_end.EqualsIdentity(feature)) + { + if (value is LionWeb.Integration.Languages.Generated.V2023_1.Shapes.M2.Coord v) + { + End = v; + return true; + } + + throw new InvalidValueException(feature, value); + } + + if (ShapesLanguage.Instance.Line_start.EqualsIdentity(feature)) + { + if (value is LionWeb.Integration.Languages.Generated.V2023_1.Shapes.M2.Coord v) + { + Start = v; + return true; + } + + throw new InvalidValueException(feature, value); + } + + return false; + } + + /// + public override IEnumerable CollectAllSetFeatures() + { + List result = base.CollectAllSetFeatures().ToList(); + if (_end != default) + result.Add(ShapesLanguage.Instance.Line_end); + if (_start != default) + result.Add(ShapesLanguage.Instance.Line_start); + return result; + } + + /// + protected override bool DetachChild(INode child) + { + if (base.DetachChild(child)) + return true; + Containment? c = GetContainmentOf(child); + if (ShapesLanguage.Instance.Line_end.EqualsIdentity(c)) + { + _end = null; + return true; + } + + if (ShapesLanguage.Instance.Line_start.EqualsIdentity(c)) + { + _start = null; + return true; + } + + return false; + } + + /// + public override Containment? GetContainmentOf(INode child) + { + Containment? result = base.GetContainmentOf(child); + if (result != null) + return result; + if (ReferenceEquals(_end, child)) + return ShapesLanguage.Instance.Line_end; + if (ReferenceEquals(_start, child)) + return ShapesLanguage.Instance.Line_start; + return null; + } +} + +[LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-MaterialGroup")] +public partial class MaterialGroup : ConceptInstanceBase +{ + private IShape? _defaultShape = null; + /// Optional Single Containment + [LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-default-shape")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Containment, Optional = true, Multiple = true)] + public IShape? DefaultShape { get => _defaultShape; set => SetDefaultShape(value); } + + /// Optional Single Containment + public bool TryGetDefaultShape([NotNullWhenAttribute(true)] out IShape? defaultShape) + { + defaultShape = _defaultShape; + return _defaultShape != null; + } + + /// Optional Single Containment + public MaterialGroup SetDefaultShape(IShape? value) + { + ContainmentSingleEventEmitter evt = new(ShapesLanguage.Instance.MaterialGroup_defaultShape, this, value, _defaultShape); + evt.CollectOldData(); + SetParentNull(_defaultShape); + AttachChild(value); + _defaultShape = value; + evt.RaiseEvent(); + return this; + } + + private readonly List _materials = []; + /// Required Multiple Reference + /// If Materials is empty + [LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-group-materials")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Reference, Optional = false, Multiple = false)] + public IReadOnlyList Materials { get => AsNonEmptyReadOnly(_materials, ShapesLanguage.Instance.MaterialGroup_materials); init => AddMaterials(value); } + + /// Required Multiple Reference + public bool TryGetMaterials([NotNullWhenAttribute(true)] out IReadOnlyList materials) + { + materials = _materials; + return _materials.Count != 0; + } + + /// Required Multiple Reference + /// If both Materials and nodes are empty + public MaterialGroup AddMaterials(IEnumerable nodes) + { + var safeNodes = nodes?.ToList(); + AssureNotNull(safeNodes, ShapesLanguage.Instance.MaterialGroup_materials); + AssureNonEmpty(safeNodes, _materials, ShapesLanguage.Instance.MaterialGroup_materials); + ReferenceAddMultipleEventEmitter evt = new(ShapesLanguage.Instance.MaterialGroup_materials, this, safeNodes, _materials.Count); + evt.CollectOldData(); + _materials.AddRange(safeNodes); + evt.RaiseEvent(); + return this; + } + + /// Required Multiple Reference + /// If both Materials and nodes are empty + /// If index negative or greater than Materials.Count + public MaterialGroup InsertMaterials(int index, IEnumerable nodes) + { + AssureInRange(index, _materials); + var safeNodes = nodes?.ToList(); + AssureNotNull(safeNodes, ShapesLanguage.Instance.MaterialGroup_materials); + AssureNonEmpty(safeNodes, _materials, ShapesLanguage.Instance.MaterialGroup_materials); + ReferenceAddMultipleEventEmitter evt = new(ShapesLanguage.Instance.MaterialGroup_materials, this, safeNodes, index); + evt.CollectOldData(); + _materials.InsertRange(index, safeNodes); + evt.RaiseEvent(); + return this; + } + + /// Required Multiple Reference + /// If Materials would be empty + public MaterialGroup RemoveMaterials(IEnumerable nodes) + { + var safeNodes = nodes?.ToList(); + AssureNotNull(safeNodes, ShapesLanguage.Instance.MaterialGroup_materials); + AssureNonEmpty(safeNodes, _materials, ShapesLanguage.Instance.MaterialGroup_materials); + AssureNotClearing(safeNodes, _materials, ShapesLanguage.Instance.MaterialGroup_materials); + RemoveAll(safeNodes, _materials, ReferenceRemover(ShapesLanguage.Instance.MaterialGroup_materials)); + return this; + } + + private MatterState? _matterState = null; + /// Optional Property + [LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-matter-state")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Property, Optional = true, Multiple = false)] + public MatterState? MatterState { get => _matterState; set => SetMatterState(value); } + + /// Optional Property + public bool TryGetMatterState([NotNullWhenAttribute(true)] out MatterState? matterState) + { + matterState = _matterState; + return _matterState != null; + } + + /// Optional Property + public MaterialGroup SetMatterState(MatterState? value) + { + PropertyEventEmitter evt = new(ShapesLanguage.Instance.MaterialGroup_matterState, this, value, _matterState); + evt.CollectOldData(); + _matterState = value; + evt.RaiseEvent(); + return this; + } + + public MaterialGroup(string id) : base(id) + { + } + + /// + public override Concept GetConcept() => ShapesLanguage.Instance.MaterialGroup; + /// + protected override bool GetInternal(Feature? feature, out Object? result) + { + if (base.GetInternal(feature, out result)) + return true; + if (ShapesLanguage.Instance.MaterialGroup_defaultShape.EqualsIdentity(feature)) + { + result = DefaultShape; + return true; + } + + if (ShapesLanguage.Instance.MaterialGroup_materials.EqualsIdentity(feature)) + { + result = Materials; + return true; + } + + if (ShapesLanguage.Instance.MaterialGroup_matterState.EqualsIdentity(feature)) + { + result = MatterState; + return true; + } + + return false; + } + + /// + protected override bool SetInternal(Feature? feature, Object? value) + { + if (base.SetInternal(feature, value)) + return true; + if (ShapesLanguage.Instance.MaterialGroup_defaultShape.EqualsIdentity(feature)) + { + if (value is null or LionWeb.Integration.Languages.Generated.V2023_1.Shapes.M2.IShape) + { + DefaultShape = (LionWeb.Integration.Languages.Generated.V2023_1.Shapes.M2.IShape?)value; + return true; + } + + throw new InvalidValueException(feature, value); + } + + if (ShapesLanguage.Instance.MaterialGroup_materials.EqualsIdentity(feature)) + { + var safeNodes = ShapesLanguage.Instance.MaterialGroup_materials.AsNodes(value).ToList(); + AssureNonEmpty(safeNodes, ShapesLanguage.Instance.MaterialGroup_materials); + ReferenceSetEventEmitter evt = new(ShapesLanguage.Instance.MaterialGroup_materials, this, safeNodes, _materials); + evt.CollectOldData(); + _materials.Clear(); + _materials.AddRange(safeNodes); + evt.RaiseEvent(); + return true; + } + + if (ShapesLanguage.Instance.MaterialGroup_matterState.EqualsIdentity(feature)) + { + if (value is null or LionWeb.Integration.Languages.Generated.V2023_1.Shapes.M2.MatterState) + { + MatterState = (LionWeb.Integration.Languages.Generated.V2023_1.Shapes.M2.MatterState?)value; + return true; + } + + throw new InvalidValueException(feature, value); + } + + return false; + } + + /// + public override IEnumerable CollectAllSetFeatures() + { + List result = base.CollectAllSetFeatures().ToList(); + if (_defaultShape != default) + result.Add(ShapesLanguage.Instance.MaterialGroup_defaultShape); + if (_materials.Count != 0) + result.Add(ShapesLanguage.Instance.MaterialGroup_materials); + if (_matterState != default) + result.Add(ShapesLanguage.Instance.MaterialGroup_matterState); + return result; + } + + /// + protected override bool DetachChild(INode child) + { + if (base.DetachChild(child)) + return true; + Containment? c = GetContainmentOf(child); + if (ShapesLanguage.Instance.MaterialGroup_defaultShape.EqualsIdentity(c)) + { + _defaultShape = null; + return true; + } + + return false; + } + + /// + public override Containment? GetContainmentOf(INode child) + { + Containment? result = base.GetContainmentOf(child); + if (result != null) + return result; + if (ReferenceEquals(_defaultShape, child)) + return ShapesLanguage.Instance.MaterialGroup_defaultShape; + return null; + } +} + +[LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-OffsetDuplicate")] +public partial class OffsetDuplicate : Shape +{ + private Shape? _altSource = null; + /// Optional Single Reference + [LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-alt-source")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Reference, Optional = true, Multiple = true)] + public Shape? AltSource { get => _altSource; set => SetAltSource(value); } + + /// Optional Single Reference + public bool TryGetAltSource([NotNullWhenAttribute(true)] out Shape? altSource) + { + altSource = _altSource; + return _altSource != null; + } + + /// Optional Single Reference + public OffsetDuplicate SetAltSource(Shape? value) + { + ReferenceSingleEventEmitter evt = new(ShapesLanguage.Instance.OffsetDuplicate_altSource, this, value, _altSource); + evt.CollectOldData(); + _altSource = value; + evt.RaiseEvent(); + return this; + } + + private Documentation? _docs = null; + /// Optional Single Containment + [LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-docs")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Containment, Optional = true, Multiple = true)] + public Documentation? Docs { get => _docs; set => SetDocs(value); } + + /// Optional Single Containment + public bool TryGetDocs([NotNullWhenAttribute(true)] out Documentation? docs) + { + docs = _docs; + return _docs != null; + } + + /// Optional Single Containment + public OffsetDuplicate SetDocs(Documentation? value) + { + ContainmentSingleEventEmitter evt = new(ShapesLanguage.Instance.OffsetDuplicate_docs, this, value, _docs); + evt.CollectOldData(); + SetParentNull(_docs); + AttachChild(value); + _docs = value; + evt.RaiseEvent(); + return this; + } + + private Coord? _offset = null; + /// Required Single Containment + /// If Offset has not been set + /// If set to null + [LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-offset")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Containment, Optional = false, Multiple = false)] + public Coord Offset { get => _offset ?? throw new UnsetFeatureException(ShapesLanguage.Instance.OffsetDuplicate_offset); set => SetOffset(value); } + + /// Required Single Containment + public bool TryGetOffset([NotNullWhenAttribute(true)] out Coord? offset) + { + offset = _offset; + return _offset != null; + } + + /// Required Single Containment + /// If set to null + public OffsetDuplicate SetOffset(Coord value) + { + AssureNotNull(value, ShapesLanguage.Instance.OffsetDuplicate_offset); + ContainmentSingleEventEmitter evt = new(ShapesLanguage.Instance.OffsetDuplicate_offset, this, value, _offset); + evt.CollectOldData(); + SetParentNull(_offset); + AttachChild(value); + _offset = value; + evt.RaiseEvent(); + return this; + } + + private Documentation? _secretDocs = null; + /// Optional Single Containment + [LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-secret-docs")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Containment, Optional = true, Multiple = true)] + public Documentation? SecretDocs { get => _secretDocs; set => SetSecretDocs(value); } + + /// Optional Single Containment + public bool TryGetSecretDocs([NotNullWhenAttribute(true)] out Documentation? secretDocs) + { + secretDocs = _secretDocs; + return _secretDocs != null; + } + + /// Optional Single Containment + public OffsetDuplicate SetSecretDocs(Documentation? value) + { + ContainmentSingleEventEmitter evt = new(ShapesLanguage.Instance.OffsetDuplicate_secretDocs, this, value, _secretDocs); + evt.CollectOldData(); + SetParentNull(_secretDocs); + AttachChild(value); + _secretDocs = value; + evt.RaiseEvent(); + return this; + } + + private Shape? _source = null; + /// Required Single Reference + /// If Source has not been set + /// If set to null + [LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-source")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Reference, Optional = false, Multiple = false)] + public Shape Source { get => _source ?? throw new UnsetFeatureException(ShapesLanguage.Instance.OffsetDuplicate_source); set => SetSource(value); } + + /// Required Single Reference + public bool TryGetSource([NotNullWhenAttribute(true)] out Shape? source) + { + source = _source; + return _source != null; + } + + /// Required Single Reference + /// If set to null + public OffsetDuplicate SetSource(Shape value) + { + AssureNotNull(value, ShapesLanguage.Instance.OffsetDuplicate_source); + ReferenceSingleEventEmitter evt = new(ShapesLanguage.Instance.OffsetDuplicate_source, this, value, _source); + evt.CollectOldData(); + _source = value; + evt.RaiseEvent(); + return this; + } + + public OffsetDuplicate(string id) : base(id) + { + } + + /// + public override Concept GetConcept() => ShapesLanguage.Instance.OffsetDuplicate; + /// + protected override bool GetInternal(Feature? feature, out Object? result) + { + if (base.GetInternal(feature, out result)) + return true; + if (ShapesLanguage.Instance.OffsetDuplicate_altSource.EqualsIdentity(feature)) + { + result = AltSource; + return true; + } + + if (ShapesLanguage.Instance.OffsetDuplicate_docs.EqualsIdentity(feature)) + { + result = Docs; + return true; + } + + if (ShapesLanguage.Instance.OffsetDuplicate_offset.EqualsIdentity(feature)) + { + result = Offset; + return true; + } + + if (ShapesLanguage.Instance.OffsetDuplicate_secretDocs.EqualsIdentity(feature)) + { + result = SecretDocs; + return true; + } + + if (ShapesLanguage.Instance.OffsetDuplicate_source.EqualsIdentity(feature)) + { + result = Source; + return true; + } + + return false; + } + + /// + protected override bool SetInternal(Feature? feature, Object? value) + { + if (base.SetInternal(feature, value)) + return true; + if (ShapesLanguage.Instance.OffsetDuplicate_altSource.EqualsIdentity(feature)) + { + if (value is null or LionWeb.Integration.Languages.Generated.V2023_1.Shapes.M2.Shape) + { + AltSource = (LionWeb.Integration.Languages.Generated.V2023_1.Shapes.M2.Shape?)value; + return true; + } + + throw new InvalidValueException(feature, value); + } + + if (ShapesLanguage.Instance.OffsetDuplicate_docs.EqualsIdentity(feature)) + { + if (value is null or LionWeb.Integration.Languages.Generated.V2023_1.Shapes.M2.Documentation) + { + Docs = (LionWeb.Integration.Languages.Generated.V2023_1.Shapes.M2.Documentation?)value; + return true; + } + + throw new InvalidValueException(feature, value); + } + + if (ShapesLanguage.Instance.OffsetDuplicate_offset.EqualsIdentity(feature)) + { + if (value is LionWeb.Integration.Languages.Generated.V2023_1.Shapes.M2.Coord v) + { + Offset = v; + return true; + } + + throw new InvalidValueException(feature, value); + } + + if (ShapesLanguage.Instance.OffsetDuplicate_secretDocs.EqualsIdentity(feature)) + { + if (value is null or LionWeb.Integration.Languages.Generated.V2023_1.Shapes.M2.Documentation) + { + SecretDocs = (LionWeb.Integration.Languages.Generated.V2023_1.Shapes.M2.Documentation?)value; + return true; + } + + throw new InvalidValueException(feature, value); + } + + if (ShapesLanguage.Instance.OffsetDuplicate_source.EqualsIdentity(feature)) + { + if (value is LionWeb.Integration.Languages.Generated.V2023_1.Shapes.M2.Shape v) + { + Source = v; + return true; + } + + throw new InvalidValueException(feature, value); + } + + return false; + } + + /// + public override IEnumerable CollectAllSetFeatures() + { + List result = base.CollectAllSetFeatures().ToList(); + if (_altSource != default) + result.Add(ShapesLanguage.Instance.OffsetDuplicate_altSource); + if (_docs != default) + result.Add(ShapesLanguage.Instance.OffsetDuplicate_docs); + if (_offset != default) + result.Add(ShapesLanguage.Instance.OffsetDuplicate_offset); + if (_secretDocs != default) + result.Add(ShapesLanguage.Instance.OffsetDuplicate_secretDocs); + if (_source != default) + result.Add(ShapesLanguage.Instance.OffsetDuplicate_source); + return result; + } + + /// + protected override bool DetachChild(INode child) + { + if (base.DetachChild(child)) + return true; + Containment? c = GetContainmentOf(child); + if (ShapesLanguage.Instance.OffsetDuplicate_docs.EqualsIdentity(c)) + { + _docs = null; + return true; + } + + if (ShapesLanguage.Instance.OffsetDuplicate_offset.EqualsIdentity(c)) + { + _offset = null; + return true; + } + + if (ShapesLanguage.Instance.OffsetDuplicate_secretDocs.EqualsIdentity(c)) + { + _secretDocs = null; + return true; + } + + return false; + } + + /// + public override Containment? GetContainmentOf(INode child) + { + Containment? result = base.GetContainmentOf(child); + if (result != null) + return result; + if (ReferenceEquals(_docs, child)) + return ShapesLanguage.Instance.OffsetDuplicate_docs; + if (ReferenceEquals(_offset, child)) + return ShapesLanguage.Instance.OffsetDuplicate_offset; + if (ReferenceEquals(_secretDocs, child)) + return ShapesLanguage.Instance.OffsetDuplicate_secretDocs; + return null; + } +} + +[LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-ReferenceGeometry")] +public partial class ReferenceGeometry : ConceptInstanceBase, IPartitionInstance +{ + private readonly List _shapes = []; + /// Optional Multiple Reference + [LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-shapes-references")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Reference, Optional = true, Multiple = true)] + public IReadOnlyList Shapes { get => _shapes.AsReadOnly(); init => AddShapes(value); } + + /// Optional Multiple Reference + public bool TryGetShapes([NotNullWhenAttribute(true)] out IReadOnlyList shapes) + { + shapes = _shapes; + return _shapes.Count != 0; + } + + /// Optional Multiple Reference + public ReferenceGeometry AddShapes(IEnumerable nodes) + { + var safeNodes = nodes?.ToList(); + AssureNotNull(safeNodes, ShapesLanguage.Instance.ReferenceGeometry_shapes); + AssureNotNullMembers(safeNodes, ShapesLanguage.Instance.ReferenceGeometry_shapes); + ReferenceAddMultipleEventEmitter evt = new(ShapesLanguage.Instance.ReferenceGeometry_shapes, this, safeNodes, _shapes.Count); + evt.CollectOldData(); + _shapes.AddRange(safeNodes); + evt.RaiseEvent(); + return this; + } + + /// Optional Multiple Reference + public ReferenceGeometry InsertShapes(int index, IEnumerable nodes) + { + AssureInRange(index, _shapes); + var safeNodes = nodes?.ToList(); + AssureNotNull(safeNodes, ShapesLanguage.Instance.ReferenceGeometry_shapes); + AssureNotNullMembers(safeNodes, ShapesLanguage.Instance.ReferenceGeometry_shapes); + ReferenceAddMultipleEventEmitter evt = new(ShapesLanguage.Instance.ReferenceGeometry_shapes, this, safeNodes, index); + evt.CollectOldData(); + _shapes.InsertRange(index, safeNodes); + evt.RaiseEvent(); + return this; + } + + /// Optional Multiple Reference + public ReferenceGeometry RemoveShapes(IEnumerable nodes) + { + var safeNodes = nodes?.ToList(); + AssureNotNull(safeNodes, ShapesLanguage.Instance.ReferenceGeometry_shapes); + AssureNotNullMembers(safeNodes, ShapesLanguage.Instance.ReferenceGeometry_shapes); + RemoveAll(safeNodes, _shapes, ReferenceRemover(ShapesLanguage.Instance.ReferenceGeometry_shapes)); + return this; + } + + public ReferenceGeometry(string id) : base(id) + { + _eventHandler = new(this); + } + + /// + public override Concept GetConcept() => ShapesLanguage.Instance.ReferenceGeometry; + private readonly PartitionEventHandler _eventHandler; + public IPartitionPublisher? GetPublisher() => _eventHandler; + public IPartitionCommander? GetCommander() => _eventHandler; + /// + protected override bool GetInternal(Feature? feature, out Object? result) + { + if (base.GetInternal(feature, out result)) + return true; + if (ShapesLanguage.Instance.ReferenceGeometry_shapes.EqualsIdentity(feature)) + { + result = Shapes; + return true; + } + + return false; + } + + /// + protected override bool SetInternal(Feature? feature, Object? value) + { + if (base.SetInternal(feature, value)) + return true; + if (ShapesLanguage.Instance.ReferenceGeometry_shapes.EqualsIdentity(feature)) + { + var safeNodes = ShapesLanguage.Instance.ReferenceGeometry_shapes.AsNodes(value).ToList(); + AssureNotNull(safeNodes, ShapesLanguage.Instance.ReferenceGeometry_shapes); + AssureNotNullMembers(safeNodes, ShapesLanguage.Instance.ReferenceGeometry_shapes); + ReferenceSetEventEmitter evt = new(ShapesLanguage.Instance.ReferenceGeometry_shapes, this, safeNodes, _shapes); + evt.CollectOldData(); + _shapes.Clear(); + _shapes.AddRange(safeNodes); + evt.RaiseEvent(); + return true; + } + + return false; + } + + /// + public override IEnumerable CollectAllSetFeatures() + { + List result = base.CollectAllSetFeatures().ToList(); + if (_shapes.Count != 0) + result.Add(ShapesLanguage.Instance.ReferenceGeometry_shapes); + return result; + } +} + +[LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-Shape")] +public abstract partial class Shape : ConceptInstanceBase, INamedWritable, IShape +{ + private string? _name = null; + /// Required Property + /// If Name has not been set + /// If set to null + [LionCoreMetaPointer(Language = typeof(LionWeb.Core.VersionSpecific.V2023_1.BuiltInsLanguage_2023_1), Key = "LionCore-builtins-INamed-name")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Property, Optional = false, Multiple = false)] + public string Name { get => _name ?? throw new UnsetFeatureException(_builtIns.INamed_name); set => SetName(value); } + + /// Required Property + /// If set to null + public bool TryGetName([NotNullWhenAttribute(true)] out string? name) + { + name = _name; + return _name != null; + } +/// Required Property +/// If set to null + INamedWritable INamedWritable.SetName(string value) => SetName(value); + /// Required Property + /// If set to null + public Shape SetName(string value) + { + AssureNotNull(value, _builtIns.INamed_name); + PropertyEventEmitter evt = new(_builtIns.INamed_name, this, value, _name); + evt.CollectOldData(); + _name = value; + evt.RaiseEvent(); + return this; + } + + private readonly List _fixpoints = []; + /// Optional Multiple Containment + [LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-fixpoints")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Containment, Optional = true, Multiple = true)] + public IReadOnlyList Fixpoints { get => _fixpoints.AsReadOnly(); init => AddFixpoints(value); } + + /// Optional Multiple Containment + public bool TryGetFixpoints([NotNullWhenAttribute(true)] out IReadOnlyList fixpoints) + { + fixpoints = _fixpoints; + return _fixpoints.Count != 0; + } +/// Optional Multiple Containment + IShape IShape.AddFixpoints(IEnumerable nodes) => AddFixpoints(nodes); + /// Optional Multiple Containment + public Shape AddFixpoints(IEnumerable nodes) + { + var safeNodes = nodes?.ToList(); + AssureNotNull(safeNodes, ShapesLanguage.Instance.IShape_fixpoints); + AssureNotNullMembers(safeNodes, ShapesLanguage.Instance.IShape_fixpoints); + ContainmentAddMultipleEventEmitter evt = new(ShapesLanguage.Instance.IShape_fixpoints, this, safeNodes, _fixpoints, null); + evt.CollectOldData(); + _fixpoints.AddRange(SetSelfParent(safeNodes, ShapesLanguage.Instance.IShape_fixpoints)); + evt.RaiseEvent(); + return this; + } +/// Optional Multiple Containment + IShape IShape.InsertFixpoints(int index, IEnumerable nodes) => InsertFixpoints(index, nodes); + /// Optional Multiple Containment + public Shape InsertFixpoints(int index, IEnumerable nodes) + { + AssureInRange(index, _fixpoints); + var safeNodes = nodes?.ToList(); + AssureNotNull(safeNodes, ShapesLanguage.Instance.IShape_fixpoints); + AssureNoSelfMove(index, safeNodes, _fixpoints); + AssureNotNullMembers(safeNodes, ShapesLanguage.Instance.IShape_fixpoints); + ContainmentAddMultipleEventEmitter evt = new(ShapesLanguage.Instance.IShape_fixpoints, this, safeNodes, _fixpoints, index); + evt.CollectOldData(); + _fixpoints.InsertRange(index, SetSelfParent(safeNodes, ShapesLanguage.Instance.IShape_fixpoints)); + evt.RaiseEvent(); + return this; + } +/// Optional Multiple Containment + IShape IShape.RemoveFixpoints(IEnumerable nodes) => RemoveFixpoints(nodes); + /// Optional Multiple Containment + public Shape RemoveFixpoints(IEnumerable nodes) + { + RemoveSelfParent(nodes?.ToList(), _fixpoints, ShapesLanguage.Instance.IShape_fixpoints, ContainmentRemover(ShapesLanguage.Instance.IShape_fixpoints)); + return this; + } + + private string? _uuid = null; + /// Required Property + /// If Uuid has not been set + /// If set to null + [LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-uuid")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Property, Optional = false, Multiple = false)] + public string Uuid { get => _uuid ?? throw new UnsetFeatureException(ShapesLanguage.Instance.IShape_uuid); set => SetUuid(value); } + + /// Required Property + /// If set to null + public bool TryGetUuid([NotNullWhenAttribute(true)] out string? uuid) + { + uuid = _uuid; + return _uuid != null; + } +/// Required Property +/// If set to null + IShape IShape.SetUuid(string value) => SetUuid(value); + /// Required Property + /// If set to null + public Shape SetUuid(string value) + { + AssureNotNull(value, ShapesLanguage.Instance.IShape_uuid); + PropertyEventEmitter evt = new(ShapesLanguage.Instance.IShape_uuid, this, value, _uuid); + evt.CollectOldData(); + _uuid = value; + evt.RaiseEvent(); + return this; + } + + private Documentation? _shapeDocs = null; + /// Optional Single Containment + [LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-shape-docs")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Containment, Optional = true, Multiple = true)] + public Documentation? ShapeDocs { get => _shapeDocs; set => SetShapeDocs(value); } + + /// Optional Single Containment + public bool TryGetShapeDocs([NotNullWhenAttribute(true)] out Documentation? shapeDocs) + { + shapeDocs = _shapeDocs; + return _shapeDocs != null; + } + + /// Optional Single Containment + public Shape SetShapeDocs(Documentation? value) + { + ContainmentSingleEventEmitter evt = new(ShapesLanguage.Instance.Shape_shapeDocs, this, value, _shapeDocs); + evt.CollectOldData(); + SetParentNull(_shapeDocs); + AttachChild(value); + _shapeDocs = value; + evt.RaiseEvent(); + return this; + } + + public Shape(string id) : base(id) + { + } + + /// + public override Concept GetConcept() => ShapesLanguage.Instance.Shape; + /// + protected override bool GetInternal(Feature? feature, out Object? result) + { + if (base.GetInternal(feature, out result)) + return true; + if (_builtIns.INamed_name.EqualsIdentity(feature)) + { + result = Name; + return true; + } + + if (ShapesLanguage.Instance.IShape_fixpoints.EqualsIdentity(feature)) + { + result = Fixpoints; + return true; + } + + if (ShapesLanguage.Instance.IShape_uuid.EqualsIdentity(feature)) + { + result = Uuid; + return true; + } + + if (ShapesLanguage.Instance.Shape_shapeDocs.EqualsIdentity(feature)) + { + result = ShapeDocs; + return true; + } + + return false; + } + + /// + protected override bool SetInternal(Feature? feature, Object? value) + { + if (base.SetInternal(feature, value)) + return true; + if (_builtIns.INamed_name.EqualsIdentity(feature)) + { + if (value is string v) + { + Name = v; + return true; + } + + throw new InvalidValueException(feature, value); + } + + if (ShapesLanguage.Instance.IShape_fixpoints.EqualsIdentity(feature)) + { + var safeNodes = ShapesLanguage.Instance.IShape_fixpoints.AsNodes(value).ToList(); + ContainmentSetEventEmitter evt = new(ShapesLanguage.Instance.IShape_fixpoints, this, safeNodes, _fixpoints); + evt.CollectOldData(); + RemoveSelfParent(_fixpoints.ToList(), _fixpoints, ShapesLanguage.Instance.IShape_fixpoints); + _fixpoints.AddRange(SetSelfParent(safeNodes, ShapesLanguage.Instance.IShape_fixpoints)); + evt.RaiseEvent(); + return true; + } + + if (ShapesLanguage.Instance.IShape_uuid.EqualsIdentity(feature)) + { + if (value is string v) + { + Uuid = v; + return true; + } + + throw new InvalidValueException(feature, value); + } + + if (ShapesLanguage.Instance.Shape_shapeDocs.EqualsIdentity(feature)) + { + if (value is null or LionWeb.Integration.Languages.Generated.V2023_1.Shapes.M2.Documentation) + { + ShapeDocs = (LionWeb.Integration.Languages.Generated.V2023_1.Shapes.M2.Documentation?)value; + return true; + } + + throw new InvalidValueException(feature, value); + } + + return false; + } + + /// + public override IEnumerable CollectAllSetFeatures() + { + List result = base.CollectAllSetFeatures().ToList(); + if (_name != default) + result.Add(_builtIns.INamed_name); + if (_fixpoints.Count != 0) + result.Add(ShapesLanguage.Instance.IShape_fixpoints); + if (_uuid != default) + result.Add(ShapesLanguage.Instance.IShape_uuid); + if (_shapeDocs != default) + result.Add(ShapesLanguage.Instance.Shape_shapeDocs); + return result; + } + + /// + protected override bool DetachChild(INode child) + { + if (base.DetachChild(child)) + return true; + Containment? c = GetContainmentOf(child); + if (ShapesLanguage.Instance.IShape_fixpoints.EqualsIdentity(c)) + { + RemoveSelfParent(child, _fixpoints, ShapesLanguage.Instance.IShape_fixpoints); + return true; + } + + if (ShapesLanguage.Instance.Shape_shapeDocs.EqualsIdentity(c)) + { + _shapeDocs = null; + return true; + } + + return false; + } + + /// + public override Containment? GetContainmentOf(INode child) + { + Containment? result = base.GetContainmentOf(child); + if (result != null) + return result; + if (child is Coord child0 && _fixpoints.Contains(child0)) + return ShapesLanguage.Instance.IShape_fixpoints; + if (ReferenceEquals(_shapeDocs, child)) + return ShapesLanguage.Instance.Shape_shapeDocs; + return null; + } +} + +[LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-MatterState")] +public enum MatterState +{ + [LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-gas")] + gas, + [LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-liquid")] + liquid, + [LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-solid")] + solid +} \ No newline at end of file diff --git a/src/cs/LionWeb.Integration.Languages/Generated/V2023_1/TestLanguage.g.cs b/src/cs/LionWeb.Integration.Languages/Generated/V2023_1/TestLanguage.g.cs new file mode 100644 index 0000000..aa9cfe2 --- /dev/null +++ b/src/cs/LionWeb.Integration.Languages/Generated/V2023_1/TestLanguage.g.cs @@ -0,0 +1,1228 @@ +// Generated by the C# M2TypesGenerator: modify at your own risk! +// ReSharper disable InconsistentNaming +// ReSharper disable SuggestVarOrType_SimpleTypes +// ReSharper disable SuggestVarOrType_Elsewhere +#pragma warning disable 1591 +#nullable enable +namespace LionWeb.Integration.Languages.Generated.V2023_1.TestLanguage.M2; +using LionWeb.Core; +using LionWeb.Core.M1.Event.Partition; +using LionWeb.Core.M1.Event.Partition.Emitter; +using LionWeb.Core.M2; +using LionWeb.Core.M3; +using LionWeb.Core.Utilities; +using LionWeb.Core.VersionSpecific.V2023_1; +using System; +using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; + +[LionCoreLanguage(Key = "TestLanguage", Version = "0")] +public partial class TestLanguageLanguage : LanguageBase +{ + public static readonly TestLanguageLanguage Instance = new Lazy(() => new("TestLanguage")).Value; + public TestLanguageLanguage(string id) : base(id, LionWebVersions.v2023_1) + { + _dataTypeTestConcept = new(() => new ConceptBase("DataTypeTestConcept", this) { Key = "DataTypeTestConcept", Name = "DataTypeTestConcept", Abstract = false, Partition = true, FeaturesLazy = new(() => [DataTypeTestConcept_booleanValue_0_1, DataTypeTestConcept_booleanValue_1, DataTypeTestConcept_enumValue_0_1, DataTypeTestConcept_enumValue_1, DataTypeTestConcept_integerValue_0_1, DataTypeTestConcept_integerValue_1, DataTypeTestConcept_stringValue_0_1, DataTypeTestConcept_stringValue_1]) }); + _dataTypeTestConcept_booleanValue_0_1 = new(() => new PropertyBase("DataTypeTestConcept-booleanValue_0_1", DataTypeTestConcept, this) { Key = "DataTypeTestConcept-booleanValue_0_1", Name = "booleanValue_0_1", Optional = true, Type = _builtIns.Boolean }); + _dataTypeTestConcept_booleanValue_1 = new(() => new PropertyBase("DataTypeTestConcept-booleanValue_1", DataTypeTestConcept, this) { Key = "DataTypeTestConcept-booleanValue_1", Name = "booleanValue_1", Optional = false, Type = _builtIns.Boolean }); + _dataTypeTestConcept_enumValue_0_1 = new(() => new PropertyBase("DataTypeTestConcept-enumValue_0_1", DataTypeTestConcept, this) { Key = "DataTypeTestConcept-enumValue_0_1", Name = "enumValue_0_1", Optional = true, Type = TestEnumeration }); + _dataTypeTestConcept_enumValue_1 = new(() => new PropertyBase("DataTypeTestConcept-enumValue_1", DataTypeTestConcept, this) { Key = "DataTypeTestConcept-enumValue_1", Name = "enumValue_1", Optional = false, Type = TestEnumeration }); + _dataTypeTestConcept_integerValue_0_1 = new(() => new PropertyBase("DataTypeTestConcept-integerValue_0_1", DataTypeTestConcept, this) { Key = "DataTypeTestConcept-integerValue_0_1", Name = "integerValue_0_1", Optional = true, Type = _builtIns.Integer }); + _dataTypeTestConcept_integerValue_1 = new(() => new PropertyBase("DataTypeTestConcept-integerValue_1", DataTypeTestConcept, this) { Key = "DataTypeTestConcept-integerValue_1", Name = "integerValue_1", Optional = false, Type = _builtIns.Integer }); + _dataTypeTestConcept_stringValue_0_1 = new(() => new PropertyBase("DataTypeTestConcept-stringValue_0_1", DataTypeTestConcept, this) { Key = "DataTypeTestConcept-stringValue_0_1", Name = "stringValue_0_1", Optional = true, Type = _builtIns.String }); + _dataTypeTestConcept_stringValue_1 = new(() => new PropertyBase("DataTypeTestConcept-stringValue_1", DataTypeTestConcept, this) { Key = "DataTypeTestConcept-stringValue_1", Name = "stringValue_1", Optional = false, Type = _builtIns.String }); + _linkTestConcept = new(() => new ConceptBase("LinkTestConcept", this) { Key = "LinkTestConcept", Name = "LinkTestConcept", Abstract = false, Partition = true, ImplementsLazy = new(() => [_builtIns.INamed]), FeaturesLazy = new(() => [LinkTestConcept_containment_0_1, LinkTestConcept_containment_0_n, LinkTestConcept_containment_1, LinkTestConcept_containment_1_n, LinkTestConcept_reference_0_1, LinkTestConcept_reference_0_n, LinkTestConcept_reference_1, LinkTestConcept_reference_1_n]) }); + _linkTestConcept_containment_0_1 = new(() => new ContainmentBase("LinkTestConcept-containment_0_1", LinkTestConcept, this) { Key = "LinkTestConcept-containment_0_1", Name = "containment_0_1", Optional = true, Multiple = false, Type = LinkTestConcept }); + _linkTestConcept_containment_0_n = new(() => new ContainmentBase("LinkTestConcept-containment_0_n", LinkTestConcept, this) { Key = "LinkTestConcept-containment_0_n", Name = "containment_0_n", Optional = true, Multiple = true, Type = LinkTestConcept }); + _linkTestConcept_containment_1 = new(() => new ContainmentBase("LinkTestConcept-containment_1", LinkTestConcept, this) { Key = "LinkTestConcept-containment_1", Name = "containment_1", Optional = false, Multiple = false, Type = LinkTestConcept }); + _linkTestConcept_containment_1_n = new(() => new ContainmentBase("LinkTestConcept-containment_1_n", LinkTestConcept, this) { Key = "LinkTestConcept-containment_1_n", Name = "containment_1_n", Optional = false, Multiple = true, Type = LinkTestConcept }); + _linkTestConcept_reference_0_1 = new(() => new ReferenceBase("LinkTestConcept-reference_0_1", LinkTestConcept, this) { Key = "LinkTestConcept-reference_0_1", Name = "reference_0_1", Optional = true, Multiple = false, Type = LinkTestConcept }); + _linkTestConcept_reference_0_n = new(() => new ReferenceBase("LinkTestConcept-reference_0_n", LinkTestConcept, this) { Key = "LinkTestConcept-reference_0_n", Name = "reference_0_n", Optional = true, Multiple = true, Type = LinkTestConcept }); + _linkTestConcept_reference_1 = new(() => new ReferenceBase("LinkTestConcept-reference_1", LinkTestConcept, this) { Key = "LinkTestConcept-reference_1", Name = "reference_1", Optional = false, Multiple = false, Type = LinkTestConcept }); + _linkTestConcept_reference_1_n = new(() => new ReferenceBase("LinkTestConcept-reference_1_n", LinkTestConcept, this) { Key = "LinkTestConcept-reference_1_n", Name = "reference_1_n", Optional = false, Multiple = true, Type = LinkTestConcept }); + _secondTestEnumeration = new(() => new EnumerationBase("SecondTestEnumeration", this) { Key = "SecondTestEnumeration", Name = "SecondTestEnumeration", LiteralsLazy = new(() => [SecondTestEnumeration_literal1, SecondTestEnumeration_literal2, SecondTestEnumeration_literal3]) }); + _secondTestEnumeration_literal1 = new(() => new EnumerationLiteralBase("SecondTestEnumeration-literal1", SecondTestEnumeration, this) { Key = "SecondTestEnumeration-literal1", Name = "literal1" }); + _secondTestEnumeration_literal2 = new(() => new EnumerationLiteralBase("SecondTestEnumeration-literal2", SecondTestEnumeration, this) { Key = "SecondTestEnumeration-literal2", Name = "literal2" }); + _secondTestEnumeration_literal3 = new(() => new EnumerationLiteralBase("SecondTestEnumeration-literal3", SecondTestEnumeration, this) { Key = "SecondTestEnumeration-literal3", Name = "literal3" }); + _testAnnotation = new(() => new AnnotationBase("TestAnnotation", this) { Key = "TestAnnotation", Name = "TestAnnotation", AnnotatesLazy = new(() => _builtIns.Node) }); + _testEnumeration = new(() => new EnumerationBase("TestEnumeration", this) { Key = "TestEnumeration", Name = "TestEnumeration", LiteralsLazy = new(() => [TestEnumeration_literal1, TestEnumeration_literal2, TestEnumeration_literal3]) }); + _testEnumeration_literal1 = new(() => new EnumerationLiteralBase("TestEnumeration-literal1", TestEnumeration, this) { Key = "TestEnumeration-literal1", Name = "literal1" }); + _testEnumeration_literal2 = new(() => new EnumerationLiteralBase("TestEnumeration-literal2", TestEnumeration, this) { Key = "TestEnumeration-literal2", Name = "literal2" }); + _testEnumeration_literal3 = new(() => new EnumerationLiteralBase("TestEnumeration-literal3", TestEnumeration, this) { Key = "TestEnumeration-literal3", Name = "literal3" }); + _factory = new TestLanguageFactory(this); + } + + /// + public override IReadOnlyList Entities => [DataTypeTestConcept, LinkTestConcept, SecondTestEnumeration, TestAnnotation, TestEnumeration]; + /// + public override IReadOnlyList DependsOn => []; + + private const string _key = "TestLanguage"; + /// + public override string Key => _key; + + private const string _name = "TestLanguage"; + /// + public override string Name => _name; + + private const string _version = "0"; + /// + public override string Version => _version; + + private readonly Lazy _dataTypeTestConcept; + public Concept DataTypeTestConcept => _dataTypeTestConcept.Value; + + private readonly Lazy _dataTypeTestConcept_booleanValue_0_1; + public Property DataTypeTestConcept_booleanValue_0_1 => _dataTypeTestConcept_booleanValue_0_1.Value; + + private readonly Lazy _dataTypeTestConcept_booleanValue_1; + public Property DataTypeTestConcept_booleanValue_1 => _dataTypeTestConcept_booleanValue_1.Value; + + private readonly Lazy _dataTypeTestConcept_enumValue_0_1; + public Property DataTypeTestConcept_enumValue_0_1 => _dataTypeTestConcept_enumValue_0_1.Value; + + private readonly Lazy _dataTypeTestConcept_enumValue_1; + public Property DataTypeTestConcept_enumValue_1 => _dataTypeTestConcept_enumValue_1.Value; + + private readonly Lazy _dataTypeTestConcept_integerValue_0_1; + public Property DataTypeTestConcept_integerValue_0_1 => _dataTypeTestConcept_integerValue_0_1.Value; + + private readonly Lazy _dataTypeTestConcept_integerValue_1; + public Property DataTypeTestConcept_integerValue_1 => _dataTypeTestConcept_integerValue_1.Value; + + private readonly Lazy _dataTypeTestConcept_stringValue_0_1; + public Property DataTypeTestConcept_stringValue_0_1 => _dataTypeTestConcept_stringValue_0_1.Value; + + private readonly Lazy _dataTypeTestConcept_stringValue_1; + public Property DataTypeTestConcept_stringValue_1 => _dataTypeTestConcept_stringValue_1.Value; + + private readonly Lazy _linkTestConcept; + public Concept LinkTestConcept => _linkTestConcept.Value; + + private readonly Lazy _linkTestConcept_containment_0_1; + public Containment LinkTestConcept_containment_0_1 => _linkTestConcept_containment_0_1.Value; + + private readonly Lazy _linkTestConcept_containment_0_n; + public Containment LinkTestConcept_containment_0_n => _linkTestConcept_containment_0_n.Value; + + private readonly Lazy _linkTestConcept_containment_1; + public Containment LinkTestConcept_containment_1 => _linkTestConcept_containment_1.Value; + + private readonly Lazy _linkTestConcept_containment_1_n; + public Containment LinkTestConcept_containment_1_n => _linkTestConcept_containment_1_n.Value; + + private readonly Lazy _linkTestConcept_reference_0_1; + public Reference LinkTestConcept_reference_0_1 => _linkTestConcept_reference_0_1.Value; + + private readonly Lazy _linkTestConcept_reference_0_n; + public Reference LinkTestConcept_reference_0_n => _linkTestConcept_reference_0_n.Value; + + private readonly Lazy _linkTestConcept_reference_1; + public Reference LinkTestConcept_reference_1 => _linkTestConcept_reference_1.Value; + + private readonly Lazy _linkTestConcept_reference_1_n; + public Reference LinkTestConcept_reference_1_n => _linkTestConcept_reference_1_n.Value; + + private readonly Lazy _secondTestEnumeration; + public Enumeration SecondTestEnumeration => _secondTestEnumeration.Value; + + private readonly Lazy _secondTestEnumeration_literal1; + public EnumerationLiteral SecondTestEnumeration_literal1 => _secondTestEnumeration_literal1.Value; + + private readonly Lazy _secondTestEnumeration_literal2; + public EnumerationLiteral SecondTestEnumeration_literal2 => _secondTestEnumeration_literal2.Value; + + private readonly Lazy _secondTestEnumeration_literal3; + public EnumerationLiteral SecondTestEnumeration_literal3 => _secondTestEnumeration_literal3.Value; + + private readonly Lazy _testAnnotation; + public Annotation TestAnnotation => _testAnnotation.Value; + + private readonly Lazy _testEnumeration; + public Enumeration TestEnumeration => _testEnumeration.Value; + + private readonly Lazy _testEnumeration_literal1; + public EnumerationLiteral TestEnumeration_literal1 => _testEnumeration_literal1.Value; + + private readonly Lazy _testEnumeration_literal2; + public EnumerationLiteral TestEnumeration_literal2 => _testEnumeration_literal2.Value; + + private readonly Lazy _testEnumeration_literal3; + public EnumerationLiteral TestEnumeration_literal3 => _testEnumeration_literal3.Value; +} + +public partial interface ITestLanguageFactory : INodeFactory +{ + public DataTypeTestConcept NewDataTypeTestConcept(string id); + public DataTypeTestConcept CreateDataTypeTestConcept(); + public LinkTestConcept NewLinkTestConcept(string id); + public LinkTestConcept CreateLinkTestConcept(); + public TestAnnotation NewTestAnnotation(string id); + public TestAnnotation CreateTestAnnotation(); +} + +public class TestLanguageFactory : AbstractBaseNodeFactory, ITestLanguageFactory +{ + private readonly TestLanguageLanguage _language; + public TestLanguageFactory(TestLanguageLanguage language) : base(language) + { + _language = language; + } + + /// + public override INode CreateNode(string id, Classifier classifier) + { + if (_language.DataTypeTestConcept.EqualsIdentity(classifier)) + return NewDataTypeTestConcept(id); + if (_language.LinkTestConcept.EqualsIdentity(classifier)) + return NewLinkTestConcept(id); + if (_language.TestAnnotation.EqualsIdentity(classifier)) + return NewTestAnnotation(id); + throw new UnsupportedClassifierException(classifier); + } + + /// + public override Enum GetEnumerationLiteral(EnumerationLiteral literal) + { + if (_language.SecondTestEnumeration.EqualsIdentity(literal.GetEnumeration())) + return EnumValueFor(literal); + if (_language.TestEnumeration.EqualsIdentity(literal.GetEnumeration())) + return EnumValueFor(literal); + throw new UnsupportedEnumerationLiteralException(literal); + } + + /// + public override IStructuredDataTypeInstance CreateStructuredDataTypeInstance(StructuredDataType structuredDataType, IFieldValues fieldValues) + { + throw new UnsupportedStructuredDataTypeException(structuredDataType); + } + + public virtual DataTypeTestConcept NewDataTypeTestConcept(string id) => new(id); + public virtual DataTypeTestConcept CreateDataTypeTestConcept() => NewDataTypeTestConcept(GetNewId()); + public virtual LinkTestConcept NewLinkTestConcept(string id) => new(id); + public virtual LinkTestConcept CreateLinkTestConcept() => NewLinkTestConcept(GetNewId()); + public virtual TestAnnotation NewTestAnnotation(string id) => new(id); + public virtual TestAnnotation CreateTestAnnotation() => NewTestAnnotation(GetNewId()); +} + +[LionCoreMetaPointer(Language = typeof(TestLanguageLanguage), Key = "DataTypeTestConcept")] +public partial class DataTypeTestConcept : ConceptInstanceBase, IPartitionInstance +{ + private bool? _booleanValue_0_1 = null; + /// Optional Property + [LionCoreMetaPointer(Language = typeof(TestLanguageLanguage), Key = "DataTypeTestConcept-booleanValue_0_1")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Property, Optional = true, Multiple = false)] + public bool? BooleanValue_0_1 { get => _booleanValue_0_1; set => SetBooleanValue_0_1(value); } + + /// Optional Property + public bool TryGetBooleanValue_0_1([NotNullWhenAttribute(true)] out bool? booleanValue_0_1) + { + booleanValue_0_1 = _booleanValue_0_1; + return _booleanValue_0_1 != null; + } + + /// Optional Property + public DataTypeTestConcept SetBooleanValue_0_1(bool? value) + { + PropertyEventEmitter evt = new(TestLanguageLanguage.Instance.DataTypeTestConcept_booleanValue_0_1, this, value, _booleanValue_0_1); + evt.CollectOldData(); + _booleanValue_0_1 = value; + evt.RaiseEvent(); + return this; + } + + private bool? _booleanValue_1 = null; + /// Required Property + /// If BooleanValue_1 has not been set + [LionCoreMetaPointer(Language = typeof(TestLanguageLanguage), Key = "DataTypeTestConcept-booleanValue_1")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Property, Optional = false, Multiple = false)] + public bool BooleanValue_1 { get => _booleanValue_1 ?? throw new UnsetFeatureException(TestLanguageLanguage.Instance.DataTypeTestConcept_booleanValue_1); set => SetBooleanValue_1(value); } + + /// Required Property + public bool TryGetBooleanValue_1([NotNullWhenAttribute(true)] out bool? booleanValue_1) + { + booleanValue_1 = _booleanValue_1; + return _booleanValue_1 != null; + } + + /// Required Property + public DataTypeTestConcept SetBooleanValue_1(bool value) + { + PropertyEventEmitter evt = new(TestLanguageLanguage.Instance.DataTypeTestConcept_booleanValue_1, this, value, _booleanValue_1); + evt.CollectOldData(); + _booleanValue_1 = value; + evt.RaiseEvent(); + return this; + } + + private TestEnumeration? _enumValue_0_1 = null; + /// Optional Property + [LionCoreMetaPointer(Language = typeof(TestLanguageLanguage), Key = "DataTypeTestConcept-enumValue_0_1")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Property, Optional = true, Multiple = false)] + public TestEnumeration? EnumValue_0_1 { get => _enumValue_0_1; set => SetEnumValue_0_1(value); } + + /// Optional Property + public bool TryGetEnumValue_0_1([NotNullWhenAttribute(true)] out TestEnumeration? enumValue_0_1) + { + enumValue_0_1 = _enumValue_0_1; + return _enumValue_0_1 != null; + } + + /// Optional Property + public DataTypeTestConcept SetEnumValue_0_1(TestEnumeration? value) + { + PropertyEventEmitter evt = new(TestLanguageLanguage.Instance.DataTypeTestConcept_enumValue_0_1, this, value, _enumValue_0_1); + evt.CollectOldData(); + _enumValue_0_1 = value; + evt.RaiseEvent(); + return this; + } + + private TestEnumeration? _enumValue_1 = null; + /// Required Property + /// If EnumValue_1 has not been set + /// If set to null + [LionCoreMetaPointer(Language = typeof(TestLanguageLanguage), Key = "DataTypeTestConcept-enumValue_1")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Property, Optional = false, Multiple = false)] + public TestEnumeration EnumValue_1 { get => _enumValue_1 ?? throw new UnsetFeatureException(TestLanguageLanguage.Instance.DataTypeTestConcept_enumValue_1); set => SetEnumValue_1(value); } + + /// Required Property + /// If set to null + public bool TryGetEnumValue_1([NotNullWhenAttribute(true)] out TestEnumeration? enumValue_1) + { + enumValue_1 = _enumValue_1; + return _enumValue_1 != null; + } + + /// Required Property + /// If set to null + public DataTypeTestConcept SetEnumValue_1(TestEnumeration value) + { + AssureNotNull(value, TestLanguageLanguage.Instance.DataTypeTestConcept_enumValue_1); + PropertyEventEmitter evt = new(TestLanguageLanguage.Instance.DataTypeTestConcept_enumValue_1, this, value, _enumValue_1); + evt.CollectOldData(); + _enumValue_1 = value; + evt.RaiseEvent(); + return this; + } + + private int? _integerValue_0_1 = null; + /// Optional Property + [LionCoreMetaPointer(Language = typeof(TestLanguageLanguage), Key = "DataTypeTestConcept-integerValue_0_1")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Property, Optional = true, Multiple = false)] + public int? IntegerValue_0_1 { get => _integerValue_0_1; set => SetIntegerValue_0_1(value); } + + /// Optional Property + public bool TryGetIntegerValue_0_1([NotNullWhenAttribute(true)] out int? integerValue_0_1) + { + integerValue_0_1 = _integerValue_0_1; + return _integerValue_0_1 != null; + } + + /// Optional Property + public DataTypeTestConcept SetIntegerValue_0_1(int? value) + { + PropertyEventEmitter evt = new(TestLanguageLanguage.Instance.DataTypeTestConcept_integerValue_0_1, this, value, _integerValue_0_1); + evt.CollectOldData(); + _integerValue_0_1 = value; + evt.RaiseEvent(); + return this; + } + + private int? _integerValue_1 = null; + /// Required Property + /// If IntegerValue_1 has not been set + [LionCoreMetaPointer(Language = typeof(TestLanguageLanguage), Key = "DataTypeTestConcept-integerValue_1")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Property, Optional = false, Multiple = false)] + public int IntegerValue_1 { get => _integerValue_1 ?? throw new UnsetFeatureException(TestLanguageLanguage.Instance.DataTypeTestConcept_integerValue_1); set => SetIntegerValue_1(value); } + + /// Required Property + public bool TryGetIntegerValue_1([NotNullWhenAttribute(true)] out int? integerValue_1) + { + integerValue_1 = _integerValue_1; + return _integerValue_1 != null; + } + + /// Required Property + public DataTypeTestConcept SetIntegerValue_1(int value) + { + PropertyEventEmitter evt = new(TestLanguageLanguage.Instance.DataTypeTestConcept_integerValue_1, this, value, _integerValue_1); + evt.CollectOldData(); + _integerValue_1 = value; + evt.RaiseEvent(); + return this; + } + + private string? _stringValue_0_1 = null; + /// Optional Property + [LionCoreMetaPointer(Language = typeof(TestLanguageLanguage), Key = "DataTypeTestConcept-stringValue_0_1")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Property, Optional = true, Multiple = false)] + public string? StringValue_0_1 { get => _stringValue_0_1; set => SetStringValue_0_1(value); } + + /// Optional Property + public bool TryGetStringValue_0_1([NotNullWhenAttribute(true)] out string? stringValue_0_1) + { + stringValue_0_1 = _stringValue_0_1; + return _stringValue_0_1 != null; + } + + /// Optional Property + public DataTypeTestConcept SetStringValue_0_1(string? value) + { + PropertyEventEmitter evt = new(TestLanguageLanguage.Instance.DataTypeTestConcept_stringValue_0_1, this, value, _stringValue_0_1); + evt.CollectOldData(); + _stringValue_0_1 = value; + evt.RaiseEvent(); + return this; + } + + private string? _stringValue_1 = null; + /// Required Property + /// If StringValue_1 has not been set + /// If set to null + [LionCoreMetaPointer(Language = typeof(TestLanguageLanguage), Key = "DataTypeTestConcept-stringValue_1")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Property, Optional = false, Multiple = false)] + public string StringValue_1 { get => _stringValue_1 ?? throw new UnsetFeatureException(TestLanguageLanguage.Instance.DataTypeTestConcept_stringValue_1); set => SetStringValue_1(value); } + + /// Required Property + /// If set to null + public bool TryGetStringValue_1([NotNullWhenAttribute(true)] out string? stringValue_1) + { + stringValue_1 = _stringValue_1; + return _stringValue_1 != null; + } + + /// Required Property + /// If set to null + public DataTypeTestConcept SetStringValue_1(string value) + { + AssureNotNull(value, TestLanguageLanguage.Instance.DataTypeTestConcept_stringValue_1); + PropertyEventEmitter evt = new(TestLanguageLanguage.Instance.DataTypeTestConcept_stringValue_1, this, value, _stringValue_1); + evt.CollectOldData(); + _stringValue_1 = value; + evt.RaiseEvent(); + return this; + } + + public DataTypeTestConcept(string id) : base(id) + { + _eventHandler = new(this); + } + + /// + public override Concept GetConcept() => TestLanguageLanguage.Instance.DataTypeTestConcept; + private readonly PartitionEventHandler _eventHandler; + public IPartitionPublisher? GetPublisher() => _eventHandler; + public IPartitionCommander? GetCommander() => _eventHandler; + /// + protected override bool GetInternal(Feature? feature, out Object? result) + { + if (base.GetInternal(feature, out result)) + return true; + if (TestLanguageLanguage.Instance.DataTypeTestConcept_booleanValue_0_1.EqualsIdentity(feature)) + { + result = BooleanValue_0_1; + return true; + } + + if (TestLanguageLanguage.Instance.DataTypeTestConcept_booleanValue_1.EqualsIdentity(feature)) + { + result = BooleanValue_1; + return true; + } + + if (TestLanguageLanguage.Instance.DataTypeTestConcept_enumValue_0_1.EqualsIdentity(feature)) + { + result = EnumValue_0_1; + return true; + } + + if (TestLanguageLanguage.Instance.DataTypeTestConcept_enumValue_1.EqualsIdentity(feature)) + { + result = EnumValue_1; + return true; + } + + if (TestLanguageLanguage.Instance.DataTypeTestConcept_integerValue_0_1.EqualsIdentity(feature)) + { + result = IntegerValue_0_1; + return true; + } + + if (TestLanguageLanguage.Instance.DataTypeTestConcept_integerValue_1.EqualsIdentity(feature)) + { + result = IntegerValue_1; + return true; + } + + if (TestLanguageLanguage.Instance.DataTypeTestConcept_stringValue_0_1.EqualsIdentity(feature)) + { + result = StringValue_0_1; + return true; + } + + if (TestLanguageLanguage.Instance.DataTypeTestConcept_stringValue_1.EqualsIdentity(feature)) + { + result = StringValue_1; + return true; + } + + return false; + } + + /// + protected override bool SetInternal(Feature? feature, Object? value) + { + if (base.SetInternal(feature, value)) + return true; + if (TestLanguageLanguage.Instance.DataTypeTestConcept_booleanValue_0_1.EqualsIdentity(feature)) + { + if (value is null or bool) + { + BooleanValue_0_1 = (bool?)value; + return true; + } + + throw new InvalidValueException(feature, value); + } + + if (TestLanguageLanguage.Instance.DataTypeTestConcept_booleanValue_1.EqualsIdentity(feature)) + { + if (value is bool v) + { + BooleanValue_1 = v; + return true; + } + + throw new InvalidValueException(feature, value); + } + + if (TestLanguageLanguage.Instance.DataTypeTestConcept_enumValue_0_1.EqualsIdentity(feature)) + { + if (value is null or LionWeb.Integration.Languages.Generated.V2023_1.TestLanguage.M2.TestEnumeration) + { + EnumValue_0_1 = (LionWeb.Integration.Languages.Generated.V2023_1.TestLanguage.M2.TestEnumeration?)value; + return true; + } + + throw new InvalidValueException(feature, value); + } + + if (TestLanguageLanguage.Instance.DataTypeTestConcept_enumValue_1.EqualsIdentity(feature)) + { + if (value is LionWeb.Integration.Languages.Generated.V2023_1.TestLanguage.M2.TestEnumeration v) + { + EnumValue_1 = v; + return true; + } + + throw new InvalidValueException(feature, value); + } + + if (TestLanguageLanguage.Instance.DataTypeTestConcept_integerValue_0_1.EqualsIdentity(feature)) + { + if (value is null or int) + { + IntegerValue_0_1 = (int?)value; + return true; + } + + throw new InvalidValueException(feature, value); + } + + if (TestLanguageLanguage.Instance.DataTypeTestConcept_integerValue_1.EqualsIdentity(feature)) + { + if (value is int v) + { + IntegerValue_1 = v; + return true; + } + + throw new InvalidValueException(feature, value); + } + + if (TestLanguageLanguage.Instance.DataTypeTestConcept_stringValue_0_1.EqualsIdentity(feature)) + { + if (value is null or string) + { + StringValue_0_1 = (string?)value; + return true; + } + + throw new InvalidValueException(feature, value); + } + + if (TestLanguageLanguage.Instance.DataTypeTestConcept_stringValue_1.EqualsIdentity(feature)) + { + if (value is string v) + { + StringValue_1 = v; + return true; + } + + throw new InvalidValueException(feature, value); + } + + return false; + } + + /// + public override IEnumerable CollectAllSetFeatures() + { + List result = base.CollectAllSetFeatures().ToList(); + if (_booleanValue_0_1 != default) + result.Add(TestLanguageLanguage.Instance.DataTypeTestConcept_booleanValue_0_1); + if (_booleanValue_1 != default) + result.Add(TestLanguageLanguage.Instance.DataTypeTestConcept_booleanValue_1); + if (_enumValue_0_1 != default) + result.Add(TestLanguageLanguage.Instance.DataTypeTestConcept_enumValue_0_1); + if (_enumValue_1 != default) + result.Add(TestLanguageLanguage.Instance.DataTypeTestConcept_enumValue_1); + if (_integerValue_0_1 != default) + result.Add(TestLanguageLanguage.Instance.DataTypeTestConcept_integerValue_0_1); + if (_integerValue_1 != default) + result.Add(TestLanguageLanguage.Instance.DataTypeTestConcept_integerValue_1); + if (_stringValue_0_1 != default) + result.Add(TestLanguageLanguage.Instance.DataTypeTestConcept_stringValue_0_1); + if (_stringValue_1 != default) + result.Add(TestLanguageLanguage.Instance.DataTypeTestConcept_stringValue_1); + return result; + } +} + +[LionCoreMetaPointer(Language = typeof(TestLanguageLanguage), Key = "LinkTestConcept")] +public partial class LinkTestConcept : ConceptInstanceBase, INamedWritable, IPartitionInstance +{ + private string? _name = null; + /// Required Property + /// If Name has not been set + /// If set to null + [LionCoreMetaPointer(Language = typeof(LionWeb.Core.VersionSpecific.V2023_1.BuiltInsLanguage_2023_1), Key = "LionCore-builtins-INamed-name")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Property, Optional = false, Multiple = false)] + public string Name { get => _name ?? throw new UnsetFeatureException(_builtIns.INamed_name); set => SetName(value); } + + /// Required Property + /// If set to null + public bool TryGetName([NotNullWhenAttribute(true)] out string? name) + { + name = _name; + return _name != null; + } +/// Required Property +/// If set to null + INamedWritable INamedWritable.SetName(string value) => SetName(value); + /// Required Property + /// If set to null + public LinkTestConcept SetName(string value) + { + AssureNotNull(value, _builtIns.INamed_name); + PropertyEventEmitter evt = new(_builtIns.INamed_name, this, value, _name); + evt.CollectOldData(); + _name = value; + evt.RaiseEvent(); + return this; + } + + private LinkTestConcept? _containment_0_1 = null; + /// Optional Single Containment + [LionCoreMetaPointer(Language = typeof(TestLanguageLanguage), Key = "LinkTestConcept-containment_0_1")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Containment, Optional = true, Multiple = true)] + public LinkTestConcept? Containment_0_1 { get => _containment_0_1; set => SetContainment_0_1(value); } + + /// Optional Single Containment + public bool TryGetContainment_0_1([NotNullWhenAttribute(true)] out LinkTestConcept? containment_0_1) + { + containment_0_1 = _containment_0_1; + return _containment_0_1 != null; + } + + /// Optional Single Containment + public LinkTestConcept SetContainment_0_1(LinkTestConcept? value) + { + ContainmentSingleEventEmitter evt = new(TestLanguageLanguage.Instance.LinkTestConcept_containment_0_1, this, value, _containment_0_1); + evt.CollectOldData(); + SetParentNull(_containment_0_1); + AttachChild(value); + _containment_0_1 = value; + evt.RaiseEvent(); + return this; + } + + private readonly List _containment_0_n = []; + /// Optional Multiple Containment + [LionCoreMetaPointer(Language = typeof(TestLanguageLanguage), Key = "LinkTestConcept-containment_0_n")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Containment, Optional = true, Multiple = true)] + public IReadOnlyList Containment_0_n { get => _containment_0_n.AsReadOnly(); init => AddContainment_0_n(value); } + + /// Optional Multiple Containment + public bool TryGetContainment_0_n([NotNullWhenAttribute(true)] out IReadOnlyList containment_0_n) + { + containment_0_n = _containment_0_n; + return _containment_0_n.Count != 0; + } + + /// Optional Multiple Containment + public LinkTestConcept AddContainment_0_n(IEnumerable nodes) + { + var safeNodes = nodes?.ToList(); + AssureNotNull(safeNodes, TestLanguageLanguage.Instance.LinkTestConcept_containment_0_n); + AssureNotNullMembers(safeNodes, TestLanguageLanguage.Instance.LinkTestConcept_containment_0_n); + ContainmentAddMultipleEventEmitter evt = new(TestLanguageLanguage.Instance.LinkTestConcept_containment_0_n, this, safeNodes, _containment_0_n, null); + evt.CollectOldData(); + _containment_0_n.AddRange(SetSelfParent(safeNodes, TestLanguageLanguage.Instance.LinkTestConcept_containment_0_n)); + evt.RaiseEvent(); + return this; + } + + /// Optional Multiple Containment + public LinkTestConcept InsertContainment_0_n(int index, IEnumerable nodes) + { + AssureInRange(index, _containment_0_n); + var safeNodes = nodes?.ToList(); + AssureNotNull(safeNodes, TestLanguageLanguage.Instance.LinkTestConcept_containment_0_n); + AssureNoSelfMove(index, safeNodes, _containment_0_n); + AssureNotNullMembers(safeNodes, TestLanguageLanguage.Instance.LinkTestConcept_containment_0_n); + ContainmentAddMultipleEventEmitter evt = new(TestLanguageLanguage.Instance.LinkTestConcept_containment_0_n, this, safeNodes, _containment_0_n, index); + evt.CollectOldData(); + _containment_0_n.InsertRange(index, SetSelfParent(safeNodes, TestLanguageLanguage.Instance.LinkTestConcept_containment_0_n)); + evt.RaiseEvent(); + return this; + } + + /// Optional Multiple Containment + public LinkTestConcept RemoveContainment_0_n(IEnumerable nodes) + { + RemoveSelfParent(nodes?.ToList(), _containment_0_n, TestLanguageLanguage.Instance.LinkTestConcept_containment_0_n, ContainmentRemover(TestLanguageLanguage.Instance.LinkTestConcept_containment_0_n)); + return this; + } + + private LinkTestConcept? _containment_1 = null; + /// Required Single Containment + /// If Containment_1 has not been set + /// If set to null + [LionCoreMetaPointer(Language = typeof(TestLanguageLanguage), Key = "LinkTestConcept-containment_1")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Containment, Optional = false, Multiple = false)] + public LinkTestConcept Containment_1 { get => _containment_1 ?? throw new UnsetFeatureException(TestLanguageLanguage.Instance.LinkTestConcept_containment_1); set => SetContainment_1(value); } + + /// Required Single Containment + public bool TryGetContainment_1([NotNullWhenAttribute(true)] out LinkTestConcept? containment_1) + { + containment_1 = _containment_1; + return _containment_1 != null; + } + + /// Required Single Containment + /// If set to null + public LinkTestConcept SetContainment_1(LinkTestConcept value) + { + AssureNotNull(value, TestLanguageLanguage.Instance.LinkTestConcept_containment_1); + ContainmentSingleEventEmitter evt = new(TestLanguageLanguage.Instance.LinkTestConcept_containment_1, this, value, _containment_1); + evt.CollectOldData(); + SetParentNull(_containment_1); + AttachChild(value); + _containment_1 = value; + evt.RaiseEvent(); + return this; + } + + private readonly List _containment_1_n = []; + /// Required Multiple Containment + /// If Containment_1_n is empty + [LionCoreMetaPointer(Language = typeof(TestLanguageLanguage), Key = "LinkTestConcept-containment_1_n")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Containment, Optional = false, Multiple = false)] + public IReadOnlyList Containment_1_n { get => AsNonEmptyReadOnly(_containment_1_n, TestLanguageLanguage.Instance.LinkTestConcept_containment_1_n); init => AddContainment_1_n(value); } + + /// Required Multiple Containment + public bool TryGetContainment_1_n([NotNullWhenAttribute(true)] out IReadOnlyList containment_1_n) + { + containment_1_n = _containment_1_n; + return _containment_1_n.Count != 0; + } + + /// Required Multiple Containment + /// If both Containment_1_n and nodes are empty + public LinkTestConcept AddContainment_1_n(IEnumerable nodes) + { + var safeNodes = nodes?.ToList(); + AssureNonEmpty(safeNodes, _containment_1_n, TestLanguageLanguage.Instance.LinkTestConcept_containment_1_n); + ContainmentAddMultipleEventEmitter evt = new(TestLanguageLanguage.Instance.LinkTestConcept_containment_1_n, this, safeNodes, _containment_1_n, null); + evt.CollectOldData(); + _containment_1_n.AddRange(SetSelfParent(safeNodes, TestLanguageLanguage.Instance.LinkTestConcept_containment_1_n)); + evt.RaiseEvent(); + return this; + } + + /// Required Multiple Containment + /// If both Containment_1_n and nodes are empty + /// If index negative or greater than Containment_1_n.Count + public LinkTestConcept InsertContainment_1_n(int index, IEnumerable nodes) + { + AssureInRange(index, _containment_1_n); + var safeNodes = nodes?.ToList(); + AssureNonEmpty(safeNodes, _containment_1_n, TestLanguageLanguage.Instance.LinkTestConcept_containment_1_n); + AssureNoSelfMove(index, safeNodes, _containment_1_n); + ContainmentAddMultipleEventEmitter evt = new(TestLanguageLanguage.Instance.LinkTestConcept_containment_1_n, this, safeNodes, _containment_1_n, index); + evt.CollectOldData(); + _containment_1_n.InsertRange(index, SetSelfParent(safeNodes, TestLanguageLanguage.Instance.LinkTestConcept_containment_1_n)); + evt.RaiseEvent(); + return this; + } + + /// Required Multiple Containment + /// If Containment_1_n would be empty + public LinkTestConcept RemoveContainment_1_n(IEnumerable nodes) + { + var safeNodes = nodes?.ToList(); + AssureNotNull(safeNodes, TestLanguageLanguage.Instance.LinkTestConcept_containment_1_n); + AssureNotClearing(safeNodes, _containment_1_n, TestLanguageLanguage.Instance.LinkTestConcept_containment_1_n); + RemoveSelfParent(safeNodes, _containment_1_n, TestLanguageLanguage.Instance.LinkTestConcept_containment_1_n, ContainmentRemover(TestLanguageLanguage.Instance.LinkTestConcept_containment_1_n)); + return this; + } + + private LinkTestConcept? _reference_0_1 = null; + /// Optional Single Reference + [LionCoreMetaPointer(Language = typeof(TestLanguageLanguage), Key = "LinkTestConcept-reference_0_1")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Reference, Optional = true, Multiple = true)] + public LinkTestConcept? Reference_0_1 { get => _reference_0_1; set => SetReference_0_1(value); } + + /// Optional Single Reference + public bool TryGetReference_0_1([NotNullWhenAttribute(true)] out LinkTestConcept? reference_0_1) + { + reference_0_1 = _reference_0_1; + return _reference_0_1 != null; + } + + /// Optional Single Reference + public LinkTestConcept SetReference_0_1(LinkTestConcept? value) + { + ReferenceSingleEventEmitter evt = new(TestLanguageLanguage.Instance.LinkTestConcept_reference_0_1, this, value, _reference_0_1); + evt.CollectOldData(); + _reference_0_1 = value; + evt.RaiseEvent(); + return this; + } + + private readonly List _reference_0_n = []; + /// Optional Multiple Reference + [LionCoreMetaPointer(Language = typeof(TestLanguageLanguage), Key = "LinkTestConcept-reference_0_n")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Reference, Optional = true, Multiple = true)] + public IReadOnlyList Reference_0_n { get => _reference_0_n.AsReadOnly(); init => AddReference_0_n(value); } + + /// Optional Multiple Reference + public bool TryGetReference_0_n([NotNullWhenAttribute(true)] out IReadOnlyList reference_0_n) + { + reference_0_n = _reference_0_n; + return _reference_0_n.Count != 0; + } + + /// Optional Multiple Reference + public LinkTestConcept AddReference_0_n(IEnumerable nodes) + { + var safeNodes = nodes?.ToList(); + AssureNotNull(safeNodes, TestLanguageLanguage.Instance.LinkTestConcept_reference_0_n); + AssureNotNullMembers(safeNodes, TestLanguageLanguage.Instance.LinkTestConcept_reference_0_n); + ReferenceAddMultipleEventEmitter evt = new(TestLanguageLanguage.Instance.LinkTestConcept_reference_0_n, this, safeNodes, _reference_0_n.Count); + evt.CollectOldData(); + _reference_0_n.AddRange(safeNodes); + evt.RaiseEvent(); + return this; + } + + /// Optional Multiple Reference + public LinkTestConcept InsertReference_0_n(int index, IEnumerable nodes) + { + AssureInRange(index, _reference_0_n); + var safeNodes = nodes?.ToList(); + AssureNotNull(safeNodes, TestLanguageLanguage.Instance.LinkTestConcept_reference_0_n); + AssureNotNullMembers(safeNodes, TestLanguageLanguage.Instance.LinkTestConcept_reference_0_n); + ReferenceAddMultipleEventEmitter evt = new(TestLanguageLanguage.Instance.LinkTestConcept_reference_0_n, this, safeNodes, index); + evt.CollectOldData(); + _reference_0_n.InsertRange(index, safeNodes); + evt.RaiseEvent(); + return this; + } + + /// Optional Multiple Reference + public LinkTestConcept RemoveReference_0_n(IEnumerable nodes) + { + var safeNodes = nodes?.ToList(); + AssureNotNull(safeNodes, TestLanguageLanguage.Instance.LinkTestConcept_reference_0_n); + AssureNotNullMembers(safeNodes, TestLanguageLanguage.Instance.LinkTestConcept_reference_0_n); + RemoveAll(safeNodes, _reference_0_n, ReferenceRemover(TestLanguageLanguage.Instance.LinkTestConcept_reference_0_n)); + return this; + } + + private LinkTestConcept? _reference_1 = null; + /// Required Single Reference + /// If Reference_1 has not been set + /// If set to null + [LionCoreMetaPointer(Language = typeof(TestLanguageLanguage), Key = "LinkTestConcept-reference_1")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Reference, Optional = false, Multiple = false)] + public LinkTestConcept Reference_1 { get => _reference_1 ?? throw new UnsetFeatureException(TestLanguageLanguage.Instance.LinkTestConcept_reference_1); set => SetReference_1(value); } + + /// Required Single Reference + public bool TryGetReference_1([NotNullWhenAttribute(true)] out LinkTestConcept? reference_1) + { + reference_1 = _reference_1; + return _reference_1 != null; + } + + /// Required Single Reference + /// If set to null + public LinkTestConcept SetReference_1(LinkTestConcept value) + { + AssureNotNull(value, TestLanguageLanguage.Instance.LinkTestConcept_reference_1); + ReferenceSingleEventEmitter evt = new(TestLanguageLanguage.Instance.LinkTestConcept_reference_1, this, value, _reference_1); + evt.CollectOldData(); + _reference_1 = value; + evt.RaiseEvent(); + return this; + } + + private readonly List _reference_1_n = []; + /// Required Multiple Reference + /// If Reference_1_n is empty + [LionCoreMetaPointer(Language = typeof(TestLanguageLanguage), Key = "LinkTestConcept-reference_1_n")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Reference, Optional = false, Multiple = false)] + public IReadOnlyList Reference_1_n { get => AsNonEmptyReadOnly(_reference_1_n, TestLanguageLanguage.Instance.LinkTestConcept_reference_1_n); init => AddReference_1_n(value); } + + /// Required Multiple Reference + public bool TryGetReference_1_n([NotNullWhenAttribute(true)] out IReadOnlyList reference_1_n) + { + reference_1_n = _reference_1_n; + return _reference_1_n.Count != 0; + } + + /// Required Multiple Reference + /// If both Reference_1_n and nodes are empty + public LinkTestConcept AddReference_1_n(IEnumerable nodes) + { + var safeNodes = nodes?.ToList(); + AssureNotNull(safeNodes, TestLanguageLanguage.Instance.LinkTestConcept_reference_1_n); + AssureNonEmpty(safeNodes, _reference_1_n, TestLanguageLanguage.Instance.LinkTestConcept_reference_1_n); + ReferenceAddMultipleEventEmitter evt = new(TestLanguageLanguage.Instance.LinkTestConcept_reference_1_n, this, safeNodes, _reference_1_n.Count); + evt.CollectOldData(); + _reference_1_n.AddRange(safeNodes); + evt.RaiseEvent(); + return this; + } + + /// Required Multiple Reference + /// If both Reference_1_n and nodes are empty + /// If index negative or greater than Reference_1_n.Count + public LinkTestConcept InsertReference_1_n(int index, IEnumerable nodes) + { + AssureInRange(index, _reference_1_n); + var safeNodes = nodes?.ToList(); + AssureNotNull(safeNodes, TestLanguageLanguage.Instance.LinkTestConcept_reference_1_n); + AssureNonEmpty(safeNodes, _reference_1_n, TestLanguageLanguage.Instance.LinkTestConcept_reference_1_n); + ReferenceAddMultipleEventEmitter evt = new(TestLanguageLanguage.Instance.LinkTestConcept_reference_1_n, this, safeNodes, index); + evt.CollectOldData(); + _reference_1_n.InsertRange(index, safeNodes); + evt.RaiseEvent(); + return this; + } + + /// Required Multiple Reference + /// If Reference_1_n would be empty + public LinkTestConcept RemoveReference_1_n(IEnumerable nodes) + { + var safeNodes = nodes?.ToList(); + AssureNotNull(safeNodes, TestLanguageLanguage.Instance.LinkTestConcept_reference_1_n); + AssureNonEmpty(safeNodes, _reference_1_n, TestLanguageLanguage.Instance.LinkTestConcept_reference_1_n); + AssureNotClearing(safeNodes, _reference_1_n, TestLanguageLanguage.Instance.LinkTestConcept_reference_1_n); + RemoveAll(safeNodes, _reference_1_n, ReferenceRemover(TestLanguageLanguage.Instance.LinkTestConcept_reference_1_n)); + return this; + } + + public LinkTestConcept(string id) : base(id) + { + _eventHandler = new(this); + } + + /// + public override Concept GetConcept() => TestLanguageLanguage.Instance.LinkTestConcept; + private readonly PartitionEventHandler _eventHandler; + public IPartitionPublisher? GetPublisher() => _eventHandler; + public IPartitionCommander? GetCommander() => _eventHandler; + /// + protected override bool GetInternal(Feature? feature, out Object? result) + { + if (base.GetInternal(feature, out result)) + return true; + if (_builtIns.INamed_name.EqualsIdentity(feature)) + { + result = Name; + return true; + } + + if (TestLanguageLanguage.Instance.LinkTestConcept_containment_0_1.EqualsIdentity(feature)) + { + result = Containment_0_1; + return true; + } + + if (TestLanguageLanguage.Instance.LinkTestConcept_containment_0_n.EqualsIdentity(feature)) + { + result = Containment_0_n; + return true; + } + + if (TestLanguageLanguage.Instance.LinkTestConcept_containment_1.EqualsIdentity(feature)) + { + result = Containment_1; + return true; + } + + if (TestLanguageLanguage.Instance.LinkTestConcept_containment_1_n.EqualsIdentity(feature)) + { + result = Containment_1_n; + return true; + } + + if (TestLanguageLanguage.Instance.LinkTestConcept_reference_0_1.EqualsIdentity(feature)) + { + result = Reference_0_1; + return true; + } + + if (TestLanguageLanguage.Instance.LinkTestConcept_reference_0_n.EqualsIdentity(feature)) + { + result = Reference_0_n; + return true; + } + + if (TestLanguageLanguage.Instance.LinkTestConcept_reference_1.EqualsIdentity(feature)) + { + result = Reference_1; + return true; + } + + if (TestLanguageLanguage.Instance.LinkTestConcept_reference_1_n.EqualsIdentity(feature)) + { + result = Reference_1_n; + return true; + } + + return false; + } + + /// + protected override bool SetInternal(Feature? feature, Object? value) + { + if (base.SetInternal(feature, value)) + return true; + if (_builtIns.INamed_name.EqualsIdentity(feature)) + { + if (value is string v) + { + Name = v; + return true; + } + + throw new InvalidValueException(feature, value); + } + + if (TestLanguageLanguage.Instance.LinkTestConcept_containment_0_1.EqualsIdentity(feature)) + { + if (value is null or LionWeb.Integration.Languages.Generated.V2023_1.TestLanguage.M2.LinkTestConcept) + { + Containment_0_1 = (LionWeb.Integration.Languages.Generated.V2023_1.TestLanguage.M2.LinkTestConcept?)value; + return true; + } + + throw new InvalidValueException(feature, value); + } + + if (TestLanguageLanguage.Instance.LinkTestConcept_containment_0_n.EqualsIdentity(feature)) + { + var safeNodes = TestLanguageLanguage.Instance.LinkTestConcept_containment_0_n.AsNodes(value).ToList(); + ContainmentSetEventEmitter evt = new(TestLanguageLanguage.Instance.LinkTestConcept_containment_0_n, this, safeNodes, _containment_0_n); + evt.CollectOldData(); + RemoveSelfParent(_containment_0_n.ToList(), _containment_0_n, TestLanguageLanguage.Instance.LinkTestConcept_containment_0_n); + _containment_0_n.AddRange(SetSelfParent(safeNodes, TestLanguageLanguage.Instance.LinkTestConcept_containment_0_n)); + evt.RaiseEvent(); + return true; + } + + if (TestLanguageLanguage.Instance.LinkTestConcept_containment_1.EqualsIdentity(feature)) + { + if (value is LionWeb.Integration.Languages.Generated.V2023_1.TestLanguage.M2.LinkTestConcept v) + { + Containment_1 = v; + return true; + } + + throw new InvalidValueException(feature, value); + } + + if (TestLanguageLanguage.Instance.LinkTestConcept_containment_1_n.EqualsIdentity(feature)) + { + var safeNodes = TestLanguageLanguage.Instance.LinkTestConcept_containment_1_n.AsNodes(value).ToList(); + AssureNonEmpty(safeNodes, TestLanguageLanguage.Instance.LinkTestConcept_containment_1_n); + ContainmentSetEventEmitter evt = new(TestLanguageLanguage.Instance.LinkTestConcept_containment_1_n, this, safeNodes, _containment_1_n); + evt.CollectOldData(); + RemoveSelfParent(_containment_1_n.ToList(), _containment_1_n, TestLanguageLanguage.Instance.LinkTestConcept_containment_1_n); + _containment_1_n.AddRange(SetSelfParent(safeNodes, TestLanguageLanguage.Instance.LinkTestConcept_containment_1_n)); + evt.RaiseEvent(); + return true; + } + + if (TestLanguageLanguage.Instance.LinkTestConcept_reference_0_1.EqualsIdentity(feature)) + { + if (value is null or LionWeb.Integration.Languages.Generated.V2023_1.TestLanguage.M2.LinkTestConcept) + { + Reference_0_1 = (LionWeb.Integration.Languages.Generated.V2023_1.TestLanguage.M2.LinkTestConcept?)value; + return true; + } + + throw new InvalidValueException(feature, value); + } + + if (TestLanguageLanguage.Instance.LinkTestConcept_reference_0_n.EqualsIdentity(feature)) + { + var safeNodes = TestLanguageLanguage.Instance.LinkTestConcept_reference_0_n.AsNodes(value).ToList(); + AssureNotNull(safeNodes, TestLanguageLanguage.Instance.LinkTestConcept_reference_0_n); + AssureNotNullMembers(safeNodes, TestLanguageLanguage.Instance.LinkTestConcept_reference_0_n); + ReferenceSetEventEmitter evt = new(TestLanguageLanguage.Instance.LinkTestConcept_reference_0_n, this, safeNodes, _reference_0_n); + evt.CollectOldData(); + _reference_0_n.Clear(); + _reference_0_n.AddRange(safeNodes); + evt.RaiseEvent(); + return true; + } + + if (TestLanguageLanguage.Instance.LinkTestConcept_reference_1.EqualsIdentity(feature)) + { + if (value is LionWeb.Integration.Languages.Generated.V2023_1.TestLanguage.M2.LinkTestConcept v) + { + Reference_1 = v; + return true; + } + + throw new InvalidValueException(feature, value); + } + + if (TestLanguageLanguage.Instance.LinkTestConcept_reference_1_n.EqualsIdentity(feature)) + { + var safeNodes = TestLanguageLanguage.Instance.LinkTestConcept_reference_1_n.AsNodes(value).ToList(); + AssureNonEmpty(safeNodes, TestLanguageLanguage.Instance.LinkTestConcept_reference_1_n); + ReferenceSetEventEmitter evt = new(TestLanguageLanguage.Instance.LinkTestConcept_reference_1_n, this, safeNodes, _reference_1_n); + evt.CollectOldData(); + _reference_1_n.Clear(); + _reference_1_n.AddRange(safeNodes); + evt.RaiseEvent(); + return true; + } + + return false; + } + + /// + public override IEnumerable CollectAllSetFeatures() + { + List result = base.CollectAllSetFeatures().ToList(); + if (_name != default) + result.Add(_builtIns.INamed_name); + if (_containment_0_1 != default) + result.Add(TestLanguageLanguage.Instance.LinkTestConcept_containment_0_1); + if (_containment_0_n.Count != 0) + result.Add(TestLanguageLanguage.Instance.LinkTestConcept_containment_0_n); + if (_containment_1 != default) + result.Add(TestLanguageLanguage.Instance.LinkTestConcept_containment_1); + if (_containment_1_n.Count != 0) + result.Add(TestLanguageLanguage.Instance.LinkTestConcept_containment_1_n); + if (_reference_0_1 != default) + result.Add(TestLanguageLanguage.Instance.LinkTestConcept_reference_0_1); + if (_reference_0_n.Count != 0) + result.Add(TestLanguageLanguage.Instance.LinkTestConcept_reference_0_n); + if (_reference_1 != default) + result.Add(TestLanguageLanguage.Instance.LinkTestConcept_reference_1); + if (_reference_1_n.Count != 0) + result.Add(TestLanguageLanguage.Instance.LinkTestConcept_reference_1_n); + return result; + } + + /// + protected override bool DetachChild(INode child) + { + if (base.DetachChild(child)) + return true; + Containment? c = GetContainmentOf(child); + if (TestLanguageLanguage.Instance.LinkTestConcept_containment_0_1.EqualsIdentity(c)) + { + _containment_0_1 = null; + return true; + } + + if (TestLanguageLanguage.Instance.LinkTestConcept_containment_0_n.EqualsIdentity(c)) + { + RemoveSelfParent(child, _containment_0_n, TestLanguageLanguage.Instance.LinkTestConcept_containment_0_n); + return true; + } + + if (TestLanguageLanguage.Instance.LinkTestConcept_containment_1.EqualsIdentity(c)) + { + _containment_1 = null; + return true; + } + + if (TestLanguageLanguage.Instance.LinkTestConcept_containment_1_n.EqualsIdentity(c)) + { + RemoveSelfParent(child, _containment_1_n, TestLanguageLanguage.Instance.LinkTestConcept_containment_1_n); + return true; + } + + return false; + } + + /// + public override Containment? GetContainmentOf(INode child) + { + Containment? result = base.GetContainmentOf(child); + if (result != null) + return result; + if (ReferenceEquals(_containment_0_1, child)) + return TestLanguageLanguage.Instance.LinkTestConcept_containment_0_1; + if (child is LinkTestConcept child1 && _containment_0_n.Contains(child1)) + return TestLanguageLanguage.Instance.LinkTestConcept_containment_0_n; + if (ReferenceEquals(_containment_1, child)) + return TestLanguageLanguage.Instance.LinkTestConcept_containment_1; + if (child is LinkTestConcept child3 && _containment_1_n.Contains(child3)) + return TestLanguageLanguage.Instance.LinkTestConcept_containment_1_n; + return null; + } +} + +[LionCoreMetaPointer(Language = typeof(TestLanguageLanguage), Key = "TestAnnotation")] +public partial class TestAnnotation : AnnotationInstanceBase +{ + public TestAnnotation(string id) : base(id) + { + } + + /// + public override Annotation GetAnnotation() => TestLanguageLanguage.Instance.TestAnnotation; +} + +[LionCoreMetaPointer(Language = typeof(TestLanguageLanguage), Key = "SecondTestEnumeration")] +public enum SecondTestEnumeration +{ + [LionCoreMetaPointer(Language = typeof(TestLanguageLanguage), Key = "SecondTestEnumeration-literal1")] + literal1, + [LionCoreMetaPointer(Language = typeof(TestLanguageLanguage), Key = "SecondTestEnumeration-literal2")] + literal2, + [LionCoreMetaPointer(Language = typeof(TestLanguageLanguage), Key = "SecondTestEnumeration-literal3")] + literal3 +} + +[LionCoreMetaPointer(Language = typeof(TestLanguageLanguage), Key = "TestEnumeration")] +public enum TestEnumeration +{ + [LionCoreMetaPointer(Language = typeof(TestLanguageLanguage), Key = "TestEnumeration-literal1")] + literal1, + [LionCoreMetaPointer(Language = typeof(TestLanguageLanguage), Key = "TestEnumeration-literal2")] + literal2, + [LionCoreMetaPointer(Language = typeof(TestLanguageLanguage), Key = "TestEnumeration-literal3")] + literal3 +} \ No newline at end of file diff --git a/src/cs/LionWeb.Integration.Languages/Generated/V2024_1/Shapes.g.cs b/src/cs/LionWeb.Integration.Languages/Generated/V2024_1/Shapes.g.cs new file mode 100644 index 0000000..42c63a6 --- /dev/null +++ b/src/cs/LionWeb.Integration.Languages/Generated/V2024_1/Shapes.g.cs @@ -0,0 +1,2637 @@ +// Generated by the C# M2TypesGenerator: modify at your own risk! +// ReSharper disable InconsistentNaming +// ReSharper disable SuggestVarOrType_SimpleTypes +// ReSharper disable SuggestVarOrType_Elsewhere +#pragma warning disable 1591 +#nullable enable +namespace LionWeb.Integration.Languages.Generated.V2024_1.Shapes.M2; +using LionWeb.Core; +using LionWeb.Core.M1.Event.Partition; +using LionWeb.Core.M1.Event.Partition.Emitter; +using LionWeb.Core.M2; +using LionWeb.Core.M3; +using LionWeb.Core.Utilities; +using LionWeb.Core.VersionSpecific.V2024_1; +using System; +using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; +using Time = string; + +[LionCoreLanguage(Key = "key-Shapes", Version = "1")] +public partial class ShapesLanguage : LanguageBase +{ + public static readonly ShapesLanguage Instance = new Lazy(() => new("id-Shapes")).Value; + public ShapesLanguage(string id) : base(id, LionWebVersions.v2024_1) + { + _billOfMaterials = new(() => new AnnotationBase("id-BillOfMaterials", this) { Key = "key-BillOfMaterials", Name = "BillOfMaterials", AnnotatesLazy = new(() => _builtIns.Node), FeaturesLazy = new(() => [BillOfMaterials_altGroups, BillOfMaterials_defaultGroup, BillOfMaterials_groups, BillOfMaterials_materials]) }); + _billOfMaterials_altGroups = new(() => new ContainmentBase("id-alt-groups", BillOfMaterials, this) { Key = "key-alt-groups", Name = "altGroups", Optional = true, Multiple = true, Type = MaterialGroup }); + _billOfMaterials_defaultGroup = new(() => new ContainmentBase("id-default-group", BillOfMaterials, this) { Key = "key-default-group", Name = "defaultGroup", Optional = true, Multiple = false, Type = MaterialGroup }); + _billOfMaterials_groups = new(() => new ContainmentBase("id-groups", BillOfMaterials, this) { Key = "key-groups", Name = "groups", Optional = true, Multiple = true, Type = MaterialGroup }); + _billOfMaterials_materials = new(() => new ReferenceBase("id-materials", BillOfMaterials, this) { Key = "key-materials", Name = "materials", Optional = true, Multiple = true, Type = IShape }); + _circle = new(() => new ConceptBase("id-Circle", this) { Key = "key-Circle", Name = "Circle", Abstract = false, Partition = false, ExtendsLazy = new(() => Shape), FeaturesLazy = new(() => [Circle_center, Circle_r]) }); + _circle_center = new(() => new ContainmentBase("id-center", Circle, this) { Key = "key-center", Name = "center", Optional = false, Multiple = false, Type = Coord }); + _circle_r = new(() => new PropertyBase("id-r", Circle, this) { Key = "key-r", Name = "r", Optional = false, Type = _builtIns.Integer }); + _compositeShape = new(() => new ConceptBase("id-CompositeShape", this) { Key = "key-CompositeShape", Name = "CompositeShape", Abstract = false, Partition = false, ExtendsLazy = new(() => Shape), FeaturesLazy = new(() => [CompositeShape_disabledParts, CompositeShape_evilPart, CompositeShape_parts]) }); + _compositeShape_disabledParts = new(() => new ContainmentBase("id-disabled-parts", CompositeShape, this) { Key = "key-disabled-parts", Name = "disabledParts", Optional = false, Multiple = true, Type = IShape }); + _compositeShape_evilPart = new(() => new ContainmentBase("id-evil-part", CompositeShape, this) { Key = "key-evil-part", Name = "evilPart", Optional = false, Multiple = false, Type = IShape }); + _compositeShape_parts = new(() => new ContainmentBase("id-parts", CompositeShape, this) { Key = "key-parts", Name = "parts", Optional = false, Multiple = true, Type = IShape }); + _coord = new(() => new ConceptBase("id-Coord", this) { Key = "key-Coord", Name = "Coord", Abstract = false, Partition = false, FeaturesLazy = new(() => [Coord_x, Coord_y, Coord_z]) }); + _coord_x = new(() => new PropertyBase("id-x", Coord, this) { Key = "key-x", Name = "x", Optional = false, Type = _builtIns.Integer }); + _coord_y = new(() => new PropertyBase("id-y", Coord, this) { Key = "key-y", Name = "y", Optional = false, Type = _builtIns.Integer }); + _coord_z = new(() => new PropertyBase("id-z", Coord, this) { Key = "key-z", Name = "z", Optional = false, Type = _builtIns.Integer }); + _documentation = new(() => new AnnotationBase("id-Documentation", this) { Key = "key-Documentation", Name = "Documentation", AnnotatesLazy = new(() => Shape), FeaturesLazy = new(() => [Documentation_technical, Documentation_text]) }); + _documentation_technical = new(() => new PropertyBase("id-technical", Documentation, this) { Key = "key-technical", Name = "technical", Optional = true, Type = _builtIns.Boolean }); + _documentation_text = new(() => new PropertyBase("id-text", Documentation, this) { Key = "key-text", Name = "text", Optional = true, Type = _builtIns.String }); + _geometry = new(() => new ConceptBase("id-Geometry", this) { Key = "key-Geometry", Name = "Geometry", Abstract = false, Partition = true, FeaturesLazy = new(() => [Geometry_documentation, Geometry_shapes]) }); + _geometry_documentation = new(() => new ContainmentBase("id-documentation", Geometry, this) { Key = "key-documentation", Name = "documentation", Optional = true, Multiple = false, Type = Documentation }); + _geometry_shapes = new(() => new ContainmentBase("id-shapes", Geometry, this) { Key = "key-shapes", Name = "shapes", Optional = true, Multiple = true, Type = IShape }); + _iShape = new(() => new InterfaceBase("id-IShape", this) { Key = "key-IShape", Name = "IShape", FeaturesLazy = new(() => [IShape_fixpoints, IShape_uuid]) }); + _iShape_fixpoints = new(() => new ContainmentBase("id-fixpoints", IShape, this) { Key = "key-fixpoints", Name = "fixpoints", Optional = true, Multiple = true, Type = Coord }); + _iShape_uuid = new(() => new PropertyBase("id-uuid", IShape, this) { Key = "key-uuid", Name = "uuid", Optional = false, Type = _builtIns.String }); + _line = new(() => new ConceptBase("id-Line", this) { Key = "key-Line", Name = "Line", Abstract = false, Partition = false, ExtendsLazy = new(() => Shape), ImplementsLazy = new(() => [_builtIns.INamed]), FeaturesLazy = new(() => [Line_end, Line_start]) }); + _line_end = new(() => new ContainmentBase("id-end", Line, this) { Key = "key-end", Name = "end", Optional = false, Multiple = false, Type = Coord }); + _line_start = new(() => new ContainmentBase("id-start", Line, this) { Key = "key-start", Name = "start", Optional = false, Multiple = false, Type = Coord }); + _materialGroup = new(() => new ConceptBase("id-MaterialGroup", this) { Key = "key-MaterialGroup", Name = "MaterialGroup", Abstract = false, Partition = false, FeaturesLazy = new(() => [MaterialGroup_defaultShape, MaterialGroup_materials, MaterialGroup_matterState]) }); + _materialGroup_defaultShape = new(() => new ContainmentBase("id-default-shape", MaterialGroup, this) { Key = "key-default-shape", Name = "defaultShape", Optional = true, Multiple = false, Type = IShape }); + _materialGroup_materials = new(() => new ReferenceBase("id-group-materials", MaterialGroup, this) { Key = "key-group-materials", Name = "materials", Optional = false, Multiple = true, Type = IShape }); + _materialGroup_matterState = new(() => new PropertyBase("id-matter-state", MaterialGroup, this) { Key = "key-matter-state", Name = "matterState", Optional = true, Type = MatterState }); + _matterState = new(() => new EnumerationBase("id-MatterState", this) { Key = "key-MatterState", Name = "MatterState", LiteralsLazy = new(() => [MatterState_gas, MatterState_liquid, MatterState_solid]) }); + _matterState_gas = new(() => new EnumerationLiteralBase("id-gas", MatterState, this) { Key = "key-gas", Name = "gas" }); + _matterState_liquid = new(() => new EnumerationLiteralBase("id-liquid", MatterState, this) { Key = "key-liquid", Name = "liquid" }); + _matterState_solid = new(() => new EnumerationLiteralBase("id-solid", MatterState, this) { Key = "key-solid", Name = "solid" }); + _offsetDuplicate = new(() => new ConceptBase("id-OffsetDuplicate", this) { Key = "key-OffsetDuplicate", Name = "OffsetDuplicate", Abstract = false, Partition = false, ExtendsLazy = new(() => Shape), FeaturesLazy = new(() => [OffsetDuplicate_altSource, OffsetDuplicate_docs, OffsetDuplicate_offset, OffsetDuplicate_secretDocs, OffsetDuplicate_source]) }); + _offsetDuplicate_altSource = new(() => new ReferenceBase("id-alt-source", OffsetDuplicate, this) { Key = "key-alt-source", Name = "altSource", Optional = true, Multiple = false, Type = Shape }); + _offsetDuplicate_docs = new(() => new ContainmentBase("id-docs", OffsetDuplicate, this) { Key = "key-docs", Name = "docs", Optional = true, Multiple = false, Type = Documentation }); + _offsetDuplicate_offset = new(() => new ContainmentBase("id-offset", OffsetDuplicate, this) { Key = "key-offset", Name = "offset", Optional = false, Multiple = false, Type = Coord }); + _offsetDuplicate_secretDocs = new(() => new ContainmentBase("id-secret-docs", OffsetDuplicate, this) { Key = "key-secret-docs", Name = "secretDocs", Optional = true, Multiple = false, Type = Documentation }); + _offsetDuplicate_source = new(() => new ReferenceBase("id-source", OffsetDuplicate, this) { Key = "key-source", Name = "source", Optional = false, Multiple = false, Type = Shape }); + _referenceGeometry = new(() => new ConceptBase("id-ReferenceGeometry", this) { Key = "key-ReferenceGeometry", Name = "ReferenceGeometry", Abstract = false, Partition = true, FeaturesLazy = new(() => [ReferenceGeometry_shapes]) }); + _referenceGeometry_shapes = new(() => new ReferenceBase("id-shape-references", ReferenceGeometry, this) { Key = "key-shapes-references", Name = "shapes", Optional = true, Multiple = true, Type = IShape }); + _shape = new(() => new ConceptBase("id-Shape", this) { Key = "key-Shape", Name = "Shape", Abstract = true, Partition = false, ImplementsLazy = new(() => [_builtIns.INamed, IShape]), FeaturesLazy = new(() => [Shape_shapeDocs]) }); + _shape_shapeDocs = new(() => new ContainmentBase("id-shape-docs", Shape, this) { Key = "key-shape-docs", Name = "shapeDocs", Optional = true, Multiple = false, Type = Documentation }); + _time = new(() => new PrimitiveTypeBase("id-Time", this) { Key = "key-Time", Name = "Time" }); + _factory = new ShapesFactory(this); + } + + /// + public override IReadOnlyList Entities => [BillOfMaterials, Circle, CompositeShape, Coord, Documentation, Geometry, IShape, Line, MaterialGroup, MatterState, OffsetDuplicate, ReferenceGeometry, Shape]; + /// + public override IReadOnlyList DependsOn => []; + + private const string _key = "key-Shapes"; + /// + public override string Key => _key; + + private const string _name = "Shapes"; + /// + public override string Name => _name; + + private const string _version = "1"; + /// + public override string Version => _version; + + private readonly Lazy _billOfMaterials; + public Annotation BillOfMaterials => _billOfMaterials.Value; + + private readonly Lazy _billOfMaterials_altGroups; + public Containment BillOfMaterials_altGroups => _billOfMaterials_altGroups.Value; + + private readonly Lazy _billOfMaterials_defaultGroup; + public Containment BillOfMaterials_defaultGroup => _billOfMaterials_defaultGroup.Value; + + private readonly Lazy _billOfMaterials_groups; + public Containment BillOfMaterials_groups => _billOfMaterials_groups.Value; + + private readonly Lazy _billOfMaterials_materials; + public Reference BillOfMaterials_materials => _billOfMaterials_materials.Value; + + private readonly Lazy _circle; + public Concept Circle => _circle.Value; + + private readonly Lazy _circle_center; + public Containment Circle_center => _circle_center.Value; + + private readonly Lazy _circle_r; + public Property Circle_r => _circle_r.Value; + + private readonly Lazy _compositeShape; + public Concept CompositeShape => _compositeShape.Value; + + private readonly Lazy _compositeShape_disabledParts; + public Containment CompositeShape_disabledParts => _compositeShape_disabledParts.Value; + + private readonly Lazy _compositeShape_evilPart; + public Containment CompositeShape_evilPart => _compositeShape_evilPart.Value; + + private readonly Lazy _compositeShape_parts; + public Containment CompositeShape_parts => _compositeShape_parts.Value; + + private readonly Lazy _coord; + public Concept Coord => _coord.Value; + + private readonly Lazy _coord_x; + public Property Coord_x => _coord_x.Value; + + private readonly Lazy _coord_y; + public Property Coord_y => _coord_y.Value; + + private readonly Lazy _coord_z; + public Property Coord_z => _coord_z.Value; + + private readonly Lazy _documentation; + public Annotation Documentation => _documentation.Value; + + private readonly Lazy _documentation_technical; + public Property Documentation_technical => _documentation_technical.Value; + + private readonly Lazy _documentation_text; + public Property Documentation_text => _documentation_text.Value; + + private readonly Lazy _geometry; + public Concept Geometry => _geometry.Value; + + private readonly Lazy _geometry_documentation; + public Containment Geometry_documentation => _geometry_documentation.Value; + + private readonly Lazy _geometry_shapes; + public Containment Geometry_shapes => _geometry_shapes.Value; + + private readonly Lazy _iShape; + public Interface IShape => _iShape.Value; + + private readonly Lazy _iShape_fixpoints; + public Containment IShape_fixpoints => _iShape_fixpoints.Value; + + private readonly Lazy _iShape_uuid; + public Property IShape_uuid => _iShape_uuid.Value; + + private readonly Lazy _line; + public Concept Line => _line.Value; + + private readonly Lazy _line_end; + public Containment Line_end => _line_end.Value; + + private readonly Lazy _line_start; + public Containment Line_start => _line_start.Value; + + private readonly Lazy _materialGroup; + public Concept MaterialGroup => _materialGroup.Value; + + private readonly Lazy _materialGroup_defaultShape; + public Containment MaterialGroup_defaultShape => _materialGroup_defaultShape.Value; + + private readonly Lazy _materialGroup_materials; + public Reference MaterialGroup_materials => _materialGroup_materials.Value; + + private readonly Lazy _materialGroup_matterState; + public Property MaterialGroup_matterState => _materialGroup_matterState.Value; + + private readonly Lazy _matterState; + public Enumeration MatterState => _matterState.Value; + + private readonly Lazy _matterState_gas; + public EnumerationLiteral MatterState_gas => _matterState_gas.Value; + + private readonly Lazy _matterState_liquid; + public EnumerationLiteral MatterState_liquid => _matterState_liquid.Value; + + private readonly Lazy _matterState_solid; + public EnumerationLiteral MatterState_solid => _matterState_solid.Value; + + private readonly Lazy _offsetDuplicate; + public Concept OffsetDuplicate => _offsetDuplicate.Value; + + private readonly Lazy _offsetDuplicate_altSource; + public Reference OffsetDuplicate_altSource => _offsetDuplicate_altSource.Value; + + private readonly Lazy _offsetDuplicate_docs; + public Containment OffsetDuplicate_docs => _offsetDuplicate_docs.Value; + + private readonly Lazy _offsetDuplicate_offset; + public Containment OffsetDuplicate_offset => _offsetDuplicate_offset.Value; + + private readonly Lazy _offsetDuplicate_secretDocs; + public Containment OffsetDuplicate_secretDocs => _offsetDuplicate_secretDocs.Value; + + private readonly Lazy _offsetDuplicate_source; + public Reference OffsetDuplicate_source => _offsetDuplicate_source.Value; + + private readonly Lazy _referenceGeometry; + public Concept ReferenceGeometry => _referenceGeometry.Value; + + private readonly Lazy _referenceGeometry_shapes; + public Reference ReferenceGeometry_shapes => _referenceGeometry_shapes.Value; + + private readonly Lazy _shape; + public Concept Shape => _shape.Value; + + private readonly Lazy _shape_shapeDocs; + public Containment Shape_shapeDocs => _shape_shapeDocs.Value; + + private readonly Lazy _time; + public PrimitiveType Time => _time.Value; +} + +public partial interface IShapesFactory : INodeFactory +{ + public BillOfMaterials NewBillOfMaterials(string id); + public BillOfMaterials CreateBillOfMaterials(); + public Circle NewCircle(string id); + public Circle CreateCircle(); + public CompositeShape NewCompositeShape(string id); + public CompositeShape CreateCompositeShape(); + public Coord NewCoord(string id); + public Coord CreateCoord(); + public Documentation NewDocumentation(string id); + public Documentation CreateDocumentation(); + public Geometry NewGeometry(string id); + public Geometry CreateGeometry(); + public Line NewLine(string id); + public Line CreateLine(); + public MaterialGroup NewMaterialGroup(string id); + public MaterialGroup CreateMaterialGroup(); + public OffsetDuplicate NewOffsetDuplicate(string id); + public OffsetDuplicate CreateOffsetDuplicate(); + public ReferenceGeometry NewReferenceGeometry(string id); + public ReferenceGeometry CreateReferenceGeometry(); +} + +public class ShapesFactory : AbstractBaseNodeFactory, IShapesFactory +{ + private readonly ShapesLanguage _language; + public ShapesFactory(ShapesLanguage language) : base(language) + { + _language = language; + } + + /// + public override INode CreateNode(string id, Classifier classifier) + { + if (_language.BillOfMaterials.EqualsIdentity(classifier)) + return NewBillOfMaterials(id); + if (_language.Circle.EqualsIdentity(classifier)) + return NewCircle(id); + if (_language.CompositeShape.EqualsIdentity(classifier)) + return NewCompositeShape(id); + if (_language.Coord.EqualsIdentity(classifier)) + return NewCoord(id); + if (_language.Documentation.EqualsIdentity(classifier)) + return NewDocumentation(id); + if (_language.Geometry.EqualsIdentity(classifier)) + return NewGeometry(id); + if (_language.Line.EqualsIdentity(classifier)) + return NewLine(id); + if (_language.MaterialGroup.EqualsIdentity(classifier)) + return NewMaterialGroup(id); + if (_language.OffsetDuplicate.EqualsIdentity(classifier)) + return NewOffsetDuplicate(id); + if (_language.ReferenceGeometry.EqualsIdentity(classifier)) + return NewReferenceGeometry(id); + throw new UnsupportedClassifierException(classifier); + } + + /// + public override Enum GetEnumerationLiteral(EnumerationLiteral literal) + { + if (_language.MatterState.EqualsIdentity(literal.GetEnumeration())) + return EnumValueFor(literal); + throw new UnsupportedEnumerationLiteralException(literal); + } + + /// + public override IStructuredDataTypeInstance CreateStructuredDataTypeInstance(StructuredDataType structuredDataType, IFieldValues fieldValues) + { + throw new UnsupportedStructuredDataTypeException(structuredDataType); + } + + public virtual BillOfMaterials NewBillOfMaterials(string id) => new(id); + public virtual BillOfMaterials CreateBillOfMaterials() => NewBillOfMaterials(GetNewId()); + public virtual Circle NewCircle(string id) => new(id); + public virtual Circle CreateCircle() => NewCircle(GetNewId()); + public virtual CompositeShape NewCompositeShape(string id) => new(id); + public virtual CompositeShape CreateCompositeShape() => NewCompositeShape(GetNewId()); + public virtual Coord NewCoord(string id) => new(id); + public virtual Coord CreateCoord() => NewCoord(GetNewId()); + public virtual Documentation NewDocumentation(string id) => new(id); + public virtual Documentation CreateDocumentation() => NewDocumentation(GetNewId()); + public virtual Geometry NewGeometry(string id) => new(id); + public virtual Geometry CreateGeometry() => NewGeometry(GetNewId()); + public virtual Line NewLine(string id) => new(id); + public virtual Line CreateLine() => NewLine(GetNewId()); + public virtual MaterialGroup NewMaterialGroup(string id) => new(id); + public virtual MaterialGroup CreateMaterialGroup() => NewMaterialGroup(GetNewId()); + public virtual OffsetDuplicate NewOffsetDuplicate(string id) => new(id); + public virtual OffsetDuplicate CreateOffsetDuplicate() => NewOffsetDuplicate(GetNewId()); + public virtual ReferenceGeometry NewReferenceGeometry(string id) => new(id); + public virtual ReferenceGeometry CreateReferenceGeometry() => NewReferenceGeometry(GetNewId()); +} + +[LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-BillOfMaterials")] +public partial class BillOfMaterials : AnnotationInstanceBase +{ + private readonly List _altGroups = []; + /// Optional Multiple Containment + [LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-alt-groups")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Containment, Optional = true, Multiple = true)] + public IReadOnlyList AltGroups { get => _altGroups.AsReadOnly(); init => AddAltGroups(value); } + + /// Optional Multiple Containment + public bool TryGetAltGroups([NotNullWhenAttribute(true)] out IReadOnlyList altGroups) + { + altGroups = _altGroups; + return _altGroups.Count != 0; + } + + /// Optional Multiple Containment + public BillOfMaterials AddAltGroups(IEnumerable nodes) + { + var safeNodes = nodes?.ToList(); + AssureNotNull(safeNodes, ShapesLanguage.Instance.BillOfMaterials_altGroups); + AssureNotNullMembers(safeNodes, ShapesLanguage.Instance.BillOfMaterials_altGroups); + ContainmentAddMultipleEventEmitter evt = new(ShapesLanguage.Instance.BillOfMaterials_altGroups, this, safeNodes, _altGroups, null); + evt.CollectOldData(); + _altGroups.AddRange(SetSelfParent(safeNodes, ShapesLanguage.Instance.BillOfMaterials_altGroups)); + evt.RaiseEvent(); + return this; + } + + /// Optional Multiple Containment + public BillOfMaterials InsertAltGroups(int index, IEnumerable nodes) + { + AssureInRange(index, _altGroups); + var safeNodes = nodes?.ToList(); + AssureNotNull(safeNodes, ShapesLanguage.Instance.BillOfMaterials_altGroups); + AssureNoSelfMove(index, safeNodes, _altGroups); + AssureNotNullMembers(safeNodes, ShapesLanguage.Instance.BillOfMaterials_altGroups); + ContainmentAddMultipleEventEmitter evt = new(ShapesLanguage.Instance.BillOfMaterials_altGroups, this, safeNodes, _altGroups, index); + evt.CollectOldData(); + _altGroups.InsertRange(index, SetSelfParent(safeNodes, ShapesLanguage.Instance.BillOfMaterials_altGroups)); + evt.RaiseEvent(); + return this; + } + + /// Optional Multiple Containment + public BillOfMaterials RemoveAltGroups(IEnumerable nodes) + { + RemoveSelfParent(nodes?.ToList(), _altGroups, ShapesLanguage.Instance.BillOfMaterials_altGroups, ContainmentRemover(ShapesLanguage.Instance.BillOfMaterials_altGroups)); + return this; + } + + private MaterialGroup? _defaultGroup = null; + /// Optional Single Containment + [LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-default-group")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Containment, Optional = true, Multiple = true)] + public MaterialGroup? DefaultGroup { get => _defaultGroup; set => SetDefaultGroup(value); } + + /// Optional Single Containment + public bool TryGetDefaultGroup([NotNullWhenAttribute(true)] out MaterialGroup? defaultGroup) + { + defaultGroup = _defaultGroup; + return _defaultGroup != null; + } + + /// Optional Single Containment + public BillOfMaterials SetDefaultGroup(MaterialGroup? value) + { + ContainmentSingleEventEmitter evt = new(ShapesLanguage.Instance.BillOfMaterials_defaultGroup, this, value, _defaultGroup); + evt.CollectOldData(); + SetParentNull(_defaultGroup); + AttachChild(value); + _defaultGroup = value; + evt.RaiseEvent(); + return this; + } + + private readonly List _groups = []; + /// Optional Multiple Containment + [LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-groups")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Containment, Optional = true, Multiple = true)] + public IReadOnlyList Groups { get => _groups.AsReadOnly(); init => AddGroups(value); } + + /// Optional Multiple Containment + public bool TryGetGroups([NotNullWhenAttribute(true)] out IReadOnlyList groups) + { + groups = _groups; + return _groups.Count != 0; + } + + /// Optional Multiple Containment + public BillOfMaterials AddGroups(IEnumerable nodes) + { + var safeNodes = nodes?.ToList(); + AssureNotNull(safeNodes, ShapesLanguage.Instance.BillOfMaterials_groups); + AssureNotNullMembers(safeNodes, ShapesLanguage.Instance.BillOfMaterials_groups); + ContainmentAddMultipleEventEmitter evt = new(ShapesLanguage.Instance.BillOfMaterials_groups, this, safeNodes, _groups, null); + evt.CollectOldData(); + _groups.AddRange(SetSelfParent(safeNodes, ShapesLanguage.Instance.BillOfMaterials_groups)); + evt.RaiseEvent(); + return this; + } + + /// Optional Multiple Containment + public BillOfMaterials InsertGroups(int index, IEnumerable nodes) + { + AssureInRange(index, _groups); + var safeNodes = nodes?.ToList(); + AssureNotNull(safeNodes, ShapesLanguage.Instance.BillOfMaterials_groups); + AssureNoSelfMove(index, safeNodes, _groups); + AssureNotNullMembers(safeNodes, ShapesLanguage.Instance.BillOfMaterials_groups); + ContainmentAddMultipleEventEmitter evt = new(ShapesLanguage.Instance.BillOfMaterials_groups, this, safeNodes, _groups, index); + evt.CollectOldData(); + _groups.InsertRange(index, SetSelfParent(safeNodes, ShapesLanguage.Instance.BillOfMaterials_groups)); + evt.RaiseEvent(); + return this; + } + + /// Optional Multiple Containment + public BillOfMaterials RemoveGroups(IEnumerable nodes) + { + RemoveSelfParent(nodes?.ToList(), _groups, ShapesLanguage.Instance.BillOfMaterials_groups, ContainmentRemover(ShapesLanguage.Instance.BillOfMaterials_groups)); + return this; + } + + private readonly List _materials = []; + /// Optional Multiple Reference + [LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-materials")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Reference, Optional = true, Multiple = true)] + public IReadOnlyList Materials { get => _materials.AsReadOnly(); init => AddMaterials(value); } + + /// Optional Multiple Reference + public bool TryGetMaterials([NotNullWhenAttribute(true)] out IReadOnlyList materials) + { + materials = _materials; + return _materials.Count != 0; + } + + /// Optional Multiple Reference + public BillOfMaterials AddMaterials(IEnumerable nodes) + { + var safeNodes = nodes?.ToList(); + AssureNotNull(safeNodes, ShapesLanguage.Instance.BillOfMaterials_materials); + AssureNotNullMembers(safeNodes, ShapesLanguage.Instance.BillOfMaterials_materials); + ReferenceAddMultipleEventEmitter evt = new(ShapesLanguage.Instance.BillOfMaterials_materials, this, safeNodes, _materials.Count); + evt.CollectOldData(); + _materials.AddRange(safeNodes); + evt.RaiseEvent(); + return this; + } + + /// Optional Multiple Reference + public BillOfMaterials InsertMaterials(int index, IEnumerable nodes) + { + AssureInRange(index, _materials); + var safeNodes = nodes?.ToList(); + AssureNotNull(safeNodes, ShapesLanguage.Instance.BillOfMaterials_materials); + AssureNotNullMembers(safeNodes, ShapesLanguage.Instance.BillOfMaterials_materials); + ReferenceAddMultipleEventEmitter evt = new(ShapesLanguage.Instance.BillOfMaterials_materials, this, safeNodes, index); + evt.CollectOldData(); + _materials.InsertRange(index, safeNodes); + evt.RaiseEvent(); + return this; + } + + /// Optional Multiple Reference + public BillOfMaterials RemoveMaterials(IEnumerable nodes) + { + var safeNodes = nodes?.ToList(); + AssureNotNull(safeNodes, ShapesLanguage.Instance.BillOfMaterials_materials); + AssureNotNullMembers(safeNodes, ShapesLanguage.Instance.BillOfMaterials_materials); + RemoveAll(safeNodes, _materials, ReferenceRemover(ShapesLanguage.Instance.BillOfMaterials_materials)); + return this; + } + + public BillOfMaterials(string id) : base(id) + { + } + + /// + public override Annotation GetAnnotation() => ShapesLanguage.Instance.BillOfMaterials; + /// + protected override bool GetInternal(Feature? feature, out Object? result) + { + if (base.GetInternal(feature, out result)) + return true; + if (ShapesLanguage.Instance.BillOfMaterials_altGroups.EqualsIdentity(feature)) + { + result = AltGroups; + return true; + } + + if (ShapesLanguage.Instance.BillOfMaterials_defaultGroup.EqualsIdentity(feature)) + { + result = DefaultGroup; + return true; + } + + if (ShapesLanguage.Instance.BillOfMaterials_groups.EqualsIdentity(feature)) + { + result = Groups; + return true; + } + + if (ShapesLanguage.Instance.BillOfMaterials_materials.EqualsIdentity(feature)) + { + result = Materials; + return true; + } + + return false; + } + + /// + protected override bool SetInternal(Feature? feature, Object? value) + { + if (base.SetInternal(feature, value)) + return true; + if (ShapesLanguage.Instance.BillOfMaterials_altGroups.EqualsIdentity(feature)) + { + var safeNodes = ShapesLanguage.Instance.BillOfMaterials_altGroups.AsNodes(value).ToList(); + ContainmentSetEventEmitter evt = new(ShapesLanguage.Instance.BillOfMaterials_altGroups, this, safeNodes, _altGroups); + evt.CollectOldData(); + RemoveSelfParent(_altGroups.ToList(), _altGroups, ShapesLanguage.Instance.BillOfMaterials_altGroups); + _altGroups.AddRange(SetSelfParent(safeNodes, ShapesLanguage.Instance.BillOfMaterials_altGroups)); + evt.RaiseEvent(); + return true; + } + + if (ShapesLanguage.Instance.BillOfMaterials_defaultGroup.EqualsIdentity(feature)) + { + if (value is null or LionWeb.Integration.Languages.Generated.V2024_1.Shapes.M2.MaterialGroup) + { + DefaultGroup = (LionWeb.Integration.Languages.Generated.V2024_1.Shapes.M2.MaterialGroup?)value; + return true; + } + + throw new InvalidValueException(feature, value); + } + + if (ShapesLanguage.Instance.BillOfMaterials_groups.EqualsIdentity(feature)) + { + var safeNodes = ShapesLanguage.Instance.BillOfMaterials_groups.AsNodes(value).ToList(); + ContainmentSetEventEmitter evt = new(ShapesLanguage.Instance.BillOfMaterials_groups, this, safeNodes, _groups); + evt.CollectOldData(); + RemoveSelfParent(_groups.ToList(), _groups, ShapesLanguage.Instance.BillOfMaterials_groups); + _groups.AddRange(SetSelfParent(safeNodes, ShapesLanguage.Instance.BillOfMaterials_groups)); + evt.RaiseEvent(); + return true; + } + + if (ShapesLanguage.Instance.BillOfMaterials_materials.EqualsIdentity(feature)) + { + var safeNodes = ShapesLanguage.Instance.BillOfMaterials_materials.AsNodes(value).ToList(); + AssureNotNull(safeNodes, ShapesLanguage.Instance.BillOfMaterials_materials); + AssureNotNullMembers(safeNodes, ShapesLanguage.Instance.BillOfMaterials_materials); + ReferenceSetEventEmitter evt = new(ShapesLanguage.Instance.BillOfMaterials_materials, this, safeNodes, _materials); + evt.CollectOldData(); + _materials.Clear(); + _materials.AddRange(safeNodes); + evt.RaiseEvent(); + return true; + } + + return false; + } + + /// + public override IEnumerable CollectAllSetFeatures() + { + List result = base.CollectAllSetFeatures().ToList(); + if (_altGroups.Count != 0) + result.Add(ShapesLanguage.Instance.BillOfMaterials_altGroups); + if (_defaultGroup != default) + result.Add(ShapesLanguage.Instance.BillOfMaterials_defaultGroup); + if (_groups.Count != 0) + result.Add(ShapesLanguage.Instance.BillOfMaterials_groups); + if (_materials.Count != 0) + result.Add(ShapesLanguage.Instance.BillOfMaterials_materials); + return result; + } + + /// + protected override bool DetachChild(INode child) + { + if (base.DetachChild(child)) + return true; + Containment? c = GetContainmentOf(child); + if (ShapesLanguage.Instance.BillOfMaterials_altGroups.EqualsIdentity(c)) + { + RemoveSelfParent(child, _altGroups, ShapesLanguage.Instance.BillOfMaterials_altGroups); + return true; + } + + if (ShapesLanguage.Instance.BillOfMaterials_defaultGroup.EqualsIdentity(c)) + { + _defaultGroup = null; + return true; + } + + if (ShapesLanguage.Instance.BillOfMaterials_groups.EqualsIdentity(c)) + { + RemoveSelfParent(child, _groups, ShapesLanguage.Instance.BillOfMaterials_groups); + return true; + } + + return false; + } + + /// + public override Containment? GetContainmentOf(INode child) + { + Containment? result = base.GetContainmentOf(child); + if (result != null) + return result; + if (child is MaterialGroup child0 && _altGroups.Contains(child0)) + return ShapesLanguage.Instance.BillOfMaterials_altGroups; + if (ReferenceEquals(_defaultGroup, child)) + return ShapesLanguage.Instance.BillOfMaterials_defaultGroup; + if (child is MaterialGroup child2 && _groups.Contains(child2)) + return ShapesLanguage.Instance.BillOfMaterials_groups; + return null; + } +} + +[LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-Circle")] +public partial class Circle : Shape +{ + private Coord? _center = null; + /// Required Single Containment + /// If Center has not been set + /// If set to null + [LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-center")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Containment, Optional = false, Multiple = false)] + public Coord Center { get => _center ?? throw new UnsetFeatureException(ShapesLanguage.Instance.Circle_center); set => SetCenter(value); } + + /// Required Single Containment + public bool TryGetCenter([NotNullWhenAttribute(true)] out Coord? center) + { + center = _center; + return _center != null; + } + + /// Required Single Containment + /// If set to null + public Circle SetCenter(Coord value) + { + AssureNotNull(value, ShapesLanguage.Instance.Circle_center); + ContainmentSingleEventEmitter evt = new(ShapesLanguage.Instance.Circle_center, this, value, _center); + evt.CollectOldData(); + SetParentNull(_center); + AttachChild(value); + _center = value; + evt.RaiseEvent(); + return this; + } + + private int? _r = null; + /// Required Property + /// If R has not been set + [LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-r")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Property, Optional = false, Multiple = false)] + public int R { get => _r ?? throw new UnsetFeatureException(ShapesLanguage.Instance.Circle_r); set => SetR(value); } + + /// Required Property + public bool TryGetR([NotNullWhenAttribute(true)] out int? r) + { + r = _r; + return _r != null; + } + + /// Required Property + public Circle SetR(int value) + { + PropertyEventEmitter evt = new(ShapesLanguage.Instance.Circle_r, this, value, _r); + evt.CollectOldData(); + _r = value; + evt.RaiseEvent(); + return this; + } + + public Circle(string id) : base(id) + { + } + + /// + public override Concept GetConcept() => ShapesLanguage.Instance.Circle; + /// + protected override bool GetInternal(Feature? feature, out Object? result) + { + if (base.GetInternal(feature, out result)) + return true; + if (ShapesLanguage.Instance.Circle_center.EqualsIdentity(feature)) + { + result = Center; + return true; + } + + if (ShapesLanguage.Instance.Circle_r.EqualsIdentity(feature)) + { + result = R; + return true; + } + + return false; + } + + /// + protected override bool SetInternal(Feature? feature, Object? value) + { + if (base.SetInternal(feature, value)) + return true; + if (ShapesLanguage.Instance.Circle_center.EqualsIdentity(feature)) + { + if (value is LionWeb.Integration.Languages.Generated.V2024_1.Shapes.M2.Coord v) + { + Center = v; + return true; + } + + throw new InvalidValueException(feature, value); + } + + if (ShapesLanguage.Instance.Circle_r.EqualsIdentity(feature)) + { + if (value is int v) + { + R = v; + return true; + } + + throw new InvalidValueException(feature, value); + } + + return false; + } + + /// + public override IEnumerable CollectAllSetFeatures() + { + List result = base.CollectAllSetFeatures().ToList(); + if (_center != default) + result.Add(ShapesLanguage.Instance.Circle_center); + if (_r != default) + result.Add(ShapesLanguage.Instance.Circle_r); + return result; + } + + /// + protected override bool DetachChild(INode child) + { + if (base.DetachChild(child)) + return true; + Containment? c = GetContainmentOf(child); + if (ShapesLanguage.Instance.Circle_center.EqualsIdentity(c)) + { + _center = null; + return true; + } + + return false; + } + + /// + public override Containment? GetContainmentOf(INode child) + { + Containment? result = base.GetContainmentOf(child); + if (result != null) + return result; + if (ReferenceEquals(_center, child)) + return ShapesLanguage.Instance.Circle_center; + return null; + } +} + +[LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-CompositeShape")] +public partial class CompositeShape : Shape +{ + private readonly List _disabledParts = []; + /// Required Multiple Containment + /// If DisabledParts is empty + [LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-disabled-parts")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Containment, Optional = false, Multiple = false)] + public IReadOnlyList DisabledParts { get => AsNonEmptyReadOnly(_disabledParts, ShapesLanguage.Instance.CompositeShape_disabledParts); init => AddDisabledParts(value); } + + /// Required Multiple Containment + public bool TryGetDisabledParts([NotNullWhenAttribute(true)] out IReadOnlyList disabledParts) + { + disabledParts = _disabledParts; + return _disabledParts.Count != 0; + } + + /// Required Multiple Containment + /// If both DisabledParts and nodes are empty + public CompositeShape AddDisabledParts(IEnumerable nodes) + { + var safeNodes = nodes?.ToList(); + AssureNonEmpty(safeNodes, _disabledParts, ShapesLanguage.Instance.CompositeShape_disabledParts); + ContainmentAddMultipleEventEmitter evt = new(ShapesLanguage.Instance.CompositeShape_disabledParts, this, safeNodes, _disabledParts, null); + evt.CollectOldData(); + _disabledParts.AddRange(SetSelfParent(safeNodes, ShapesLanguage.Instance.CompositeShape_disabledParts)); + evt.RaiseEvent(); + return this; + } + + /// Required Multiple Containment + /// If both DisabledParts and nodes are empty + /// If index negative or greater than DisabledParts.Count + public CompositeShape InsertDisabledParts(int index, IEnumerable nodes) + { + AssureInRange(index, _disabledParts); + var safeNodes = nodes?.ToList(); + AssureNonEmpty(safeNodes, _disabledParts, ShapesLanguage.Instance.CompositeShape_disabledParts); + AssureNoSelfMove(index, safeNodes, _disabledParts); + ContainmentAddMultipleEventEmitter evt = new(ShapesLanguage.Instance.CompositeShape_disabledParts, this, safeNodes, _disabledParts, index); + evt.CollectOldData(); + _disabledParts.InsertRange(index, SetSelfParent(safeNodes, ShapesLanguage.Instance.CompositeShape_disabledParts)); + evt.RaiseEvent(); + return this; + } + + /// Required Multiple Containment + /// If DisabledParts would be empty + public CompositeShape RemoveDisabledParts(IEnumerable nodes) + { + var safeNodes = nodes?.ToList(); + AssureNotNull(safeNodes, ShapesLanguage.Instance.CompositeShape_disabledParts); + AssureNotClearing(safeNodes, _disabledParts, ShapesLanguage.Instance.CompositeShape_disabledParts); + RemoveSelfParent(safeNodes, _disabledParts, ShapesLanguage.Instance.CompositeShape_disabledParts, ContainmentRemover(ShapesLanguage.Instance.CompositeShape_disabledParts)); + return this; + } + + private IShape? _evilPart = null; + /// Required Single Containment + /// If EvilPart has not been set + /// If set to null + [LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-evil-part")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Containment, Optional = false, Multiple = false)] + public IShape EvilPart { get => _evilPart ?? throw new UnsetFeatureException(ShapesLanguage.Instance.CompositeShape_evilPart); set => SetEvilPart(value); } + + /// Required Single Containment + public bool TryGetEvilPart([NotNullWhenAttribute(true)] out IShape? evilPart) + { + evilPart = _evilPart; + return _evilPart != null; + } + + /// Required Single Containment + /// If set to null + public CompositeShape SetEvilPart(IShape value) + { + AssureNotNull(value, ShapesLanguage.Instance.CompositeShape_evilPart); + ContainmentSingleEventEmitter evt = new(ShapesLanguage.Instance.CompositeShape_evilPart, this, value, _evilPart); + evt.CollectOldData(); + SetParentNull(_evilPart); + AttachChild(value); + _evilPart = value; + evt.RaiseEvent(); + return this; + } + + private readonly List _parts = []; + /// Required Multiple Containment + /// If Parts is empty + [LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-parts")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Containment, Optional = false, Multiple = false)] + public IReadOnlyList Parts { get => AsNonEmptyReadOnly(_parts, ShapesLanguage.Instance.CompositeShape_parts); init => AddParts(value); } + + /// Required Multiple Containment + public bool TryGetParts([NotNullWhenAttribute(true)] out IReadOnlyList parts) + { + parts = _parts; + return _parts.Count != 0; + } + + /// Required Multiple Containment + /// If both Parts and nodes are empty + public CompositeShape AddParts(IEnumerable nodes) + { + var safeNodes = nodes?.ToList(); + AssureNonEmpty(safeNodes, _parts, ShapesLanguage.Instance.CompositeShape_parts); + ContainmentAddMultipleEventEmitter evt = new(ShapesLanguage.Instance.CompositeShape_parts, this, safeNodes, _parts, null); + evt.CollectOldData(); + _parts.AddRange(SetSelfParent(safeNodes, ShapesLanguage.Instance.CompositeShape_parts)); + evt.RaiseEvent(); + return this; + } + + /// Required Multiple Containment + /// If both Parts and nodes are empty + /// If index negative or greater than Parts.Count + public CompositeShape InsertParts(int index, IEnumerable nodes) + { + AssureInRange(index, _parts); + var safeNodes = nodes?.ToList(); + AssureNonEmpty(safeNodes, _parts, ShapesLanguage.Instance.CompositeShape_parts); + AssureNoSelfMove(index, safeNodes, _parts); + ContainmentAddMultipleEventEmitter evt = new(ShapesLanguage.Instance.CompositeShape_parts, this, safeNodes, _parts, index); + evt.CollectOldData(); + _parts.InsertRange(index, SetSelfParent(safeNodes, ShapesLanguage.Instance.CompositeShape_parts)); + evt.RaiseEvent(); + return this; + } + + /// Required Multiple Containment + /// If Parts would be empty + public CompositeShape RemoveParts(IEnumerable nodes) + { + var safeNodes = nodes?.ToList(); + AssureNotNull(safeNodes, ShapesLanguage.Instance.CompositeShape_parts); + AssureNotClearing(safeNodes, _parts, ShapesLanguage.Instance.CompositeShape_parts); + RemoveSelfParent(safeNodes, _parts, ShapesLanguage.Instance.CompositeShape_parts, ContainmentRemover(ShapesLanguage.Instance.CompositeShape_parts)); + return this; + } + + public CompositeShape(string id) : base(id) + { + } + + /// + public override Concept GetConcept() => ShapesLanguage.Instance.CompositeShape; + /// + protected override bool GetInternal(Feature? feature, out Object? result) + { + if (base.GetInternal(feature, out result)) + return true; + if (ShapesLanguage.Instance.CompositeShape_disabledParts.EqualsIdentity(feature)) + { + result = DisabledParts; + return true; + } + + if (ShapesLanguage.Instance.CompositeShape_evilPart.EqualsIdentity(feature)) + { + result = EvilPart; + return true; + } + + if (ShapesLanguage.Instance.CompositeShape_parts.EqualsIdentity(feature)) + { + result = Parts; + return true; + } + + return false; + } + + /// + protected override bool SetInternal(Feature? feature, Object? value) + { + if (base.SetInternal(feature, value)) + return true; + if (ShapesLanguage.Instance.CompositeShape_disabledParts.EqualsIdentity(feature)) + { + var safeNodes = ShapesLanguage.Instance.CompositeShape_disabledParts.AsNodes(value).ToList(); + AssureNonEmpty(safeNodes, ShapesLanguage.Instance.CompositeShape_disabledParts); + ContainmentSetEventEmitter evt = new(ShapesLanguage.Instance.CompositeShape_disabledParts, this, safeNodes, _disabledParts); + evt.CollectOldData(); + RemoveSelfParent(_disabledParts.ToList(), _disabledParts, ShapesLanguage.Instance.CompositeShape_disabledParts); + _disabledParts.AddRange(SetSelfParent(safeNodes, ShapesLanguage.Instance.CompositeShape_disabledParts)); + evt.RaiseEvent(); + return true; + } + + if (ShapesLanguage.Instance.CompositeShape_evilPart.EqualsIdentity(feature)) + { + if (value is LionWeb.Integration.Languages.Generated.V2024_1.Shapes.M2.IShape v) + { + EvilPart = v; + return true; + } + + throw new InvalidValueException(feature, value); + } + + if (ShapesLanguage.Instance.CompositeShape_parts.EqualsIdentity(feature)) + { + var safeNodes = ShapesLanguage.Instance.CompositeShape_parts.AsNodes(value).ToList(); + AssureNonEmpty(safeNodes, ShapesLanguage.Instance.CompositeShape_parts); + ContainmentSetEventEmitter evt = new(ShapesLanguage.Instance.CompositeShape_parts, this, safeNodes, _parts); + evt.CollectOldData(); + RemoveSelfParent(_parts.ToList(), _parts, ShapesLanguage.Instance.CompositeShape_parts); + _parts.AddRange(SetSelfParent(safeNodes, ShapesLanguage.Instance.CompositeShape_parts)); + evt.RaiseEvent(); + return true; + } + + return false; + } + + /// + public override IEnumerable CollectAllSetFeatures() + { + List result = base.CollectAllSetFeatures().ToList(); + if (_disabledParts.Count != 0) + result.Add(ShapesLanguage.Instance.CompositeShape_disabledParts); + if (_evilPart != default) + result.Add(ShapesLanguage.Instance.CompositeShape_evilPart); + if (_parts.Count != 0) + result.Add(ShapesLanguage.Instance.CompositeShape_parts); + return result; + } + + /// + protected override bool DetachChild(INode child) + { + if (base.DetachChild(child)) + return true; + Containment? c = GetContainmentOf(child); + if (ShapesLanguage.Instance.CompositeShape_disabledParts.EqualsIdentity(c)) + { + RemoveSelfParent(child, _disabledParts, ShapesLanguage.Instance.CompositeShape_disabledParts); + return true; + } + + if (ShapesLanguage.Instance.CompositeShape_evilPart.EqualsIdentity(c)) + { + _evilPart = null; + return true; + } + + if (ShapesLanguage.Instance.CompositeShape_parts.EqualsIdentity(c)) + { + RemoveSelfParent(child, _parts, ShapesLanguage.Instance.CompositeShape_parts); + return true; + } + + return false; + } + + /// + public override Containment? GetContainmentOf(INode child) + { + Containment? result = base.GetContainmentOf(child); + if (result != null) + return result; + if (child is IShape child0 && _disabledParts.Contains(child0)) + return ShapesLanguage.Instance.CompositeShape_disabledParts; + if (ReferenceEquals(_evilPart, child)) + return ShapesLanguage.Instance.CompositeShape_evilPart; + if (child is IShape child2 && _parts.Contains(child2)) + return ShapesLanguage.Instance.CompositeShape_parts; + return null; + } +} + +[LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-Coord")] +public partial class Coord : ConceptInstanceBase +{ + private int? _x = null; + /// Required Property + /// If X has not been set + [LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-x")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Property, Optional = false, Multiple = false)] + public int X { get => _x ?? throw new UnsetFeatureException(ShapesLanguage.Instance.Coord_x); set => SetX(value); } + + /// Required Property + public bool TryGetX([NotNullWhenAttribute(true)] out int? x) + { + x = _x; + return _x != null; + } + + /// Required Property + public Coord SetX(int value) + { + PropertyEventEmitter evt = new(ShapesLanguage.Instance.Coord_x, this, value, _x); + evt.CollectOldData(); + _x = value; + evt.RaiseEvent(); + return this; + } + + private int? _y = null; + /// Required Property + /// If Y has not been set + [LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-y")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Property, Optional = false, Multiple = false)] + public int Y { get => _y ?? throw new UnsetFeatureException(ShapesLanguage.Instance.Coord_y); set => SetY(value); } + + /// Required Property + public bool TryGetY([NotNullWhenAttribute(true)] out int? y) + { + y = _y; + return _y != null; + } + + /// Required Property + public Coord SetY(int value) + { + PropertyEventEmitter evt = new(ShapesLanguage.Instance.Coord_y, this, value, _y); + evt.CollectOldData(); + _y = value; + evt.RaiseEvent(); + return this; + } + + private int? _z = null; + /// Required Property + /// If Z has not been set + [LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-z")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Property, Optional = false, Multiple = false)] + public int Z { get => _z ?? throw new UnsetFeatureException(ShapesLanguage.Instance.Coord_z); set => SetZ(value); } + + /// Required Property + public bool TryGetZ([NotNullWhenAttribute(true)] out int? z) + { + z = _z; + return _z != null; + } + + /// Required Property + public Coord SetZ(int value) + { + PropertyEventEmitter evt = new(ShapesLanguage.Instance.Coord_z, this, value, _z); + evt.CollectOldData(); + _z = value; + evt.RaiseEvent(); + return this; + } + + public Coord(string id) : base(id) + { + } + + /// + public override Concept GetConcept() => ShapesLanguage.Instance.Coord; + /// + protected override bool GetInternal(Feature? feature, out Object? result) + { + if (base.GetInternal(feature, out result)) + return true; + if (ShapesLanguage.Instance.Coord_x.EqualsIdentity(feature)) + { + result = X; + return true; + } + + if (ShapesLanguage.Instance.Coord_y.EqualsIdentity(feature)) + { + result = Y; + return true; + } + + if (ShapesLanguage.Instance.Coord_z.EqualsIdentity(feature)) + { + result = Z; + return true; + } + + return false; + } + + /// + protected override bool SetInternal(Feature? feature, Object? value) + { + if (base.SetInternal(feature, value)) + return true; + if (ShapesLanguage.Instance.Coord_x.EqualsIdentity(feature)) + { + if (value is int v) + { + X = v; + return true; + } + + throw new InvalidValueException(feature, value); + } + + if (ShapesLanguage.Instance.Coord_y.EqualsIdentity(feature)) + { + if (value is int v) + { + Y = v; + return true; + } + + throw new InvalidValueException(feature, value); + } + + if (ShapesLanguage.Instance.Coord_z.EqualsIdentity(feature)) + { + if (value is int v) + { + Z = v; + return true; + } + + throw new InvalidValueException(feature, value); + } + + return false; + } + + /// + public override IEnumerable CollectAllSetFeatures() + { + List result = base.CollectAllSetFeatures().ToList(); + if (_x != default) + result.Add(ShapesLanguage.Instance.Coord_x); + if (_y != default) + result.Add(ShapesLanguage.Instance.Coord_y); + if (_z != default) + result.Add(ShapesLanguage.Instance.Coord_z); + return result; + } +} + +[LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-Documentation")] +public partial class Documentation : AnnotationInstanceBase +{ + private bool? _technical = null; + /// Optional Property + [LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-technical")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Property, Optional = true, Multiple = false)] + public bool? Technical { get => _technical; set => SetTechnical(value); } + + /// Optional Property + public bool TryGetTechnical([NotNullWhenAttribute(true)] out bool? technical) + { + technical = _technical; + return _technical != null; + } + + /// Optional Property + public Documentation SetTechnical(bool? value) + { + PropertyEventEmitter evt = new(ShapesLanguage.Instance.Documentation_technical, this, value, _technical); + evt.CollectOldData(); + _technical = value; + evt.RaiseEvent(); + return this; + } + + private string? _text = null; + /// Optional Property + [LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-text")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Property, Optional = true, Multiple = false)] + public string? Text { get => _text; set => SetText(value); } + + /// Optional Property + public bool TryGetText([NotNullWhenAttribute(true)] out string? text) + { + text = _text; + return _text != null; + } + + /// Optional Property + public Documentation SetText(string? value) + { + PropertyEventEmitter evt = new(ShapesLanguage.Instance.Documentation_text, this, value, _text); + evt.CollectOldData(); + _text = value; + evt.RaiseEvent(); + return this; + } + + public Documentation(string id) : base(id) + { + } + + /// + public override Annotation GetAnnotation() => ShapesLanguage.Instance.Documentation; + /// + protected override bool GetInternal(Feature? feature, out Object? result) + { + if (base.GetInternal(feature, out result)) + return true; + if (ShapesLanguage.Instance.Documentation_technical.EqualsIdentity(feature)) + { + result = Technical; + return true; + } + + if (ShapesLanguage.Instance.Documentation_text.EqualsIdentity(feature)) + { + result = Text; + return true; + } + + return false; + } + + /// + protected override bool SetInternal(Feature? feature, Object? value) + { + if (base.SetInternal(feature, value)) + return true; + if (ShapesLanguage.Instance.Documentation_technical.EqualsIdentity(feature)) + { + if (value is null or bool) + { + Technical = (bool?)value; + return true; + } + + throw new InvalidValueException(feature, value); + } + + if (ShapesLanguage.Instance.Documentation_text.EqualsIdentity(feature)) + { + if (value is null or string) + { + Text = (string?)value; + return true; + } + + throw new InvalidValueException(feature, value); + } + + return false; + } + + /// + public override IEnumerable CollectAllSetFeatures() + { + List result = base.CollectAllSetFeatures().ToList(); + if (_technical != default) + result.Add(ShapesLanguage.Instance.Documentation_technical); + if (_text != default) + result.Add(ShapesLanguage.Instance.Documentation_text); + return result; + } +} + +[LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-Geometry")] +public partial class Geometry : ConceptInstanceBase, IPartitionInstance +{ + private Documentation? _documentation = null; + /// Optional Single Containment + [LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-documentation")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Containment, Optional = true, Multiple = true)] + public Documentation? Documentation { get => _documentation; set => SetDocumentation(value); } + + /// Optional Single Containment + public bool TryGetDocumentation([NotNullWhenAttribute(true)] out Documentation? documentation) + { + documentation = _documentation; + return _documentation != null; + } + + /// Optional Single Containment + public Geometry SetDocumentation(Documentation? value) + { + ContainmentSingleEventEmitter evt = new(ShapesLanguage.Instance.Geometry_documentation, this, value, _documentation); + evt.CollectOldData(); + SetParentNull(_documentation); + AttachChild(value); + _documentation = value; + evt.RaiseEvent(); + return this; + } + + private readonly List _shapes = []; + /// Optional Multiple Containment + [LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-shapes")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Containment, Optional = true, Multiple = true)] + public IReadOnlyList Shapes { get => _shapes.AsReadOnly(); init => AddShapes(value); } + + /// Optional Multiple Containment + public bool TryGetShapes([NotNullWhenAttribute(true)] out IReadOnlyList shapes) + { + shapes = _shapes; + return _shapes.Count != 0; + } + + /// Optional Multiple Containment + public Geometry AddShapes(IEnumerable nodes) + { + var safeNodes = nodes?.ToList(); + AssureNotNull(safeNodes, ShapesLanguage.Instance.Geometry_shapes); + AssureNotNullMembers(safeNodes, ShapesLanguage.Instance.Geometry_shapes); + ContainmentAddMultipleEventEmitter evt = new(ShapesLanguage.Instance.Geometry_shapes, this, safeNodes, _shapes, null); + evt.CollectOldData(); + _shapes.AddRange(SetSelfParent(safeNodes, ShapesLanguage.Instance.Geometry_shapes)); + evt.RaiseEvent(); + return this; + } + + /// Optional Multiple Containment + public Geometry InsertShapes(int index, IEnumerable nodes) + { + AssureInRange(index, _shapes); + var safeNodes = nodes?.ToList(); + AssureNotNull(safeNodes, ShapesLanguage.Instance.Geometry_shapes); + AssureNoSelfMove(index, safeNodes, _shapes); + AssureNotNullMembers(safeNodes, ShapesLanguage.Instance.Geometry_shapes); + ContainmentAddMultipleEventEmitter evt = new(ShapesLanguage.Instance.Geometry_shapes, this, safeNodes, _shapes, index); + evt.CollectOldData(); + _shapes.InsertRange(index, SetSelfParent(safeNodes, ShapesLanguage.Instance.Geometry_shapes)); + evt.RaiseEvent(); + return this; + } + + /// Optional Multiple Containment + public Geometry RemoveShapes(IEnumerable nodes) + { + RemoveSelfParent(nodes?.ToList(), _shapes, ShapesLanguage.Instance.Geometry_shapes, ContainmentRemover(ShapesLanguage.Instance.Geometry_shapes)); + return this; + } + + public Geometry(string id) : base(id) + { + _eventHandler = new(this); + } + + /// + public override Concept GetConcept() => ShapesLanguage.Instance.Geometry; + private readonly PartitionEventHandler _eventHandler; + public IPartitionPublisher? GetPublisher() => _eventHandler; + public IPartitionCommander? GetCommander() => _eventHandler; + /// + protected override bool GetInternal(Feature? feature, out Object? result) + { + if (base.GetInternal(feature, out result)) + return true; + if (ShapesLanguage.Instance.Geometry_documentation.EqualsIdentity(feature)) + { + result = Documentation; + return true; + } + + if (ShapesLanguage.Instance.Geometry_shapes.EqualsIdentity(feature)) + { + result = Shapes; + return true; + } + + return false; + } + + /// + protected override bool SetInternal(Feature? feature, Object? value) + { + if (base.SetInternal(feature, value)) + return true; + if (ShapesLanguage.Instance.Geometry_documentation.EqualsIdentity(feature)) + { + if (value is null or LionWeb.Integration.Languages.Generated.V2024_1.Shapes.M2.Documentation) + { + Documentation = (LionWeb.Integration.Languages.Generated.V2024_1.Shapes.M2.Documentation?)value; + return true; + } + + throw new InvalidValueException(feature, value); + } + + if (ShapesLanguage.Instance.Geometry_shapes.EqualsIdentity(feature)) + { + var safeNodes = ShapesLanguage.Instance.Geometry_shapes.AsNodes(value).ToList(); + ContainmentSetEventEmitter evt = new(ShapesLanguage.Instance.Geometry_shapes, this, safeNodes, _shapes); + evt.CollectOldData(); + RemoveSelfParent(_shapes.ToList(), _shapes, ShapesLanguage.Instance.Geometry_shapes); + _shapes.AddRange(SetSelfParent(safeNodes, ShapesLanguage.Instance.Geometry_shapes)); + evt.RaiseEvent(); + return true; + } + + return false; + } + + /// + public override IEnumerable CollectAllSetFeatures() + { + List result = base.CollectAllSetFeatures().ToList(); + if (_documentation != default) + result.Add(ShapesLanguage.Instance.Geometry_documentation); + if (_shapes.Count != 0) + result.Add(ShapesLanguage.Instance.Geometry_shapes); + return result; + } + + /// + protected override bool DetachChild(INode child) + { + if (base.DetachChild(child)) + return true; + Containment? c = GetContainmentOf(child); + if (ShapesLanguage.Instance.Geometry_documentation.EqualsIdentity(c)) + { + _documentation = null; + return true; + } + + if (ShapesLanguage.Instance.Geometry_shapes.EqualsIdentity(c)) + { + RemoveSelfParent(child, _shapes, ShapesLanguage.Instance.Geometry_shapes); + return true; + } + + return false; + } + + /// + public override Containment? GetContainmentOf(INode child) + { + Containment? result = base.GetContainmentOf(child); + if (result != null) + return result; + if (ReferenceEquals(_documentation, child)) + return ShapesLanguage.Instance.Geometry_documentation; + if (child is IShape child1 && _shapes.Contains(child1)) + return ShapesLanguage.Instance.Geometry_shapes; + return null; + } +} + +[LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-IShape")] +public partial interface IShape : INode +{ + /// Optional Multiple Containment + [LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-fixpoints")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Containment, Optional = true, Multiple = true)] + public IReadOnlyList Fixpoints { get; init; } + + /// Optional Multiple Containment + public IShape AddFixpoints(IEnumerable nodes); + /// Optional Multiple Containment + public IShape InsertFixpoints(int index, IEnumerable nodes); + /// Optional Multiple Containment + public IShape RemoveFixpoints(IEnumerable nodes); + /// Required Property + [LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-uuid")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Property, Optional = false, Multiple = false)] + public string Uuid { get; set; } + + /// Required Property + public IShape SetUuid(string value); +} + +[LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-Line")] +public partial class Line : Shape, INamedWritable +{ + private Coord? _end = null; + /// Required Single Containment + /// If End has not been set + /// If set to null + [LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-end")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Containment, Optional = false, Multiple = false)] + public Coord End { get => _end ?? throw new UnsetFeatureException(ShapesLanguage.Instance.Line_end); set => SetEnd(value); } + + /// Required Single Containment + public bool TryGetEnd([NotNullWhenAttribute(true)] out Coord? end) + { + end = _end; + return _end != null; + } + + /// Required Single Containment + /// If set to null + public Line SetEnd(Coord value) + { + AssureNotNull(value, ShapesLanguage.Instance.Line_end); + ContainmentSingleEventEmitter evt = new(ShapesLanguage.Instance.Line_end, this, value, _end); + evt.CollectOldData(); + SetParentNull(_end); + AttachChild(value); + _end = value; + evt.RaiseEvent(); + return this; + } + + private Coord? _start = null; + /// Required Single Containment + /// If Start has not been set + /// If set to null + [LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-start")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Containment, Optional = false, Multiple = false)] + public Coord Start { get => _start ?? throw new UnsetFeatureException(ShapesLanguage.Instance.Line_start); set => SetStart(value); } + + /// Required Single Containment + public bool TryGetStart([NotNullWhenAttribute(true)] out Coord? start) + { + start = _start; + return _start != null; + } + + /// Required Single Containment + /// If set to null + public Line SetStart(Coord value) + { + AssureNotNull(value, ShapesLanguage.Instance.Line_start); + ContainmentSingleEventEmitter evt = new(ShapesLanguage.Instance.Line_start, this, value, _start); + evt.CollectOldData(); + SetParentNull(_start); + AttachChild(value); + _start = value; + evt.RaiseEvent(); + return this; + } + + public Line(string id) : base(id) + { + } + + /// + public override Concept GetConcept() => ShapesLanguage.Instance.Line; + /// + protected override bool GetInternal(Feature? feature, out Object? result) + { + if (base.GetInternal(feature, out result)) + return true; + if (ShapesLanguage.Instance.Line_end.EqualsIdentity(feature)) + { + result = End; + return true; + } + + if (ShapesLanguage.Instance.Line_start.EqualsIdentity(feature)) + { + result = Start; + return true; + } + + return false; + } + + /// + protected override bool SetInternal(Feature? feature, Object? value) + { + if (base.SetInternal(feature, value)) + return true; + if (ShapesLanguage.Instance.Line_end.EqualsIdentity(feature)) + { + if (value is LionWeb.Integration.Languages.Generated.V2024_1.Shapes.M2.Coord v) + { + End = v; + return true; + } + + throw new InvalidValueException(feature, value); + } + + if (ShapesLanguage.Instance.Line_start.EqualsIdentity(feature)) + { + if (value is LionWeb.Integration.Languages.Generated.V2024_1.Shapes.M2.Coord v) + { + Start = v; + return true; + } + + throw new InvalidValueException(feature, value); + } + + return false; + } + + /// + public override IEnumerable CollectAllSetFeatures() + { + List result = base.CollectAllSetFeatures().ToList(); + if (_end != default) + result.Add(ShapesLanguage.Instance.Line_end); + if (_start != default) + result.Add(ShapesLanguage.Instance.Line_start); + return result; + } + + /// + protected override bool DetachChild(INode child) + { + if (base.DetachChild(child)) + return true; + Containment? c = GetContainmentOf(child); + if (ShapesLanguage.Instance.Line_end.EqualsIdentity(c)) + { + _end = null; + return true; + } + + if (ShapesLanguage.Instance.Line_start.EqualsIdentity(c)) + { + _start = null; + return true; + } + + return false; + } + + /// + public override Containment? GetContainmentOf(INode child) + { + Containment? result = base.GetContainmentOf(child); + if (result != null) + return result; + if (ReferenceEquals(_end, child)) + return ShapesLanguage.Instance.Line_end; + if (ReferenceEquals(_start, child)) + return ShapesLanguage.Instance.Line_start; + return null; + } +} + +[LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-MaterialGroup")] +public partial class MaterialGroup : ConceptInstanceBase +{ + private IShape? _defaultShape = null; + /// Optional Single Containment + [LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-default-shape")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Containment, Optional = true, Multiple = true)] + public IShape? DefaultShape { get => _defaultShape; set => SetDefaultShape(value); } + + /// Optional Single Containment + public bool TryGetDefaultShape([NotNullWhenAttribute(true)] out IShape? defaultShape) + { + defaultShape = _defaultShape; + return _defaultShape != null; + } + + /// Optional Single Containment + public MaterialGroup SetDefaultShape(IShape? value) + { + ContainmentSingleEventEmitter evt = new(ShapesLanguage.Instance.MaterialGroup_defaultShape, this, value, _defaultShape); + evt.CollectOldData(); + SetParentNull(_defaultShape); + AttachChild(value); + _defaultShape = value; + evt.RaiseEvent(); + return this; + } + + private readonly List _materials = []; + /// Required Multiple Reference + /// If Materials is empty + [LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-group-materials")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Reference, Optional = false, Multiple = false)] + public IReadOnlyList Materials { get => AsNonEmptyReadOnly(_materials, ShapesLanguage.Instance.MaterialGroup_materials); init => AddMaterials(value); } + + /// Required Multiple Reference + public bool TryGetMaterials([NotNullWhenAttribute(true)] out IReadOnlyList materials) + { + materials = _materials; + return _materials.Count != 0; + } + + /// Required Multiple Reference + /// If both Materials and nodes are empty + public MaterialGroup AddMaterials(IEnumerable nodes) + { + var safeNodes = nodes?.ToList(); + AssureNotNull(safeNodes, ShapesLanguage.Instance.MaterialGroup_materials); + AssureNonEmpty(safeNodes, _materials, ShapesLanguage.Instance.MaterialGroup_materials); + ReferenceAddMultipleEventEmitter evt = new(ShapesLanguage.Instance.MaterialGroup_materials, this, safeNodes, _materials.Count); + evt.CollectOldData(); + _materials.AddRange(safeNodes); + evt.RaiseEvent(); + return this; + } + + /// Required Multiple Reference + /// If both Materials and nodes are empty + /// If index negative or greater than Materials.Count + public MaterialGroup InsertMaterials(int index, IEnumerable nodes) + { + AssureInRange(index, _materials); + var safeNodes = nodes?.ToList(); + AssureNotNull(safeNodes, ShapesLanguage.Instance.MaterialGroup_materials); + AssureNonEmpty(safeNodes, _materials, ShapesLanguage.Instance.MaterialGroup_materials); + ReferenceAddMultipleEventEmitter evt = new(ShapesLanguage.Instance.MaterialGroup_materials, this, safeNodes, index); + evt.CollectOldData(); + _materials.InsertRange(index, safeNodes); + evt.RaiseEvent(); + return this; + } + + /// Required Multiple Reference + /// If Materials would be empty + public MaterialGroup RemoveMaterials(IEnumerable nodes) + { + var safeNodes = nodes?.ToList(); + AssureNotNull(safeNodes, ShapesLanguage.Instance.MaterialGroup_materials); + AssureNonEmpty(safeNodes, _materials, ShapesLanguage.Instance.MaterialGroup_materials); + AssureNotClearing(safeNodes, _materials, ShapesLanguage.Instance.MaterialGroup_materials); + RemoveAll(safeNodes, _materials, ReferenceRemover(ShapesLanguage.Instance.MaterialGroup_materials)); + return this; + } + + private MatterState? _matterState = null; + /// Optional Property + [LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-matter-state")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Property, Optional = true, Multiple = false)] + public MatterState? MatterState { get => _matterState; set => SetMatterState(value); } + + /// Optional Property + public bool TryGetMatterState([NotNullWhenAttribute(true)] out MatterState? matterState) + { + matterState = _matterState; + return _matterState != null; + } + + /// Optional Property + public MaterialGroup SetMatterState(MatterState? value) + { + PropertyEventEmitter evt = new(ShapesLanguage.Instance.MaterialGroup_matterState, this, value, _matterState); + evt.CollectOldData(); + _matterState = value; + evt.RaiseEvent(); + return this; + } + + public MaterialGroup(string id) : base(id) + { + } + + /// + public override Concept GetConcept() => ShapesLanguage.Instance.MaterialGroup; + /// + protected override bool GetInternal(Feature? feature, out Object? result) + { + if (base.GetInternal(feature, out result)) + return true; + if (ShapesLanguage.Instance.MaterialGroup_defaultShape.EqualsIdentity(feature)) + { + result = DefaultShape; + return true; + } + + if (ShapesLanguage.Instance.MaterialGroup_materials.EqualsIdentity(feature)) + { + result = Materials; + return true; + } + + if (ShapesLanguage.Instance.MaterialGroup_matterState.EqualsIdentity(feature)) + { + result = MatterState; + return true; + } + + return false; + } + + /// + protected override bool SetInternal(Feature? feature, Object? value) + { + if (base.SetInternal(feature, value)) + return true; + if (ShapesLanguage.Instance.MaterialGroup_defaultShape.EqualsIdentity(feature)) + { + if (value is null or LionWeb.Integration.Languages.Generated.V2024_1.Shapes.M2.IShape) + { + DefaultShape = (LionWeb.Integration.Languages.Generated.V2024_1.Shapes.M2.IShape?)value; + return true; + } + + throw new InvalidValueException(feature, value); + } + + if (ShapesLanguage.Instance.MaterialGroup_materials.EqualsIdentity(feature)) + { + var safeNodes = ShapesLanguage.Instance.MaterialGroup_materials.AsNodes(value).ToList(); + AssureNonEmpty(safeNodes, ShapesLanguage.Instance.MaterialGroup_materials); + ReferenceSetEventEmitter evt = new(ShapesLanguage.Instance.MaterialGroup_materials, this, safeNodes, _materials); + evt.CollectOldData(); + _materials.Clear(); + _materials.AddRange(safeNodes); + evt.RaiseEvent(); + return true; + } + + if (ShapesLanguage.Instance.MaterialGroup_matterState.EqualsIdentity(feature)) + { + if (value is null or LionWeb.Integration.Languages.Generated.V2024_1.Shapes.M2.MatterState) + { + MatterState = (LionWeb.Integration.Languages.Generated.V2024_1.Shapes.M2.MatterState?)value; + return true; + } + + throw new InvalidValueException(feature, value); + } + + return false; + } + + /// + public override IEnumerable CollectAllSetFeatures() + { + List result = base.CollectAllSetFeatures().ToList(); + if (_defaultShape != default) + result.Add(ShapesLanguage.Instance.MaterialGroup_defaultShape); + if (_materials.Count != 0) + result.Add(ShapesLanguage.Instance.MaterialGroup_materials); + if (_matterState != default) + result.Add(ShapesLanguage.Instance.MaterialGroup_matterState); + return result; + } + + /// + protected override bool DetachChild(INode child) + { + if (base.DetachChild(child)) + return true; + Containment? c = GetContainmentOf(child); + if (ShapesLanguage.Instance.MaterialGroup_defaultShape.EqualsIdentity(c)) + { + _defaultShape = null; + return true; + } + + return false; + } + + /// + public override Containment? GetContainmentOf(INode child) + { + Containment? result = base.GetContainmentOf(child); + if (result != null) + return result; + if (ReferenceEquals(_defaultShape, child)) + return ShapesLanguage.Instance.MaterialGroup_defaultShape; + return null; + } +} + +[LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-OffsetDuplicate")] +public partial class OffsetDuplicate : Shape +{ + private Shape? _altSource = null; + /// Optional Single Reference + [LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-alt-source")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Reference, Optional = true, Multiple = true)] + public Shape? AltSource { get => _altSource; set => SetAltSource(value); } + + /// Optional Single Reference + public bool TryGetAltSource([NotNullWhenAttribute(true)] out Shape? altSource) + { + altSource = _altSource; + return _altSource != null; + } + + /// Optional Single Reference + public OffsetDuplicate SetAltSource(Shape? value) + { + ReferenceSingleEventEmitter evt = new(ShapesLanguage.Instance.OffsetDuplicate_altSource, this, value, _altSource); + evt.CollectOldData(); + _altSource = value; + evt.RaiseEvent(); + return this; + } + + private Documentation? _docs = null; + /// Optional Single Containment + [LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-docs")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Containment, Optional = true, Multiple = true)] + public Documentation? Docs { get => _docs; set => SetDocs(value); } + + /// Optional Single Containment + public bool TryGetDocs([NotNullWhenAttribute(true)] out Documentation? docs) + { + docs = _docs; + return _docs != null; + } + + /// Optional Single Containment + public OffsetDuplicate SetDocs(Documentation? value) + { + ContainmentSingleEventEmitter evt = new(ShapesLanguage.Instance.OffsetDuplicate_docs, this, value, _docs); + evt.CollectOldData(); + SetParentNull(_docs); + AttachChild(value); + _docs = value; + evt.RaiseEvent(); + return this; + } + + private Coord? _offset = null; + /// Required Single Containment + /// If Offset has not been set + /// If set to null + [LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-offset")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Containment, Optional = false, Multiple = false)] + public Coord Offset { get => _offset ?? throw new UnsetFeatureException(ShapesLanguage.Instance.OffsetDuplicate_offset); set => SetOffset(value); } + + /// Required Single Containment + public bool TryGetOffset([NotNullWhenAttribute(true)] out Coord? offset) + { + offset = _offset; + return _offset != null; + } + + /// Required Single Containment + /// If set to null + public OffsetDuplicate SetOffset(Coord value) + { + AssureNotNull(value, ShapesLanguage.Instance.OffsetDuplicate_offset); + ContainmentSingleEventEmitter evt = new(ShapesLanguage.Instance.OffsetDuplicate_offset, this, value, _offset); + evt.CollectOldData(); + SetParentNull(_offset); + AttachChild(value); + _offset = value; + evt.RaiseEvent(); + return this; + } + + private Documentation? _secretDocs = null; + /// Optional Single Containment + [LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-secret-docs")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Containment, Optional = true, Multiple = true)] + public Documentation? SecretDocs { get => _secretDocs; set => SetSecretDocs(value); } + + /// Optional Single Containment + public bool TryGetSecretDocs([NotNullWhenAttribute(true)] out Documentation? secretDocs) + { + secretDocs = _secretDocs; + return _secretDocs != null; + } + + /// Optional Single Containment + public OffsetDuplicate SetSecretDocs(Documentation? value) + { + ContainmentSingleEventEmitter evt = new(ShapesLanguage.Instance.OffsetDuplicate_secretDocs, this, value, _secretDocs); + evt.CollectOldData(); + SetParentNull(_secretDocs); + AttachChild(value); + _secretDocs = value; + evt.RaiseEvent(); + return this; + } + + private Shape? _source = null; + /// Required Single Reference + /// If Source has not been set + /// If set to null + [LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-source")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Reference, Optional = false, Multiple = false)] + public Shape Source { get => _source ?? throw new UnsetFeatureException(ShapesLanguage.Instance.OffsetDuplicate_source); set => SetSource(value); } + + /// Required Single Reference + public bool TryGetSource([NotNullWhenAttribute(true)] out Shape? source) + { + source = _source; + return _source != null; + } + + /// Required Single Reference + /// If set to null + public OffsetDuplicate SetSource(Shape value) + { + AssureNotNull(value, ShapesLanguage.Instance.OffsetDuplicate_source); + ReferenceSingleEventEmitter evt = new(ShapesLanguage.Instance.OffsetDuplicate_source, this, value, _source); + evt.CollectOldData(); + _source = value; + evt.RaiseEvent(); + return this; + } + + public OffsetDuplicate(string id) : base(id) + { + } + + /// + public override Concept GetConcept() => ShapesLanguage.Instance.OffsetDuplicate; + /// + protected override bool GetInternal(Feature? feature, out Object? result) + { + if (base.GetInternal(feature, out result)) + return true; + if (ShapesLanguage.Instance.OffsetDuplicate_altSource.EqualsIdentity(feature)) + { + result = AltSource; + return true; + } + + if (ShapesLanguage.Instance.OffsetDuplicate_docs.EqualsIdentity(feature)) + { + result = Docs; + return true; + } + + if (ShapesLanguage.Instance.OffsetDuplicate_offset.EqualsIdentity(feature)) + { + result = Offset; + return true; + } + + if (ShapesLanguage.Instance.OffsetDuplicate_secretDocs.EqualsIdentity(feature)) + { + result = SecretDocs; + return true; + } + + if (ShapesLanguage.Instance.OffsetDuplicate_source.EqualsIdentity(feature)) + { + result = Source; + return true; + } + + return false; + } + + /// + protected override bool SetInternal(Feature? feature, Object? value) + { + if (base.SetInternal(feature, value)) + return true; + if (ShapesLanguage.Instance.OffsetDuplicate_altSource.EqualsIdentity(feature)) + { + if (value is null or LionWeb.Integration.Languages.Generated.V2024_1.Shapes.M2.Shape) + { + AltSource = (LionWeb.Integration.Languages.Generated.V2024_1.Shapes.M2.Shape?)value; + return true; + } + + throw new InvalidValueException(feature, value); + } + + if (ShapesLanguage.Instance.OffsetDuplicate_docs.EqualsIdentity(feature)) + { + if (value is null or LionWeb.Integration.Languages.Generated.V2024_1.Shapes.M2.Documentation) + { + Docs = (LionWeb.Integration.Languages.Generated.V2024_1.Shapes.M2.Documentation?)value; + return true; + } + + throw new InvalidValueException(feature, value); + } + + if (ShapesLanguage.Instance.OffsetDuplicate_offset.EqualsIdentity(feature)) + { + if (value is LionWeb.Integration.Languages.Generated.V2024_1.Shapes.M2.Coord v) + { + Offset = v; + return true; + } + + throw new InvalidValueException(feature, value); + } + + if (ShapesLanguage.Instance.OffsetDuplicate_secretDocs.EqualsIdentity(feature)) + { + if (value is null or LionWeb.Integration.Languages.Generated.V2024_1.Shapes.M2.Documentation) + { + SecretDocs = (LionWeb.Integration.Languages.Generated.V2024_1.Shapes.M2.Documentation?)value; + return true; + } + + throw new InvalidValueException(feature, value); + } + + if (ShapesLanguage.Instance.OffsetDuplicate_source.EqualsIdentity(feature)) + { + if (value is LionWeb.Integration.Languages.Generated.V2024_1.Shapes.M2.Shape v) + { + Source = v; + return true; + } + + throw new InvalidValueException(feature, value); + } + + return false; + } + + /// + public override IEnumerable CollectAllSetFeatures() + { + List result = base.CollectAllSetFeatures().ToList(); + if (_altSource != default) + result.Add(ShapesLanguage.Instance.OffsetDuplicate_altSource); + if (_docs != default) + result.Add(ShapesLanguage.Instance.OffsetDuplicate_docs); + if (_offset != default) + result.Add(ShapesLanguage.Instance.OffsetDuplicate_offset); + if (_secretDocs != default) + result.Add(ShapesLanguage.Instance.OffsetDuplicate_secretDocs); + if (_source != default) + result.Add(ShapesLanguage.Instance.OffsetDuplicate_source); + return result; + } + + /// + protected override bool DetachChild(INode child) + { + if (base.DetachChild(child)) + return true; + Containment? c = GetContainmentOf(child); + if (ShapesLanguage.Instance.OffsetDuplicate_docs.EqualsIdentity(c)) + { + _docs = null; + return true; + } + + if (ShapesLanguage.Instance.OffsetDuplicate_offset.EqualsIdentity(c)) + { + _offset = null; + return true; + } + + if (ShapesLanguage.Instance.OffsetDuplicate_secretDocs.EqualsIdentity(c)) + { + _secretDocs = null; + return true; + } + + return false; + } + + /// + public override Containment? GetContainmentOf(INode child) + { + Containment? result = base.GetContainmentOf(child); + if (result != null) + return result; + if (ReferenceEquals(_docs, child)) + return ShapesLanguage.Instance.OffsetDuplicate_docs; + if (ReferenceEquals(_offset, child)) + return ShapesLanguage.Instance.OffsetDuplicate_offset; + if (ReferenceEquals(_secretDocs, child)) + return ShapesLanguage.Instance.OffsetDuplicate_secretDocs; + return null; + } +} + +[LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-ReferenceGeometry")] +public partial class ReferenceGeometry : ConceptInstanceBase, IPartitionInstance +{ + private readonly List _shapes = []; + /// Optional Multiple Reference + [LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-shapes-references")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Reference, Optional = true, Multiple = true)] + public IReadOnlyList Shapes { get => _shapes.AsReadOnly(); init => AddShapes(value); } + + /// Optional Multiple Reference + public bool TryGetShapes([NotNullWhenAttribute(true)] out IReadOnlyList shapes) + { + shapes = _shapes; + return _shapes.Count != 0; + } + + /// Optional Multiple Reference + public ReferenceGeometry AddShapes(IEnumerable nodes) + { + var safeNodes = nodes?.ToList(); + AssureNotNull(safeNodes, ShapesLanguage.Instance.ReferenceGeometry_shapes); + AssureNotNullMembers(safeNodes, ShapesLanguage.Instance.ReferenceGeometry_shapes); + ReferenceAddMultipleEventEmitter evt = new(ShapesLanguage.Instance.ReferenceGeometry_shapes, this, safeNodes, _shapes.Count); + evt.CollectOldData(); + _shapes.AddRange(safeNodes); + evt.RaiseEvent(); + return this; + } + + /// Optional Multiple Reference + public ReferenceGeometry InsertShapes(int index, IEnumerable nodes) + { + AssureInRange(index, _shapes); + var safeNodes = nodes?.ToList(); + AssureNotNull(safeNodes, ShapesLanguage.Instance.ReferenceGeometry_shapes); + AssureNotNullMembers(safeNodes, ShapesLanguage.Instance.ReferenceGeometry_shapes); + ReferenceAddMultipleEventEmitter evt = new(ShapesLanguage.Instance.ReferenceGeometry_shapes, this, safeNodes, index); + evt.CollectOldData(); + _shapes.InsertRange(index, safeNodes); + evt.RaiseEvent(); + return this; + } + + /// Optional Multiple Reference + public ReferenceGeometry RemoveShapes(IEnumerable nodes) + { + var safeNodes = nodes?.ToList(); + AssureNotNull(safeNodes, ShapesLanguage.Instance.ReferenceGeometry_shapes); + AssureNotNullMembers(safeNodes, ShapesLanguage.Instance.ReferenceGeometry_shapes); + RemoveAll(safeNodes, _shapes, ReferenceRemover(ShapesLanguage.Instance.ReferenceGeometry_shapes)); + return this; + } + + public ReferenceGeometry(string id) : base(id) + { + _eventHandler = new(this); + } + + /// + public override Concept GetConcept() => ShapesLanguage.Instance.ReferenceGeometry; + private readonly PartitionEventHandler _eventHandler; + public IPartitionPublisher? GetPublisher() => _eventHandler; + public IPartitionCommander? GetCommander() => _eventHandler; + /// + protected override bool GetInternal(Feature? feature, out Object? result) + { + if (base.GetInternal(feature, out result)) + return true; + if (ShapesLanguage.Instance.ReferenceGeometry_shapes.EqualsIdentity(feature)) + { + result = Shapes; + return true; + } + + return false; + } + + /// + protected override bool SetInternal(Feature? feature, Object? value) + { + if (base.SetInternal(feature, value)) + return true; + if (ShapesLanguage.Instance.ReferenceGeometry_shapes.EqualsIdentity(feature)) + { + var safeNodes = ShapesLanguage.Instance.ReferenceGeometry_shapes.AsNodes(value).ToList(); + AssureNotNull(safeNodes, ShapesLanguage.Instance.ReferenceGeometry_shapes); + AssureNotNullMembers(safeNodes, ShapesLanguage.Instance.ReferenceGeometry_shapes); + ReferenceSetEventEmitter evt = new(ShapesLanguage.Instance.ReferenceGeometry_shapes, this, safeNodes, _shapes); + evt.CollectOldData(); + _shapes.Clear(); + _shapes.AddRange(safeNodes); + evt.RaiseEvent(); + return true; + } + + return false; + } + + /// + public override IEnumerable CollectAllSetFeatures() + { + List result = base.CollectAllSetFeatures().ToList(); + if (_shapes.Count != 0) + result.Add(ShapesLanguage.Instance.ReferenceGeometry_shapes); + return result; + } +} + +[LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-Shape")] +public abstract partial class Shape : ConceptInstanceBase, INamedWritable, IShape +{ + private string? _name = null; + /// Required Property + /// If Name has not been set + /// If set to null + [LionCoreMetaPointer(Language = typeof(LionWeb.Core.VersionSpecific.V2024_1.BuiltInsLanguage_2024_1), Key = "LionCore-builtins-INamed-name")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Property, Optional = false, Multiple = false)] + public string Name { get => _name ?? throw new UnsetFeatureException(_builtIns.INamed_name); set => SetName(value); } + + /// Required Property + /// If set to null + public bool TryGetName([NotNullWhenAttribute(true)] out string? name) + { + name = _name; + return _name != null; + } +/// Required Property +/// If set to null + INamedWritable INamedWritable.SetName(string value) => SetName(value); + /// Required Property + /// If set to null + public Shape SetName(string value) + { + AssureNotNull(value, _builtIns.INamed_name); + PropertyEventEmitter evt = new(_builtIns.INamed_name, this, value, _name); + evt.CollectOldData(); + _name = value; + evt.RaiseEvent(); + return this; + } + + private readonly List _fixpoints = []; + /// Optional Multiple Containment + [LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-fixpoints")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Containment, Optional = true, Multiple = true)] + public IReadOnlyList Fixpoints { get => _fixpoints.AsReadOnly(); init => AddFixpoints(value); } + + /// Optional Multiple Containment + public bool TryGetFixpoints([NotNullWhenAttribute(true)] out IReadOnlyList fixpoints) + { + fixpoints = _fixpoints; + return _fixpoints.Count != 0; + } +/// Optional Multiple Containment + IShape IShape.AddFixpoints(IEnumerable nodes) => AddFixpoints(nodes); + /// Optional Multiple Containment + public Shape AddFixpoints(IEnumerable nodes) + { + var safeNodes = nodes?.ToList(); + AssureNotNull(safeNodes, ShapesLanguage.Instance.IShape_fixpoints); + AssureNotNullMembers(safeNodes, ShapesLanguage.Instance.IShape_fixpoints); + ContainmentAddMultipleEventEmitter evt = new(ShapesLanguage.Instance.IShape_fixpoints, this, safeNodes, _fixpoints, null); + evt.CollectOldData(); + _fixpoints.AddRange(SetSelfParent(safeNodes, ShapesLanguage.Instance.IShape_fixpoints)); + evt.RaiseEvent(); + return this; + } +/// Optional Multiple Containment + IShape IShape.InsertFixpoints(int index, IEnumerable nodes) => InsertFixpoints(index, nodes); + /// Optional Multiple Containment + public Shape InsertFixpoints(int index, IEnumerable nodes) + { + AssureInRange(index, _fixpoints); + var safeNodes = nodes?.ToList(); + AssureNotNull(safeNodes, ShapesLanguage.Instance.IShape_fixpoints); + AssureNoSelfMove(index, safeNodes, _fixpoints); + AssureNotNullMembers(safeNodes, ShapesLanguage.Instance.IShape_fixpoints); + ContainmentAddMultipleEventEmitter evt = new(ShapesLanguage.Instance.IShape_fixpoints, this, safeNodes, _fixpoints, index); + evt.CollectOldData(); + _fixpoints.InsertRange(index, SetSelfParent(safeNodes, ShapesLanguage.Instance.IShape_fixpoints)); + evt.RaiseEvent(); + return this; + } +/// Optional Multiple Containment + IShape IShape.RemoveFixpoints(IEnumerable nodes) => RemoveFixpoints(nodes); + /// Optional Multiple Containment + public Shape RemoveFixpoints(IEnumerable nodes) + { + RemoveSelfParent(nodes?.ToList(), _fixpoints, ShapesLanguage.Instance.IShape_fixpoints, ContainmentRemover(ShapesLanguage.Instance.IShape_fixpoints)); + return this; + } + + private string? _uuid = null; + /// Required Property + /// If Uuid has not been set + /// If set to null + [LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-uuid")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Property, Optional = false, Multiple = false)] + public string Uuid { get => _uuid ?? throw new UnsetFeatureException(ShapesLanguage.Instance.IShape_uuid); set => SetUuid(value); } + + /// Required Property + /// If set to null + public bool TryGetUuid([NotNullWhenAttribute(true)] out string? uuid) + { + uuid = _uuid; + return _uuid != null; + } +/// Required Property +/// If set to null + IShape IShape.SetUuid(string value) => SetUuid(value); + /// Required Property + /// If set to null + public Shape SetUuid(string value) + { + AssureNotNull(value, ShapesLanguage.Instance.IShape_uuid); + PropertyEventEmitter evt = new(ShapesLanguage.Instance.IShape_uuid, this, value, _uuid); + evt.CollectOldData(); + _uuid = value; + evt.RaiseEvent(); + return this; + } + + private Documentation? _shapeDocs = null; + /// Optional Single Containment + [LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-shape-docs")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Containment, Optional = true, Multiple = true)] + public Documentation? ShapeDocs { get => _shapeDocs; set => SetShapeDocs(value); } + + /// Optional Single Containment + public bool TryGetShapeDocs([NotNullWhenAttribute(true)] out Documentation? shapeDocs) + { + shapeDocs = _shapeDocs; + return _shapeDocs != null; + } + + /// Optional Single Containment + public Shape SetShapeDocs(Documentation? value) + { + ContainmentSingleEventEmitter evt = new(ShapesLanguage.Instance.Shape_shapeDocs, this, value, _shapeDocs); + evt.CollectOldData(); + SetParentNull(_shapeDocs); + AttachChild(value); + _shapeDocs = value; + evt.RaiseEvent(); + return this; + } + + public Shape(string id) : base(id) + { + } + + /// + public override Concept GetConcept() => ShapesLanguage.Instance.Shape; + /// + protected override bool GetInternal(Feature? feature, out Object? result) + { + if (base.GetInternal(feature, out result)) + return true; + if (_builtIns.INamed_name.EqualsIdentity(feature)) + { + result = Name; + return true; + } + + if (ShapesLanguage.Instance.IShape_fixpoints.EqualsIdentity(feature)) + { + result = Fixpoints; + return true; + } + + if (ShapesLanguage.Instance.IShape_uuid.EqualsIdentity(feature)) + { + result = Uuid; + return true; + } + + if (ShapesLanguage.Instance.Shape_shapeDocs.EqualsIdentity(feature)) + { + result = ShapeDocs; + return true; + } + + return false; + } + + /// + protected override bool SetInternal(Feature? feature, Object? value) + { + if (base.SetInternal(feature, value)) + return true; + if (_builtIns.INamed_name.EqualsIdentity(feature)) + { + if (value is string v) + { + Name = v; + return true; + } + + throw new InvalidValueException(feature, value); + } + + if (ShapesLanguage.Instance.IShape_fixpoints.EqualsIdentity(feature)) + { + var safeNodes = ShapesLanguage.Instance.IShape_fixpoints.AsNodes(value).ToList(); + ContainmentSetEventEmitter evt = new(ShapesLanguage.Instance.IShape_fixpoints, this, safeNodes, _fixpoints); + evt.CollectOldData(); + RemoveSelfParent(_fixpoints.ToList(), _fixpoints, ShapesLanguage.Instance.IShape_fixpoints); + _fixpoints.AddRange(SetSelfParent(safeNodes, ShapesLanguage.Instance.IShape_fixpoints)); + evt.RaiseEvent(); + return true; + } + + if (ShapesLanguage.Instance.IShape_uuid.EqualsIdentity(feature)) + { + if (value is string v) + { + Uuid = v; + return true; + } + + throw new InvalidValueException(feature, value); + } + + if (ShapesLanguage.Instance.Shape_shapeDocs.EqualsIdentity(feature)) + { + if (value is null or LionWeb.Integration.Languages.Generated.V2024_1.Shapes.M2.Documentation) + { + ShapeDocs = (LionWeb.Integration.Languages.Generated.V2024_1.Shapes.M2.Documentation?)value; + return true; + } + + throw new InvalidValueException(feature, value); + } + + return false; + } + + /// + public override IEnumerable CollectAllSetFeatures() + { + List result = base.CollectAllSetFeatures().ToList(); + if (_name != default) + result.Add(_builtIns.INamed_name); + if (_fixpoints.Count != 0) + result.Add(ShapesLanguage.Instance.IShape_fixpoints); + if (_uuid != default) + result.Add(ShapesLanguage.Instance.IShape_uuid); + if (_shapeDocs != default) + result.Add(ShapesLanguage.Instance.Shape_shapeDocs); + return result; + } + + /// + protected override bool DetachChild(INode child) + { + if (base.DetachChild(child)) + return true; + Containment? c = GetContainmentOf(child); + if (ShapesLanguage.Instance.IShape_fixpoints.EqualsIdentity(c)) + { + RemoveSelfParent(child, _fixpoints, ShapesLanguage.Instance.IShape_fixpoints); + return true; + } + + if (ShapesLanguage.Instance.Shape_shapeDocs.EqualsIdentity(c)) + { + _shapeDocs = null; + return true; + } + + return false; + } + + /// + public override Containment? GetContainmentOf(INode child) + { + Containment? result = base.GetContainmentOf(child); + if (result != null) + return result; + if (child is Coord child0 && _fixpoints.Contains(child0)) + return ShapesLanguage.Instance.IShape_fixpoints; + if (ReferenceEquals(_shapeDocs, child)) + return ShapesLanguage.Instance.Shape_shapeDocs; + return null; + } +} + +[LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-MatterState")] +public enum MatterState +{ + [LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-gas")] + gas, + [LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-liquid")] + liquid, + [LionCoreMetaPointer(Language = typeof(ShapesLanguage), Key = "key-solid")] + solid +} \ No newline at end of file diff --git a/src/cs/LionWeb.Integration.Languages/Generated/V2024_1/TestLanguage.g.cs b/src/cs/LionWeb.Integration.Languages/Generated/V2024_1/TestLanguage.g.cs new file mode 100644 index 0000000..b9e8593 --- /dev/null +++ b/src/cs/LionWeb.Integration.Languages/Generated/V2024_1/TestLanguage.g.cs @@ -0,0 +1,1228 @@ +// Generated by the C# M2TypesGenerator: modify at your own risk! +// ReSharper disable InconsistentNaming +// ReSharper disable SuggestVarOrType_SimpleTypes +// ReSharper disable SuggestVarOrType_Elsewhere +#pragma warning disable 1591 +#nullable enable +namespace LionWeb.Integration.Languages.Generated.V2024_1.TestLanguage.M2; +using LionWeb.Core; +using LionWeb.Core.M1.Event.Partition; +using LionWeb.Core.M1.Event.Partition.Emitter; +using LionWeb.Core.M2; +using LionWeb.Core.M3; +using LionWeb.Core.Utilities; +using LionWeb.Core.VersionSpecific.V2024_1; +using System; +using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; + +[LionCoreLanguage(Key = "TestLanguage", Version = "0")] +public partial class TestLanguageLanguage : LanguageBase +{ + public static readonly TestLanguageLanguage Instance = new Lazy(() => new("TestLanguage")).Value; + public TestLanguageLanguage(string id) : base(id, LionWebVersions.v2024_1) + { + _dataTypeTestConcept = new(() => new ConceptBase("DataTypeTestConcept", this) { Key = "DataTypeTestConcept", Name = "DataTypeTestConcept", Abstract = false, Partition = true, FeaturesLazy = new(() => [DataTypeTestConcept_booleanValue_0_1, DataTypeTestConcept_booleanValue_1, DataTypeTestConcept_enumValue_0_1, DataTypeTestConcept_enumValue_1, DataTypeTestConcept_integerValue_0_1, DataTypeTestConcept_integerValue_1, DataTypeTestConcept_stringValue_0_1, DataTypeTestConcept_stringValue_1]) }); + _dataTypeTestConcept_booleanValue_0_1 = new(() => new PropertyBase("DataTypeTestConcept-booleanValue_0_1", DataTypeTestConcept, this) { Key = "DataTypeTestConcept-booleanValue_0_1", Name = "booleanValue_0_1", Optional = true, Type = _builtIns.Boolean }); + _dataTypeTestConcept_booleanValue_1 = new(() => new PropertyBase("DataTypeTestConcept-booleanValue_1", DataTypeTestConcept, this) { Key = "DataTypeTestConcept-booleanValue_1", Name = "booleanValue_1", Optional = false, Type = _builtIns.Boolean }); + _dataTypeTestConcept_enumValue_0_1 = new(() => new PropertyBase("DataTypeTestConcept-enumValue_0_1", DataTypeTestConcept, this) { Key = "DataTypeTestConcept-enumValue_0_1", Name = "enumValue_0_1", Optional = true, Type = TestEnumeration }); + _dataTypeTestConcept_enumValue_1 = new(() => new PropertyBase("DataTypeTestConcept-enumValue_1", DataTypeTestConcept, this) { Key = "DataTypeTestConcept-enumValue_1", Name = "enumValue_1", Optional = false, Type = TestEnumeration }); + _dataTypeTestConcept_integerValue_0_1 = new(() => new PropertyBase("DataTypeTestConcept-integerValue_0_1", DataTypeTestConcept, this) { Key = "DataTypeTestConcept-integerValue_0_1", Name = "integerValue_0_1", Optional = true, Type = _builtIns.Integer }); + _dataTypeTestConcept_integerValue_1 = new(() => new PropertyBase("DataTypeTestConcept-integerValue_1", DataTypeTestConcept, this) { Key = "DataTypeTestConcept-integerValue_1", Name = "integerValue_1", Optional = false, Type = _builtIns.Integer }); + _dataTypeTestConcept_stringValue_0_1 = new(() => new PropertyBase("DataTypeTestConcept-stringValue_0_1", DataTypeTestConcept, this) { Key = "DataTypeTestConcept-stringValue_0_1", Name = "stringValue_0_1", Optional = true, Type = _builtIns.String }); + _dataTypeTestConcept_stringValue_1 = new(() => new PropertyBase("DataTypeTestConcept-stringValue_1", DataTypeTestConcept, this) { Key = "DataTypeTestConcept-stringValue_1", Name = "stringValue_1", Optional = false, Type = _builtIns.String }); + _linkTestConcept = new(() => new ConceptBase("LinkTestConcept", this) { Key = "LinkTestConcept", Name = "LinkTestConcept", Abstract = false, Partition = true, ImplementsLazy = new(() => [_builtIns.INamed]), FeaturesLazy = new(() => [LinkTestConcept_containment_0_1, LinkTestConcept_containment_0_n, LinkTestConcept_containment_1, LinkTestConcept_containment_1_n, LinkTestConcept_reference_0_1, LinkTestConcept_reference_0_n, LinkTestConcept_reference_1, LinkTestConcept_reference_1_n]) }); + _linkTestConcept_containment_0_1 = new(() => new ContainmentBase("LinkTestConcept-containment_0_1", LinkTestConcept, this) { Key = "LinkTestConcept-containment_0_1", Name = "containment_0_1", Optional = true, Multiple = false, Type = LinkTestConcept }); + _linkTestConcept_containment_0_n = new(() => new ContainmentBase("LinkTestConcept-containment_0_n", LinkTestConcept, this) { Key = "LinkTestConcept-containment_0_n", Name = "containment_0_n", Optional = true, Multiple = true, Type = LinkTestConcept }); + _linkTestConcept_containment_1 = new(() => new ContainmentBase("LinkTestConcept-containment_1", LinkTestConcept, this) { Key = "LinkTestConcept-containment_1", Name = "containment_1", Optional = false, Multiple = false, Type = LinkTestConcept }); + _linkTestConcept_containment_1_n = new(() => new ContainmentBase("LinkTestConcept-containment_1_n", LinkTestConcept, this) { Key = "LinkTestConcept-containment_1_n", Name = "containment_1_n", Optional = false, Multiple = true, Type = LinkTestConcept }); + _linkTestConcept_reference_0_1 = new(() => new ReferenceBase("LinkTestConcept-reference_0_1", LinkTestConcept, this) { Key = "LinkTestConcept-reference_0_1", Name = "reference_0_1", Optional = true, Multiple = false, Type = LinkTestConcept }); + _linkTestConcept_reference_0_n = new(() => new ReferenceBase("LinkTestConcept-reference_0_n", LinkTestConcept, this) { Key = "LinkTestConcept-reference_0_n", Name = "reference_0_n", Optional = true, Multiple = true, Type = LinkTestConcept }); + _linkTestConcept_reference_1 = new(() => new ReferenceBase("LinkTestConcept-reference_1", LinkTestConcept, this) { Key = "LinkTestConcept-reference_1", Name = "reference_1", Optional = false, Multiple = false, Type = LinkTestConcept }); + _linkTestConcept_reference_1_n = new(() => new ReferenceBase("LinkTestConcept-reference_1_n", LinkTestConcept, this) { Key = "LinkTestConcept-reference_1_n", Name = "reference_1_n", Optional = false, Multiple = true, Type = LinkTestConcept }); + _secondTestEnumeration = new(() => new EnumerationBase("SecondTestEnumeration", this) { Key = "SecondTestEnumeration", Name = "SecondTestEnumeration", LiteralsLazy = new(() => [SecondTestEnumeration_literal1, SecondTestEnumeration_literal2, SecondTestEnumeration_literal3]) }); + _secondTestEnumeration_literal1 = new(() => new EnumerationLiteralBase("SecondTestEnumeration-literal1", SecondTestEnumeration, this) { Key = "SecondTestEnumeration-literal1", Name = "literal1" }); + _secondTestEnumeration_literal2 = new(() => new EnumerationLiteralBase("SecondTestEnumeration-literal2", SecondTestEnumeration, this) { Key = "SecondTestEnumeration-literal2", Name = "literal2" }); + _secondTestEnumeration_literal3 = new(() => new EnumerationLiteralBase("SecondTestEnumeration-literal3", SecondTestEnumeration, this) { Key = "SecondTestEnumeration-literal3", Name = "literal3" }); + _testAnnotation = new(() => new AnnotationBase("TestAnnotation", this) { Key = "TestAnnotation", Name = "TestAnnotation", AnnotatesLazy = new(() => _builtIns.Node) }); + _testEnumeration = new(() => new EnumerationBase("TestEnumeration", this) { Key = "TestEnumeration", Name = "TestEnumeration", LiteralsLazy = new(() => [TestEnumeration_literal1, TestEnumeration_literal2, TestEnumeration_literal3]) }); + _testEnumeration_literal1 = new(() => new EnumerationLiteralBase("TestEnumeration-literal1", TestEnumeration, this) { Key = "TestEnumeration-literal1", Name = "literal1" }); + _testEnumeration_literal2 = new(() => new EnumerationLiteralBase("TestEnumeration-literal2", TestEnumeration, this) { Key = "TestEnumeration-literal2", Name = "literal2" }); + _testEnumeration_literal3 = new(() => new EnumerationLiteralBase("TestEnumeration-literal3", TestEnumeration, this) { Key = "TestEnumeration-literal3", Name = "literal3" }); + _factory = new TestLanguageFactory(this); + } + + /// + public override IReadOnlyList Entities => [DataTypeTestConcept, LinkTestConcept, SecondTestEnumeration, TestAnnotation, TestEnumeration]; + /// + public override IReadOnlyList DependsOn => []; + + private const string _key = "TestLanguage"; + /// + public override string Key => _key; + + private const string _name = "TestLanguage"; + /// + public override string Name => _name; + + private const string _version = "0"; + /// + public override string Version => _version; + + private readonly Lazy _dataTypeTestConcept; + public Concept DataTypeTestConcept => _dataTypeTestConcept.Value; + + private readonly Lazy _dataTypeTestConcept_booleanValue_0_1; + public Property DataTypeTestConcept_booleanValue_0_1 => _dataTypeTestConcept_booleanValue_0_1.Value; + + private readonly Lazy _dataTypeTestConcept_booleanValue_1; + public Property DataTypeTestConcept_booleanValue_1 => _dataTypeTestConcept_booleanValue_1.Value; + + private readonly Lazy _dataTypeTestConcept_enumValue_0_1; + public Property DataTypeTestConcept_enumValue_0_1 => _dataTypeTestConcept_enumValue_0_1.Value; + + private readonly Lazy _dataTypeTestConcept_enumValue_1; + public Property DataTypeTestConcept_enumValue_1 => _dataTypeTestConcept_enumValue_1.Value; + + private readonly Lazy _dataTypeTestConcept_integerValue_0_1; + public Property DataTypeTestConcept_integerValue_0_1 => _dataTypeTestConcept_integerValue_0_1.Value; + + private readonly Lazy _dataTypeTestConcept_integerValue_1; + public Property DataTypeTestConcept_integerValue_1 => _dataTypeTestConcept_integerValue_1.Value; + + private readonly Lazy _dataTypeTestConcept_stringValue_0_1; + public Property DataTypeTestConcept_stringValue_0_1 => _dataTypeTestConcept_stringValue_0_1.Value; + + private readonly Lazy _dataTypeTestConcept_stringValue_1; + public Property DataTypeTestConcept_stringValue_1 => _dataTypeTestConcept_stringValue_1.Value; + + private readonly Lazy _linkTestConcept; + public Concept LinkTestConcept => _linkTestConcept.Value; + + private readonly Lazy _linkTestConcept_containment_0_1; + public Containment LinkTestConcept_containment_0_1 => _linkTestConcept_containment_0_1.Value; + + private readonly Lazy _linkTestConcept_containment_0_n; + public Containment LinkTestConcept_containment_0_n => _linkTestConcept_containment_0_n.Value; + + private readonly Lazy _linkTestConcept_containment_1; + public Containment LinkTestConcept_containment_1 => _linkTestConcept_containment_1.Value; + + private readonly Lazy _linkTestConcept_containment_1_n; + public Containment LinkTestConcept_containment_1_n => _linkTestConcept_containment_1_n.Value; + + private readonly Lazy _linkTestConcept_reference_0_1; + public Reference LinkTestConcept_reference_0_1 => _linkTestConcept_reference_0_1.Value; + + private readonly Lazy _linkTestConcept_reference_0_n; + public Reference LinkTestConcept_reference_0_n => _linkTestConcept_reference_0_n.Value; + + private readonly Lazy _linkTestConcept_reference_1; + public Reference LinkTestConcept_reference_1 => _linkTestConcept_reference_1.Value; + + private readonly Lazy _linkTestConcept_reference_1_n; + public Reference LinkTestConcept_reference_1_n => _linkTestConcept_reference_1_n.Value; + + private readonly Lazy _secondTestEnumeration; + public Enumeration SecondTestEnumeration => _secondTestEnumeration.Value; + + private readonly Lazy _secondTestEnumeration_literal1; + public EnumerationLiteral SecondTestEnumeration_literal1 => _secondTestEnumeration_literal1.Value; + + private readonly Lazy _secondTestEnumeration_literal2; + public EnumerationLiteral SecondTestEnumeration_literal2 => _secondTestEnumeration_literal2.Value; + + private readonly Lazy _secondTestEnumeration_literal3; + public EnumerationLiteral SecondTestEnumeration_literal3 => _secondTestEnumeration_literal3.Value; + + private readonly Lazy _testAnnotation; + public Annotation TestAnnotation => _testAnnotation.Value; + + private readonly Lazy _testEnumeration; + public Enumeration TestEnumeration => _testEnumeration.Value; + + private readonly Lazy _testEnumeration_literal1; + public EnumerationLiteral TestEnumeration_literal1 => _testEnumeration_literal1.Value; + + private readonly Lazy _testEnumeration_literal2; + public EnumerationLiteral TestEnumeration_literal2 => _testEnumeration_literal2.Value; + + private readonly Lazy _testEnumeration_literal3; + public EnumerationLiteral TestEnumeration_literal3 => _testEnumeration_literal3.Value; +} + +public partial interface ITestLanguageFactory : INodeFactory +{ + public DataTypeTestConcept NewDataTypeTestConcept(string id); + public DataTypeTestConcept CreateDataTypeTestConcept(); + public LinkTestConcept NewLinkTestConcept(string id); + public LinkTestConcept CreateLinkTestConcept(); + public TestAnnotation NewTestAnnotation(string id); + public TestAnnotation CreateTestAnnotation(); +} + +public class TestLanguageFactory : AbstractBaseNodeFactory, ITestLanguageFactory +{ + private readonly TestLanguageLanguage _language; + public TestLanguageFactory(TestLanguageLanguage language) : base(language) + { + _language = language; + } + + /// + public override INode CreateNode(string id, Classifier classifier) + { + if (_language.DataTypeTestConcept.EqualsIdentity(classifier)) + return NewDataTypeTestConcept(id); + if (_language.LinkTestConcept.EqualsIdentity(classifier)) + return NewLinkTestConcept(id); + if (_language.TestAnnotation.EqualsIdentity(classifier)) + return NewTestAnnotation(id); + throw new UnsupportedClassifierException(classifier); + } + + /// + public override Enum GetEnumerationLiteral(EnumerationLiteral literal) + { + if (_language.SecondTestEnumeration.EqualsIdentity(literal.GetEnumeration())) + return EnumValueFor(literal); + if (_language.TestEnumeration.EqualsIdentity(literal.GetEnumeration())) + return EnumValueFor(literal); + throw new UnsupportedEnumerationLiteralException(literal); + } + + /// + public override IStructuredDataTypeInstance CreateStructuredDataTypeInstance(StructuredDataType structuredDataType, IFieldValues fieldValues) + { + throw new UnsupportedStructuredDataTypeException(structuredDataType); + } + + public virtual DataTypeTestConcept NewDataTypeTestConcept(string id) => new(id); + public virtual DataTypeTestConcept CreateDataTypeTestConcept() => NewDataTypeTestConcept(GetNewId()); + public virtual LinkTestConcept NewLinkTestConcept(string id) => new(id); + public virtual LinkTestConcept CreateLinkTestConcept() => NewLinkTestConcept(GetNewId()); + public virtual TestAnnotation NewTestAnnotation(string id) => new(id); + public virtual TestAnnotation CreateTestAnnotation() => NewTestAnnotation(GetNewId()); +} + +[LionCoreMetaPointer(Language = typeof(TestLanguageLanguage), Key = "DataTypeTestConcept")] +public partial class DataTypeTestConcept : ConceptInstanceBase, IPartitionInstance +{ + private bool? _booleanValue_0_1 = null; + /// Optional Property + [LionCoreMetaPointer(Language = typeof(TestLanguageLanguage), Key = "DataTypeTestConcept-booleanValue_0_1")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Property, Optional = true, Multiple = false)] + public bool? BooleanValue_0_1 { get => _booleanValue_0_1; set => SetBooleanValue_0_1(value); } + + /// Optional Property + public bool TryGetBooleanValue_0_1([NotNullWhenAttribute(true)] out bool? booleanValue_0_1) + { + booleanValue_0_1 = _booleanValue_0_1; + return _booleanValue_0_1 != null; + } + + /// Optional Property + public DataTypeTestConcept SetBooleanValue_0_1(bool? value) + { + PropertyEventEmitter evt = new(TestLanguageLanguage.Instance.DataTypeTestConcept_booleanValue_0_1, this, value, _booleanValue_0_1); + evt.CollectOldData(); + _booleanValue_0_1 = value; + evt.RaiseEvent(); + return this; + } + + private bool? _booleanValue_1 = null; + /// Required Property + /// If BooleanValue_1 has not been set + [LionCoreMetaPointer(Language = typeof(TestLanguageLanguage), Key = "DataTypeTestConcept-booleanValue_1")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Property, Optional = false, Multiple = false)] + public bool BooleanValue_1 { get => _booleanValue_1 ?? throw new UnsetFeatureException(TestLanguageLanguage.Instance.DataTypeTestConcept_booleanValue_1); set => SetBooleanValue_1(value); } + + /// Required Property + public bool TryGetBooleanValue_1([NotNullWhenAttribute(true)] out bool? booleanValue_1) + { + booleanValue_1 = _booleanValue_1; + return _booleanValue_1 != null; + } + + /// Required Property + public DataTypeTestConcept SetBooleanValue_1(bool value) + { + PropertyEventEmitter evt = new(TestLanguageLanguage.Instance.DataTypeTestConcept_booleanValue_1, this, value, _booleanValue_1); + evt.CollectOldData(); + _booleanValue_1 = value; + evt.RaiseEvent(); + return this; + } + + private TestEnumeration? _enumValue_0_1 = null; + /// Optional Property + [LionCoreMetaPointer(Language = typeof(TestLanguageLanguage), Key = "DataTypeTestConcept-enumValue_0_1")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Property, Optional = true, Multiple = false)] + public TestEnumeration? EnumValue_0_1 { get => _enumValue_0_1; set => SetEnumValue_0_1(value); } + + /// Optional Property + public bool TryGetEnumValue_0_1([NotNullWhenAttribute(true)] out TestEnumeration? enumValue_0_1) + { + enumValue_0_1 = _enumValue_0_1; + return _enumValue_0_1 != null; + } + + /// Optional Property + public DataTypeTestConcept SetEnumValue_0_1(TestEnumeration? value) + { + PropertyEventEmitter evt = new(TestLanguageLanguage.Instance.DataTypeTestConcept_enumValue_0_1, this, value, _enumValue_0_1); + evt.CollectOldData(); + _enumValue_0_1 = value; + evt.RaiseEvent(); + return this; + } + + private TestEnumeration? _enumValue_1 = null; + /// Required Property + /// If EnumValue_1 has not been set + /// If set to null + [LionCoreMetaPointer(Language = typeof(TestLanguageLanguage), Key = "DataTypeTestConcept-enumValue_1")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Property, Optional = false, Multiple = false)] + public TestEnumeration EnumValue_1 { get => _enumValue_1 ?? throw new UnsetFeatureException(TestLanguageLanguage.Instance.DataTypeTestConcept_enumValue_1); set => SetEnumValue_1(value); } + + /// Required Property + /// If set to null + public bool TryGetEnumValue_1([NotNullWhenAttribute(true)] out TestEnumeration? enumValue_1) + { + enumValue_1 = _enumValue_1; + return _enumValue_1 != null; + } + + /// Required Property + /// If set to null + public DataTypeTestConcept SetEnumValue_1(TestEnumeration value) + { + AssureNotNull(value, TestLanguageLanguage.Instance.DataTypeTestConcept_enumValue_1); + PropertyEventEmitter evt = new(TestLanguageLanguage.Instance.DataTypeTestConcept_enumValue_1, this, value, _enumValue_1); + evt.CollectOldData(); + _enumValue_1 = value; + evt.RaiseEvent(); + return this; + } + + private int? _integerValue_0_1 = null; + /// Optional Property + [LionCoreMetaPointer(Language = typeof(TestLanguageLanguage), Key = "DataTypeTestConcept-integerValue_0_1")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Property, Optional = true, Multiple = false)] + public int? IntegerValue_0_1 { get => _integerValue_0_1; set => SetIntegerValue_0_1(value); } + + /// Optional Property + public bool TryGetIntegerValue_0_1([NotNullWhenAttribute(true)] out int? integerValue_0_1) + { + integerValue_0_1 = _integerValue_0_1; + return _integerValue_0_1 != null; + } + + /// Optional Property + public DataTypeTestConcept SetIntegerValue_0_1(int? value) + { + PropertyEventEmitter evt = new(TestLanguageLanguage.Instance.DataTypeTestConcept_integerValue_0_1, this, value, _integerValue_0_1); + evt.CollectOldData(); + _integerValue_0_1 = value; + evt.RaiseEvent(); + return this; + } + + private int? _integerValue_1 = null; + /// Required Property + /// If IntegerValue_1 has not been set + [LionCoreMetaPointer(Language = typeof(TestLanguageLanguage), Key = "DataTypeTestConcept-integerValue_1")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Property, Optional = false, Multiple = false)] + public int IntegerValue_1 { get => _integerValue_1 ?? throw new UnsetFeatureException(TestLanguageLanguage.Instance.DataTypeTestConcept_integerValue_1); set => SetIntegerValue_1(value); } + + /// Required Property + public bool TryGetIntegerValue_1([NotNullWhenAttribute(true)] out int? integerValue_1) + { + integerValue_1 = _integerValue_1; + return _integerValue_1 != null; + } + + /// Required Property + public DataTypeTestConcept SetIntegerValue_1(int value) + { + PropertyEventEmitter evt = new(TestLanguageLanguage.Instance.DataTypeTestConcept_integerValue_1, this, value, _integerValue_1); + evt.CollectOldData(); + _integerValue_1 = value; + evt.RaiseEvent(); + return this; + } + + private string? _stringValue_0_1 = null; + /// Optional Property + [LionCoreMetaPointer(Language = typeof(TestLanguageLanguage), Key = "DataTypeTestConcept-stringValue_0_1")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Property, Optional = true, Multiple = false)] + public string? StringValue_0_1 { get => _stringValue_0_1; set => SetStringValue_0_1(value); } + + /// Optional Property + public bool TryGetStringValue_0_1([NotNullWhenAttribute(true)] out string? stringValue_0_1) + { + stringValue_0_1 = _stringValue_0_1; + return _stringValue_0_1 != null; + } + + /// Optional Property + public DataTypeTestConcept SetStringValue_0_1(string? value) + { + PropertyEventEmitter evt = new(TestLanguageLanguage.Instance.DataTypeTestConcept_stringValue_0_1, this, value, _stringValue_0_1); + evt.CollectOldData(); + _stringValue_0_1 = value; + evt.RaiseEvent(); + return this; + } + + private string? _stringValue_1 = null; + /// Required Property + /// If StringValue_1 has not been set + /// If set to null + [LionCoreMetaPointer(Language = typeof(TestLanguageLanguage), Key = "DataTypeTestConcept-stringValue_1")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Property, Optional = false, Multiple = false)] + public string StringValue_1 { get => _stringValue_1 ?? throw new UnsetFeatureException(TestLanguageLanguage.Instance.DataTypeTestConcept_stringValue_1); set => SetStringValue_1(value); } + + /// Required Property + /// If set to null + public bool TryGetStringValue_1([NotNullWhenAttribute(true)] out string? stringValue_1) + { + stringValue_1 = _stringValue_1; + return _stringValue_1 != null; + } + + /// Required Property + /// If set to null + public DataTypeTestConcept SetStringValue_1(string value) + { + AssureNotNull(value, TestLanguageLanguage.Instance.DataTypeTestConcept_stringValue_1); + PropertyEventEmitter evt = new(TestLanguageLanguage.Instance.DataTypeTestConcept_stringValue_1, this, value, _stringValue_1); + evt.CollectOldData(); + _stringValue_1 = value; + evt.RaiseEvent(); + return this; + } + + public DataTypeTestConcept(string id) : base(id) + { + _eventHandler = new(this); + } + + /// + public override Concept GetConcept() => TestLanguageLanguage.Instance.DataTypeTestConcept; + private readonly PartitionEventHandler _eventHandler; + public IPartitionPublisher? GetPublisher() => _eventHandler; + public IPartitionCommander? GetCommander() => _eventHandler; + /// + protected override bool GetInternal(Feature? feature, out Object? result) + { + if (base.GetInternal(feature, out result)) + return true; + if (TestLanguageLanguage.Instance.DataTypeTestConcept_booleanValue_0_1.EqualsIdentity(feature)) + { + result = BooleanValue_0_1; + return true; + } + + if (TestLanguageLanguage.Instance.DataTypeTestConcept_booleanValue_1.EqualsIdentity(feature)) + { + result = BooleanValue_1; + return true; + } + + if (TestLanguageLanguage.Instance.DataTypeTestConcept_enumValue_0_1.EqualsIdentity(feature)) + { + result = EnumValue_0_1; + return true; + } + + if (TestLanguageLanguage.Instance.DataTypeTestConcept_enumValue_1.EqualsIdentity(feature)) + { + result = EnumValue_1; + return true; + } + + if (TestLanguageLanguage.Instance.DataTypeTestConcept_integerValue_0_1.EqualsIdentity(feature)) + { + result = IntegerValue_0_1; + return true; + } + + if (TestLanguageLanguage.Instance.DataTypeTestConcept_integerValue_1.EqualsIdentity(feature)) + { + result = IntegerValue_1; + return true; + } + + if (TestLanguageLanguage.Instance.DataTypeTestConcept_stringValue_0_1.EqualsIdentity(feature)) + { + result = StringValue_0_1; + return true; + } + + if (TestLanguageLanguage.Instance.DataTypeTestConcept_stringValue_1.EqualsIdentity(feature)) + { + result = StringValue_1; + return true; + } + + return false; + } + + /// + protected override bool SetInternal(Feature? feature, Object? value) + { + if (base.SetInternal(feature, value)) + return true; + if (TestLanguageLanguage.Instance.DataTypeTestConcept_booleanValue_0_1.EqualsIdentity(feature)) + { + if (value is null or bool) + { + BooleanValue_0_1 = (bool?)value; + return true; + } + + throw new InvalidValueException(feature, value); + } + + if (TestLanguageLanguage.Instance.DataTypeTestConcept_booleanValue_1.EqualsIdentity(feature)) + { + if (value is bool v) + { + BooleanValue_1 = v; + return true; + } + + throw new InvalidValueException(feature, value); + } + + if (TestLanguageLanguage.Instance.DataTypeTestConcept_enumValue_0_1.EqualsIdentity(feature)) + { + if (value is null or LionWeb.Integration.Languages.Generated.V2024_1.TestLanguage.M2.TestEnumeration) + { + EnumValue_0_1 = (LionWeb.Integration.Languages.Generated.V2024_1.TestLanguage.M2.TestEnumeration?)value; + return true; + } + + throw new InvalidValueException(feature, value); + } + + if (TestLanguageLanguage.Instance.DataTypeTestConcept_enumValue_1.EqualsIdentity(feature)) + { + if (value is LionWeb.Integration.Languages.Generated.V2024_1.TestLanguage.M2.TestEnumeration v) + { + EnumValue_1 = v; + return true; + } + + throw new InvalidValueException(feature, value); + } + + if (TestLanguageLanguage.Instance.DataTypeTestConcept_integerValue_0_1.EqualsIdentity(feature)) + { + if (value is null or int) + { + IntegerValue_0_1 = (int?)value; + return true; + } + + throw new InvalidValueException(feature, value); + } + + if (TestLanguageLanguage.Instance.DataTypeTestConcept_integerValue_1.EqualsIdentity(feature)) + { + if (value is int v) + { + IntegerValue_1 = v; + return true; + } + + throw new InvalidValueException(feature, value); + } + + if (TestLanguageLanguage.Instance.DataTypeTestConcept_stringValue_0_1.EqualsIdentity(feature)) + { + if (value is null or string) + { + StringValue_0_1 = (string?)value; + return true; + } + + throw new InvalidValueException(feature, value); + } + + if (TestLanguageLanguage.Instance.DataTypeTestConcept_stringValue_1.EqualsIdentity(feature)) + { + if (value is string v) + { + StringValue_1 = v; + return true; + } + + throw new InvalidValueException(feature, value); + } + + return false; + } + + /// + public override IEnumerable CollectAllSetFeatures() + { + List result = base.CollectAllSetFeatures().ToList(); + if (_booleanValue_0_1 != default) + result.Add(TestLanguageLanguage.Instance.DataTypeTestConcept_booleanValue_0_1); + if (_booleanValue_1 != default) + result.Add(TestLanguageLanguage.Instance.DataTypeTestConcept_booleanValue_1); + if (_enumValue_0_1 != default) + result.Add(TestLanguageLanguage.Instance.DataTypeTestConcept_enumValue_0_1); + if (_enumValue_1 != default) + result.Add(TestLanguageLanguage.Instance.DataTypeTestConcept_enumValue_1); + if (_integerValue_0_1 != default) + result.Add(TestLanguageLanguage.Instance.DataTypeTestConcept_integerValue_0_1); + if (_integerValue_1 != default) + result.Add(TestLanguageLanguage.Instance.DataTypeTestConcept_integerValue_1); + if (_stringValue_0_1 != default) + result.Add(TestLanguageLanguage.Instance.DataTypeTestConcept_stringValue_0_1); + if (_stringValue_1 != default) + result.Add(TestLanguageLanguage.Instance.DataTypeTestConcept_stringValue_1); + return result; + } +} + +[LionCoreMetaPointer(Language = typeof(TestLanguageLanguage), Key = "LinkTestConcept")] +public partial class LinkTestConcept : ConceptInstanceBase, INamedWritable, IPartitionInstance +{ + private string? _name = null; + /// Required Property + /// If Name has not been set + /// If set to null + [LionCoreMetaPointer(Language = typeof(LionWeb.Core.VersionSpecific.V2024_1.BuiltInsLanguage_2024_1), Key = "LionCore-builtins-INamed-name")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Property, Optional = false, Multiple = false)] + public string Name { get => _name ?? throw new UnsetFeatureException(_builtIns.INamed_name); set => SetName(value); } + + /// Required Property + /// If set to null + public bool TryGetName([NotNullWhenAttribute(true)] out string? name) + { + name = _name; + return _name != null; + } +/// Required Property +/// If set to null + INamedWritable INamedWritable.SetName(string value) => SetName(value); + /// Required Property + /// If set to null + public LinkTestConcept SetName(string value) + { + AssureNotNull(value, _builtIns.INamed_name); + PropertyEventEmitter evt = new(_builtIns.INamed_name, this, value, _name); + evt.CollectOldData(); + _name = value; + evt.RaiseEvent(); + return this; + } + + private LinkTestConcept? _containment_0_1 = null; + /// Optional Single Containment + [LionCoreMetaPointer(Language = typeof(TestLanguageLanguage), Key = "LinkTestConcept-containment_0_1")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Containment, Optional = true, Multiple = true)] + public LinkTestConcept? Containment_0_1 { get => _containment_0_1; set => SetContainment_0_1(value); } + + /// Optional Single Containment + public bool TryGetContainment_0_1([NotNullWhenAttribute(true)] out LinkTestConcept? containment_0_1) + { + containment_0_1 = _containment_0_1; + return _containment_0_1 != null; + } + + /// Optional Single Containment + public LinkTestConcept SetContainment_0_1(LinkTestConcept? value) + { + ContainmentSingleEventEmitter evt = new(TestLanguageLanguage.Instance.LinkTestConcept_containment_0_1, this, value, _containment_0_1); + evt.CollectOldData(); + SetParentNull(_containment_0_1); + AttachChild(value); + _containment_0_1 = value; + evt.RaiseEvent(); + return this; + } + + private readonly List _containment_0_n = []; + /// Optional Multiple Containment + [LionCoreMetaPointer(Language = typeof(TestLanguageLanguage), Key = "LinkTestConcept-containment_0_n")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Containment, Optional = true, Multiple = true)] + public IReadOnlyList Containment_0_n { get => _containment_0_n.AsReadOnly(); init => AddContainment_0_n(value); } + + /// Optional Multiple Containment + public bool TryGetContainment_0_n([NotNullWhenAttribute(true)] out IReadOnlyList containment_0_n) + { + containment_0_n = _containment_0_n; + return _containment_0_n.Count != 0; + } + + /// Optional Multiple Containment + public LinkTestConcept AddContainment_0_n(IEnumerable nodes) + { + var safeNodes = nodes?.ToList(); + AssureNotNull(safeNodes, TestLanguageLanguage.Instance.LinkTestConcept_containment_0_n); + AssureNotNullMembers(safeNodes, TestLanguageLanguage.Instance.LinkTestConcept_containment_0_n); + ContainmentAddMultipleEventEmitter evt = new(TestLanguageLanguage.Instance.LinkTestConcept_containment_0_n, this, safeNodes, _containment_0_n, null); + evt.CollectOldData(); + _containment_0_n.AddRange(SetSelfParent(safeNodes, TestLanguageLanguage.Instance.LinkTestConcept_containment_0_n)); + evt.RaiseEvent(); + return this; + } + + /// Optional Multiple Containment + public LinkTestConcept InsertContainment_0_n(int index, IEnumerable nodes) + { + AssureInRange(index, _containment_0_n); + var safeNodes = nodes?.ToList(); + AssureNotNull(safeNodes, TestLanguageLanguage.Instance.LinkTestConcept_containment_0_n); + AssureNoSelfMove(index, safeNodes, _containment_0_n); + AssureNotNullMembers(safeNodes, TestLanguageLanguage.Instance.LinkTestConcept_containment_0_n); + ContainmentAddMultipleEventEmitter evt = new(TestLanguageLanguage.Instance.LinkTestConcept_containment_0_n, this, safeNodes, _containment_0_n, index); + evt.CollectOldData(); + _containment_0_n.InsertRange(index, SetSelfParent(safeNodes, TestLanguageLanguage.Instance.LinkTestConcept_containment_0_n)); + evt.RaiseEvent(); + return this; + } + + /// Optional Multiple Containment + public LinkTestConcept RemoveContainment_0_n(IEnumerable nodes) + { + RemoveSelfParent(nodes?.ToList(), _containment_0_n, TestLanguageLanguage.Instance.LinkTestConcept_containment_0_n, ContainmentRemover(TestLanguageLanguage.Instance.LinkTestConcept_containment_0_n)); + return this; + } + + private LinkTestConcept? _containment_1 = null; + /// Required Single Containment + /// If Containment_1 has not been set + /// If set to null + [LionCoreMetaPointer(Language = typeof(TestLanguageLanguage), Key = "LinkTestConcept-containment_1")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Containment, Optional = false, Multiple = false)] + public LinkTestConcept Containment_1 { get => _containment_1 ?? throw new UnsetFeatureException(TestLanguageLanguage.Instance.LinkTestConcept_containment_1); set => SetContainment_1(value); } + + /// Required Single Containment + public bool TryGetContainment_1([NotNullWhenAttribute(true)] out LinkTestConcept? containment_1) + { + containment_1 = _containment_1; + return _containment_1 != null; + } + + /// Required Single Containment + /// If set to null + public LinkTestConcept SetContainment_1(LinkTestConcept value) + { + AssureNotNull(value, TestLanguageLanguage.Instance.LinkTestConcept_containment_1); + ContainmentSingleEventEmitter evt = new(TestLanguageLanguage.Instance.LinkTestConcept_containment_1, this, value, _containment_1); + evt.CollectOldData(); + SetParentNull(_containment_1); + AttachChild(value); + _containment_1 = value; + evt.RaiseEvent(); + return this; + } + + private readonly List _containment_1_n = []; + /// Required Multiple Containment + /// If Containment_1_n is empty + [LionCoreMetaPointer(Language = typeof(TestLanguageLanguage), Key = "LinkTestConcept-containment_1_n")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Containment, Optional = false, Multiple = false)] + public IReadOnlyList Containment_1_n { get => AsNonEmptyReadOnly(_containment_1_n, TestLanguageLanguage.Instance.LinkTestConcept_containment_1_n); init => AddContainment_1_n(value); } + + /// Required Multiple Containment + public bool TryGetContainment_1_n([NotNullWhenAttribute(true)] out IReadOnlyList containment_1_n) + { + containment_1_n = _containment_1_n; + return _containment_1_n.Count != 0; + } + + /// Required Multiple Containment + /// If both Containment_1_n and nodes are empty + public LinkTestConcept AddContainment_1_n(IEnumerable nodes) + { + var safeNodes = nodes?.ToList(); + AssureNonEmpty(safeNodes, _containment_1_n, TestLanguageLanguage.Instance.LinkTestConcept_containment_1_n); + ContainmentAddMultipleEventEmitter evt = new(TestLanguageLanguage.Instance.LinkTestConcept_containment_1_n, this, safeNodes, _containment_1_n, null); + evt.CollectOldData(); + _containment_1_n.AddRange(SetSelfParent(safeNodes, TestLanguageLanguage.Instance.LinkTestConcept_containment_1_n)); + evt.RaiseEvent(); + return this; + } + + /// Required Multiple Containment + /// If both Containment_1_n and nodes are empty + /// If index negative or greater than Containment_1_n.Count + public LinkTestConcept InsertContainment_1_n(int index, IEnumerable nodes) + { + AssureInRange(index, _containment_1_n); + var safeNodes = nodes?.ToList(); + AssureNonEmpty(safeNodes, _containment_1_n, TestLanguageLanguage.Instance.LinkTestConcept_containment_1_n); + AssureNoSelfMove(index, safeNodes, _containment_1_n); + ContainmentAddMultipleEventEmitter evt = new(TestLanguageLanguage.Instance.LinkTestConcept_containment_1_n, this, safeNodes, _containment_1_n, index); + evt.CollectOldData(); + _containment_1_n.InsertRange(index, SetSelfParent(safeNodes, TestLanguageLanguage.Instance.LinkTestConcept_containment_1_n)); + evt.RaiseEvent(); + return this; + } + + /// Required Multiple Containment + /// If Containment_1_n would be empty + public LinkTestConcept RemoveContainment_1_n(IEnumerable nodes) + { + var safeNodes = nodes?.ToList(); + AssureNotNull(safeNodes, TestLanguageLanguage.Instance.LinkTestConcept_containment_1_n); + AssureNotClearing(safeNodes, _containment_1_n, TestLanguageLanguage.Instance.LinkTestConcept_containment_1_n); + RemoveSelfParent(safeNodes, _containment_1_n, TestLanguageLanguage.Instance.LinkTestConcept_containment_1_n, ContainmentRemover(TestLanguageLanguage.Instance.LinkTestConcept_containment_1_n)); + return this; + } + + private LinkTestConcept? _reference_0_1 = null; + /// Optional Single Reference + [LionCoreMetaPointer(Language = typeof(TestLanguageLanguage), Key = "LinkTestConcept-reference_0_1")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Reference, Optional = true, Multiple = true)] + public LinkTestConcept? Reference_0_1 { get => _reference_0_1; set => SetReference_0_1(value); } + + /// Optional Single Reference + public bool TryGetReference_0_1([NotNullWhenAttribute(true)] out LinkTestConcept? reference_0_1) + { + reference_0_1 = _reference_0_1; + return _reference_0_1 != null; + } + + /// Optional Single Reference + public LinkTestConcept SetReference_0_1(LinkTestConcept? value) + { + ReferenceSingleEventEmitter evt = new(TestLanguageLanguage.Instance.LinkTestConcept_reference_0_1, this, value, _reference_0_1); + evt.CollectOldData(); + _reference_0_1 = value; + evt.RaiseEvent(); + return this; + } + + private readonly List _reference_0_n = []; + /// Optional Multiple Reference + [LionCoreMetaPointer(Language = typeof(TestLanguageLanguage), Key = "LinkTestConcept-reference_0_n")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Reference, Optional = true, Multiple = true)] + public IReadOnlyList Reference_0_n { get => _reference_0_n.AsReadOnly(); init => AddReference_0_n(value); } + + /// Optional Multiple Reference + public bool TryGetReference_0_n([NotNullWhenAttribute(true)] out IReadOnlyList reference_0_n) + { + reference_0_n = _reference_0_n; + return _reference_0_n.Count != 0; + } + + /// Optional Multiple Reference + public LinkTestConcept AddReference_0_n(IEnumerable nodes) + { + var safeNodes = nodes?.ToList(); + AssureNotNull(safeNodes, TestLanguageLanguage.Instance.LinkTestConcept_reference_0_n); + AssureNotNullMembers(safeNodes, TestLanguageLanguage.Instance.LinkTestConcept_reference_0_n); + ReferenceAddMultipleEventEmitter evt = new(TestLanguageLanguage.Instance.LinkTestConcept_reference_0_n, this, safeNodes, _reference_0_n.Count); + evt.CollectOldData(); + _reference_0_n.AddRange(safeNodes); + evt.RaiseEvent(); + return this; + } + + /// Optional Multiple Reference + public LinkTestConcept InsertReference_0_n(int index, IEnumerable nodes) + { + AssureInRange(index, _reference_0_n); + var safeNodes = nodes?.ToList(); + AssureNotNull(safeNodes, TestLanguageLanguage.Instance.LinkTestConcept_reference_0_n); + AssureNotNullMembers(safeNodes, TestLanguageLanguage.Instance.LinkTestConcept_reference_0_n); + ReferenceAddMultipleEventEmitter evt = new(TestLanguageLanguage.Instance.LinkTestConcept_reference_0_n, this, safeNodes, index); + evt.CollectOldData(); + _reference_0_n.InsertRange(index, safeNodes); + evt.RaiseEvent(); + return this; + } + + /// Optional Multiple Reference + public LinkTestConcept RemoveReference_0_n(IEnumerable nodes) + { + var safeNodes = nodes?.ToList(); + AssureNotNull(safeNodes, TestLanguageLanguage.Instance.LinkTestConcept_reference_0_n); + AssureNotNullMembers(safeNodes, TestLanguageLanguage.Instance.LinkTestConcept_reference_0_n); + RemoveAll(safeNodes, _reference_0_n, ReferenceRemover(TestLanguageLanguage.Instance.LinkTestConcept_reference_0_n)); + return this; + } + + private LinkTestConcept? _reference_1 = null; + /// Required Single Reference + /// If Reference_1 has not been set + /// If set to null + [LionCoreMetaPointer(Language = typeof(TestLanguageLanguage), Key = "LinkTestConcept-reference_1")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Reference, Optional = false, Multiple = false)] + public LinkTestConcept Reference_1 { get => _reference_1 ?? throw new UnsetFeatureException(TestLanguageLanguage.Instance.LinkTestConcept_reference_1); set => SetReference_1(value); } + + /// Required Single Reference + public bool TryGetReference_1([NotNullWhenAttribute(true)] out LinkTestConcept? reference_1) + { + reference_1 = _reference_1; + return _reference_1 != null; + } + + /// Required Single Reference + /// If set to null + public LinkTestConcept SetReference_1(LinkTestConcept value) + { + AssureNotNull(value, TestLanguageLanguage.Instance.LinkTestConcept_reference_1); + ReferenceSingleEventEmitter evt = new(TestLanguageLanguage.Instance.LinkTestConcept_reference_1, this, value, _reference_1); + evt.CollectOldData(); + _reference_1 = value; + evt.RaiseEvent(); + return this; + } + + private readonly List _reference_1_n = []; + /// Required Multiple Reference + /// If Reference_1_n is empty + [LionCoreMetaPointer(Language = typeof(TestLanguageLanguage), Key = "LinkTestConcept-reference_1_n")] + [LionCoreFeature(Kind = LionCoreFeatureKind.Reference, Optional = false, Multiple = false)] + public IReadOnlyList Reference_1_n { get => AsNonEmptyReadOnly(_reference_1_n, TestLanguageLanguage.Instance.LinkTestConcept_reference_1_n); init => AddReference_1_n(value); } + + /// Required Multiple Reference + public bool TryGetReference_1_n([NotNullWhenAttribute(true)] out IReadOnlyList reference_1_n) + { + reference_1_n = _reference_1_n; + return _reference_1_n.Count != 0; + } + + /// Required Multiple Reference + /// If both Reference_1_n and nodes are empty + public LinkTestConcept AddReference_1_n(IEnumerable nodes) + { + var safeNodes = nodes?.ToList(); + AssureNotNull(safeNodes, TestLanguageLanguage.Instance.LinkTestConcept_reference_1_n); + AssureNonEmpty(safeNodes, _reference_1_n, TestLanguageLanguage.Instance.LinkTestConcept_reference_1_n); + ReferenceAddMultipleEventEmitter evt = new(TestLanguageLanguage.Instance.LinkTestConcept_reference_1_n, this, safeNodes, _reference_1_n.Count); + evt.CollectOldData(); + _reference_1_n.AddRange(safeNodes); + evt.RaiseEvent(); + return this; + } + + /// Required Multiple Reference + /// If both Reference_1_n and nodes are empty + /// If index negative or greater than Reference_1_n.Count + public LinkTestConcept InsertReference_1_n(int index, IEnumerable nodes) + { + AssureInRange(index, _reference_1_n); + var safeNodes = nodes?.ToList(); + AssureNotNull(safeNodes, TestLanguageLanguage.Instance.LinkTestConcept_reference_1_n); + AssureNonEmpty(safeNodes, _reference_1_n, TestLanguageLanguage.Instance.LinkTestConcept_reference_1_n); + ReferenceAddMultipleEventEmitter evt = new(TestLanguageLanguage.Instance.LinkTestConcept_reference_1_n, this, safeNodes, index); + evt.CollectOldData(); + _reference_1_n.InsertRange(index, safeNodes); + evt.RaiseEvent(); + return this; + } + + /// Required Multiple Reference + /// If Reference_1_n would be empty + public LinkTestConcept RemoveReference_1_n(IEnumerable nodes) + { + var safeNodes = nodes?.ToList(); + AssureNotNull(safeNodes, TestLanguageLanguage.Instance.LinkTestConcept_reference_1_n); + AssureNonEmpty(safeNodes, _reference_1_n, TestLanguageLanguage.Instance.LinkTestConcept_reference_1_n); + AssureNotClearing(safeNodes, _reference_1_n, TestLanguageLanguage.Instance.LinkTestConcept_reference_1_n); + RemoveAll(safeNodes, _reference_1_n, ReferenceRemover(TestLanguageLanguage.Instance.LinkTestConcept_reference_1_n)); + return this; + } + + public LinkTestConcept(string id) : base(id) + { + _eventHandler = new(this); + } + + /// + public override Concept GetConcept() => TestLanguageLanguage.Instance.LinkTestConcept; + private readonly PartitionEventHandler _eventHandler; + public IPartitionPublisher? GetPublisher() => _eventHandler; + public IPartitionCommander? GetCommander() => _eventHandler; + /// + protected override bool GetInternal(Feature? feature, out Object? result) + { + if (base.GetInternal(feature, out result)) + return true; + if (_builtIns.INamed_name.EqualsIdentity(feature)) + { + result = Name; + return true; + } + + if (TestLanguageLanguage.Instance.LinkTestConcept_containment_0_1.EqualsIdentity(feature)) + { + result = Containment_0_1; + return true; + } + + if (TestLanguageLanguage.Instance.LinkTestConcept_containment_0_n.EqualsIdentity(feature)) + { + result = Containment_0_n; + return true; + } + + if (TestLanguageLanguage.Instance.LinkTestConcept_containment_1.EqualsIdentity(feature)) + { + result = Containment_1; + return true; + } + + if (TestLanguageLanguage.Instance.LinkTestConcept_containment_1_n.EqualsIdentity(feature)) + { + result = Containment_1_n; + return true; + } + + if (TestLanguageLanguage.Instance.LinkTestConcept_reference_0_1.EqualsIdentity(feature)) + { + result = Reference_0_1; + return true; + } + + if (TestLanguageLanguage.Instance.LinkTestConcept_reference_0_n.EqualsIdentity(feature)) + { + result = Reference_0_n; + return true; + } + + if (TestLanguageLanguage.Instance.LinkTestConcept_reference_1.EqualsIdentity(feature)) + { + result = Reference_1; + return true; + } + + if (TestLanguageLanguage.Instance.LinkTestConcept_reference_1_n.EqualsIdentity(feature)) + { + result = Reference_1_n; + return true; + } + + return false; + } + + /// + protected override bool SetInternal(Feature? feature, Object? value) + { + if (base.SetInternal(feature, value)) + return true; + if (_builtIns.INamed_name.EqualsIdentity(feature)) + { + if (value is string v) + { + Name = v; + return true; + } + + throw new InvalidValueException(feature, value); + } + + if (TestLanguageLanguage.Instance.LinkTestConcept_containment_0_1.EqualsIdentity(feature)) + { + if (value is null or LionWeb.Integration.Languages.Generated.V2024_1.TestLanguage.M2.LinkTestConcept) + { + Containment_0_1 = (LionWeb.Integration.Languages.Generated.V2024_1.TestLanguage.M2.LinkTestConcept?)value; + return true; + } + + throw new InvalidValueException(feature, value); + } + + if (TestLanguageLanguage.Instance.LinkTestConcept_containment_0_n.EqualsIdentity(feature)) + { + var safeNodes = TestLanguageLanguage.Instance.LinkTestConcept_containment_0_n.AsNodes(value).ToList(); + ContainmentSetEventEmitter evt = new(TestLanguageLanguage.Instance.LinkTestConcept_containment_0_n, this, safeNodes, _containment_0_n); + evt.CollectOldData(); + RemoveSelfParent(_containment_0_n.ToList(), _containment_0_n, TestLanguageLanguage.Instance.LinkTestConcept_containment_0_n); + _containment_0_n.AddRange(SetSelfParent(safeNodes, TestLanguageLanguage.Instance.LinkTestConcept_containment_0_n)); + evt.RaiseEvent(); + return true; + } + + if (TestLanguageLanguage.Instance.LinkTestConcept_containment_1.EqualsIdentity(feature)) + { + if (value is LionWeb.Integration.Languages.Generated.V2024_1.TestLanguage.M2.LinkTestConcept v) + { + Containment_1 = v; + return true; + } + + throw new InvalidValueException(feature, value); + } + + if (TestLanguageLanguage.Instance.LinkTestConcept_containment_1_n.EqualsIdentity(feature)) + { + var safeNodes = TestLanguageLanguage.Instance.LinkTestConcept_containment_1_n.AsNodes(value).ToList(); + AssureNonEmpty(safeNodes, TestLanguageLanguage.Instance.LinkTestConcept_containment_1_n); + ContainmentSetEventEmitter evt = new(TestLanguageLanguage.Instance.LinkTestConcept_containment_1_n, this, safeNodes, _containment_1_n); + evt.CollectOldData(); + RemoveSelfParent(_containment_1_n.ToList(), _containment_1_n, TestLanguageLanguage.Instance.LinkTestConcept_containment_1_n); + _containment_1_n.AddRange(SetSelfParent(safeNodes, TestLanguageLanguage.Instance.LinkTestConcept_containment_1_n)); + evt.RaiseEvent(); + return true; + } + + if (TestLanguageLanguage.Instance.LinkTestConcept_reference_0_1.EqualsIdentity(feature)) + { + if (value is null or LionWeb.Integration.Languages.Generated.V2024_1.TestLanguage.M2.LinkTestConcept) + { + Reference_0_1 = (LionWeb.Integration.Languages.Generated.V2024_1.TestLanguage.M2.LinkTestConcept?)value; + return true; + } + + throw new InvalidValueException(feature, value); + } + + if (TestLanguageLanguage.Instance.LinkTestConcept_reference_0_n.EqualsIdentity(feature)) + { + var safeNodes = TestLanguageLanguage.Instance.LinkTestConcept_reference_0_n.AsNodes(value).ToList(); + AssureNotNull(safeNodes, TestLanguageLanguage.Instance.LinkTestConcept_reference_0_n); + AssureNotNullMembers(safeNodes, TestLanguageLanguage.Instance.LinkTestConcept_reference_0_n); + ReferenceSetEventEmitter evt = new(TestLanguageLanguage.Instance.LinkTestConcept_reference_0_n, this, safeNodes, _reference_0_n); + evt.CollectOldData(); + _reference_0_n.Clear(); + _reference_0_n.AddRange(safeNodes); + evt.RaiseEvent(); + return true; + } + + if (TestLanguageLanguage.Instance.LinkTestConcept_reference_1.EqualsIdentity(feature)) + { + if (value is LionWeb.Integration.Languages.Generated.V2024_1.TestLanguage.M2.LinkTestConcept v) + { + Reference_1 = v; + return true; + } + + throw new InvalidValueException(feature, value); + } + + if (TestLanguageLanguage.Instance.LinkTestConcept_reference_1_n.EqualsIdentity(feature)) + { + var safeNodes = TestLanguageLanguage.Instance.LinkTestConcept_reference_1_n.AsNodes(value).ToList(); + AssureNonEmpty(safeNodes, TestLanguageLanguage.Instance.LinkTestConcept_reference_1_n); + ReferenceSetEventEmitter evt = new(TestLanguageLanguage.Instance.LinkTestConcept_reference_1_n, this, safeNodes, _reference_1_n); + evt.CollectOldData(); + _reference_1_n.Clear(); + _reference_1_n.AddRange(safeNodes); + evt.RaiseEvent(); + return true; + } + + return false; + } + + /// + public override IEnumerable CollectAllSetFeatures() + { + List result = base.CollectAllSetFeatures().ToList(); + if (_name != default) + result.Add(_builtIns.INamed_name); + if (_containment_0_1 != default) + result.Add(TestLanguageLanguage.Instance.LinkTestConcept_containment_0_1); + if (_containment_0_n.Count != 0) + result.Add(TestLanguageLanguage.Instance.LinkTestConcept_containment_0_n); + if (_containment_1 != default) + result.Add(TestLanguageLanguage.Instance.LinkTestConcept_containment_1); + if (_containment_1_n.Count != 0) + result.Add(TestLanguageLanguage.Instance.LinkTestConcept_containment_1_n); + if (_reference_0_1 != default) + result.Add(TestLanguageLanguage.Instance.LinkTestConcept_reference_0_1); + if (_reference_0_n.Count != 0) + result.Add(TestLanguageLanguage.Instance.LinkTestConcept_reference_0_n); + if (_reference_1 != default) + result.Add(TestLanguageLanguage.Instance.LinkTestConcept_reference_1); + if (_reference_1_n.Count != 0) + result.Add(TestLanguageLanguage.Instance.LinkTestConcept_reference_1_n); + return result; + } + + /// + protected override bool DetachChild(INode child) + { + if (base.DetachChild(child)) + return true; + Containment? c = GetContainmentOf(child); + if (TestLanguageLanguage.Instance.LinkTestConcept_containment_0_1.EqualsIdentity(c)) + { + _containment_0_1 = null; + return true; + } + + if (TestLanguageLanguage.Instance.LinkTestConcept_containment_0_n.EqualsIdentity(c)) + { + RemoveSelfParent(child, _containment_0_n, TestLanguageLanguage.Instance.LinkTestConcept_containment_0_n); + return true; + } + + if (TestLanguageLanguage.Instance.LinkTestConcept_containment_1.EqualsIdentity(c)) + { + _containment_1 = null; + return true; + } + + if (TestLanguageLanguage.Instance.LinkTestConcept_containment_1_n.EqualsIdentity(c)) + { + RemoveSelfParent(child, _containment_1_n, TestLanguageLanguage.Instance.LinkTestConcept_containment_1_n); + return true; + } + + return false; + } + + /// + public override Containment? GetContainmentOf(INode child) + { + Containment? result = base.GetContainmentOf(child); + if (result != null) + return result; + if (ReferenceEquals(_containment_0_1, child)) + return TestLanguageLanguage.Instance.LinkTestConcept_containment_0_1; + if (child is LinkTestConcept child1 && _containment_0_n.Contains(child1)) + return TestLanguageLanguage.Instance.LinkTestConcept_containment_0_n; + if (ReferenceEquals(_containment_1, child)) + return TestLanguageLanguage.Instance.LinkTestConcept_containment_1; + if (child is LinkTestConcept child3 && _containment_1_n.Contains(child3)) + return TestLanguageLanguage.Instance.LinkTestConcept_containment_1_n; + return null; + } +} + +[LionCoreMetaPointer(Language = typeof(TestLanguageLanguage), Key = "TestAnnotation")] +public partial class TestAnnotation : AnnotationInstanceBase +{ + public TestAnnotation(string id) : base(id) + { + } + + /// + public override Annotation GetAnnotation() => TestLanguageLanguage.Instance.TestAnnotation; +} + +[LionCoreMetaPointer(Language = typeof(TestLanguageLanguage), Key = "SecondTestEnumeration")] +public enum SecondTestEnumeration +{ + [LionCoreMetaPointer(Language = typeof(TestLanguageLanguage), Key = "SecondTestEnumeration-literal1")] + literal1, + [LionCoreMetaPointer(Language = typeof(TestLanguageLanguage), Key = "SecondTestEnumeration-literal2")] + literal2, + [LionCoreMetaPointer(Language = typeof(TestLanguageLanguage), Key = "SecondTestEnumeration-literal3")] + literal3 +} + +[LionCoreMetaPointer(Language = typeof(TestLanguageLanguage), Key = "TestEnumeration")] +public enum TestEnumeration +{ + [LionCoreMetaPointer(Language = typeof(TestLanguageLanguage), Key = "TestEnumeration-literal1")] + literal1, + [LionCoreMetaPointer(Language = typeof(TestLanguageLanguage), Key = "TestEnumeration-literal2")] + literal2, + [LionCoreMetaPointer(Language = typeof(TestLanguageLanguage), Key = "TestEnumeration-literal3")] + literal3 +} \ No newline at end of file diff --git a/src/cs/LionWeb.Integration.Languages/Globals.cs b/src/cs/LionWeb.Integration.Languages/Globals.cs new file mode 100644 index 0000000..7d10de7 --- /dev/null +++ b/src/cs/LionWeb.Integration.Languages/Globals.cs @@ -0,0 +1,23 @@ +// Copyright 2025 LionWeb Project +// +// Licensed 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. +// +// SPDX-FileCopyrightText: 2025 LionWeb Project +// SPDX-License-Identifier: Apache-2.0 + +global using NodeId = string; +global using PropertyValue = string; +global using ResolveInfo = string; +global using MetaPointerKey = string; +global using Index = int; +global using EventId = string; diff --git a/src/cs/LionWeb.Integration.Languages/LionWeb.Integration.Languages.csproj b/src/cs/LionWeb.Integration.Languages/LionWeb.Integration.Languages.csproj new file mode 100644 index 0000000..8432c79 --- /dev/null +++ b/src/cs/LionWeb.Integration.Languages/LionWeb.Integration.Languages.csproj @@ -0,0 +1,19 @@ + + + + LionWeb.Integration.Languages + net8.0 + enable + enable + + + + + + + + + + + + diff --git a/src/cs/LionWeb.Integration.WebSocket.Client/LionWeb.Integration.WebSocket.Client.csproj b/src/cs/LionWeb.Integration.WebSocket.Client/LionWeb.Integration.WebSocket.Client.csproj new file mode 100644 index 0000000..cc55924 --- /dev/null +++ b/src/cs/LionWeb.Integration.WebSocket.Client/LionWeb.Integration.WebSocket.Client.csproj @@ -0,0 +1,17 @@ + + + + LionWeb.Integration.WebSocket.Client + LionWeb.Integration.WebSocket.Client.WebSocketClient + Exe + net8.0 + enable + enable + + + + + + + + diff --git a/src/cs/LionWeb.Integration.WebSocket.Client/WebSocketClient.cs b/src/cs/LionWeb.Integration.WebSocket.Client/WebSocketClient.cs new file mode 100644 index 0000000..c09c3fc --- /dev/null +++ b/src/cs/LionWeb.Integration.WebSocket.Client/WebSocketClient.cs @@ -0,0 +1,151 @@ +// Copyright 2025 LionWeb Project +// +// Licensed 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. +// +// SPDX-FileCopyrightText: 2025 LionWeb Project +// SPDX-License-Identifier: Apache-2.0 + +using System.Diagnostics; +using System.Net.WebSockets; +using System.Text; +using LionWeb.Core; +using LionWeb.Core.M1.Event; +using LionWeb.Core.M3; +using LionWeb.Integration.Languages.Generated.V2023_1.Shapes.M2; +using LionWeb.Protocol.Delta; +using LionWeb.Protocol.Delta.Client; +using LionWeb.Protocol.Delta.Message; +using LionWeb.Protocol.Delta.Message.Query; + +namespace LionWeb.Integration.WebSocket.Client; + +public class WebSocketClient(string name) : IDeltaClientConnector +{ + public const int BUFFER_SIZE = 0x10000; + + public const string ClientStartedMessage = "Client started."; + + private static readonly IVersion2023_1 _lionWebVersion = LionWebVersions.v2023_1; + + private static readonly List _languages = + [ShapesLanguage.Instance, _lionWebVersion.BuiltIns, _lionWebVersion.LionCore]; + + public static async Task Main(string[] args) + { + Trace.Listeners.Add(new ConsoleTraceListener()); + + string name = args[0]; + string serverIp = args[1]; + int serverPort = int.Parse(args[2]); + + var tasks = args[3].Split(","); + + Debug.WriteLine($"Starting client {name} to connect to {serverIp}:{serverPort}"); + Debug.WriteLine($"{name}: tasks: {string.Join(",", tasks)}"); + + var webSocketClient = new WebSocketClient(name); + var partition = new Geometry("a"); + var lionWeb = new LionWebTestClient(_lionWebVersion, _languages, $"client_{name}", partition, webSocketClient); + + await webSocketClient.ConnectToServer(serverIp, serverPort); + + foreach (var task in tasks) + { + switch (task) + { + case "SignOn": + await webSocketClient.SignOn(lionWeb); + break; + case "SignOff": + await webSocketClient.SignOff(lionWeb); + break; + case "AddDocs": + partition.Documentation = new Documentation("documentation"); + lionWeb.WaitForReplies(1); + break; + case "Wait": + lionWeb.WaitForReplies(1); + break; + case "SetDocsText": + partition.Documentation.Text = "hello there"; + lionWeb.WaitForReplies(1); + break; + } + } + + Console.ReadLine(); + } + + private readonly EventToDeltaCommandMapper _mapper = + new(new PartitionEventToDeltaCommandMapper(new CommandIdProvider(), _lionWebVersion)); + + private async Task SignOn(LionWebTestClient lionWeb) => + await lionWeb.SignOn(); + + + private async Task SignOff(LionWebTestClient lionWeb) => + await lionWeb.SignOff(); + + private int nextQueryId = 0; + + private string QueryId() => + $"{name}-{nextQueryId++}"; + + private readonly DeltaSerializer _deltaSerializer = new(); + private readonly ClientWebSocket _clientWebSocket = new ClientWebSocket(); + + /// + public event EventHandler? Receive; + + public async Task ConnectToServer(string ipAddress, int port) => + await ConnectToServer($"ws://{ipAddress}:{port}"); + + public async Task ConnectToServer(string serverUri) + { + await _clientWebSocket.ConnectAsync(new Uri(serverUri), CancellationToken.None); + + Console.WriteLine($"{name}: {ClientStartedMessage} Connected to the server: {serverUri}"); + + Task.Run(async () => + { + // Receive messages from the server + byte[] receiveBuffer = new byte[BUFFER_SIZE]; + while (_clientWebSocket.State == WebSocketState.Open) + { + WebSocketReceiveResult result = + await _clientWebSocket.ReceiveAsync(new ArraySegment(receiveBuffer), CancellationToken.None); + if (result.MessageType == WebSocketMessageType.Text) + { + string receivedMessage = Encoding.UTF8.GetString(receiveBuffer, 0, result.Count); + // Debug.WriteLine($"XXClient: received message: {receivedMessage}"); + var deserialized = _deltaSerializer.Deserialize(receivedMessage); + // do NOT await + Task.Run(() => Receive?.Invoke(this, deserialized)); + // Debug.WriteLine($"XXClient: processed message: {receivedMessage}"); + } + } + }); + } + + /// + public async Task Send(IDeltaContent content) => + await Send(_deltaSerializer.Serialize(content)); + + public async Task Send(string msg) => + await _clientWebSocket.SendAsync(new ArraySegment(Encoding.UTF8.GetBytes(msg)), WebSocketMessageType.Text, + true, CancellationToken.None); + + /// + public IDeltaContent Convert(IEvent internalEvent) + => _mapper.Map(internalEvent); +} \ No newline at end of file diff --git a/src/cs/LionWeb.Integration.WebSocket.Server/Globals.cs b/src/cs/LionWeb.Integration.WebSocket.Server/Globals.cs new file mode 100644 index 0000000..7d10de7 --- /dev/null +++ b/src/cs/LionWeb.Integration.WebSocket.Server/Globals.cs @@ -0,0 +1,23 @@ +// Copyright 2025 LionWeb Project +// +// Licensed 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. +// +// SPDX-FileCopyrightText: 2025 LionWeb Project +// SPDX-License-Identifier: Apache-2.0 + +global using NodeId = string; +global using PropertyValue = string; +global using ResolveInfo = string; +global using MetaPointerKey = string; +global using Index = int; +global using EventId = string; diff --git a/src/cs/LionWeb.Integration.WebSocket.Server/LionWeb.Integration.WebSocket.Server.csproj b/src/cs/LionWeb.Integration.WebSocket.Server/LionWeb.Integration.WebSocket.Server.csproj new file mode 100644 index 0000000..e40a8a4 --- /dev/null +++ b/src/cs/LionWeb.Integration.WebSocket.Server/LionWeb.Integration.WebSocket.Server.csproj @@ -0,0 +1,16 @@ + + + + LionWeb.Integration.WebSocket.Server + LionWeb.Integration.WebSocket.Server.WebSocketServer + Exe + net8.0 + enable + enable + + + + + + + diff --git a/src/cs/LionWeb.Integration.WebSocket.Server/WebSocketServer.cs b/src/cs/LionWeb.Integration.WebSocket.Server/WebSocketServer.cs new file mode 100644 index 0000000..e76dfd3 --- /dev/null +++ b/src/cs/LionWeb.Integration.WebSocket.Server/WebSocketServer.cs @@ -0,0 +1,225 @@ +// Copyright 2025 LionWeb Project +// +// Licensed 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. +// +// SPDX-FileCopyrightText: 2025 LionWeb Project +// SPDX-License-Identifier: Apache-2.0 + +using System.Collections.Concurrent; +using System.Diagnostics; +using System.Net; +using System.Net.WebSockets; +using System.Text; +using LionWeb.Core; +using LionWeb.Core.M1.Event; +using LionWeb.Core.M2; +using LionWeb.Core.M3; +using LionWeb.Integration.Languages.Generated.V2023_1.Shapes.M2; +using LionWeb.Integration.Languages.Generated.V2023_1.TestLanguage.M2; +using LionWeb.Protocol.Delta; +using LionWeb.Protocol.Delta.Message; +using LionWeb.Protocol.Delta.Message.Event; +using LionWeb.Protocol.Delta.Repository; + +namespace LionWeb.Integration.WebSocket.Server; + +public class WebSocketServer : IDeltaRepositoryConnector +{ + private const int BUFFER_SIZE = 0x10000; + public const string ServerStartedMessage = "Server started."; + + private static string IpAddress { get; set; } = "localhost"; + private static int Port { get; set; } = 42424; + + public static void Main(string[] args) + { + Trace.Listeners.Add(new ConsoleTraceListener()); + + Debug.WriteLine($"server args: {string.Join(", ", args)}"); + + Concept? optionalTestPartition = args.Length > 0 + ? TestLanguageLanguage.Instance + .Entities + .OfType() + .Where(c => c.Partition) + .FirstOrDefault(p => p.Key == args[0]) + : null; + + LionWebVersions lionWebVersion = LionWebVersions.v2023_1; + List languages = optionalTestPartition is not null + ? [optionalTestPartition.GetLanguage()] + : [ShapesLanguage.Instance]; + + var webSocketServer = new WebSocketServer(lionWebVersion) + { + Languages = languages + }; + webSocketServer.StartServer(IpAddress, Port); + + IPartitionInstance serverPartition = optionalTestPartition is not null + ? (IPartitionInstance)optionalTestPartition.GetLanguage().GetFactory() + .CreateNode("partition", optionalTestPartition) + : new Geometry("a"); + // var serverPartition = new DynamicPartitionInstance("a", ShapesLanguage.Instance.Geometry); + // var serverPartition = new LenientPartition("a", webSocketServer.LionWebVersion.BuiltIns.Node); + Debug.WriteLine($"Server partition: <{serverPartition.GetClassifier().Name}>{serverPartition.PrintIdentity()}"); + + var lionWebServer = new LionWebRepository(lionWebVersion, webSocketServer.Languages, "server", + serverPartition, + webSocketServer); + Console.ReadLine(); + webSocketServer.Stop(); + } + + public LionWebVersions LionWebVersion; + public required List Languages { get; init; } + + private readonly DeltaSerializer _deltaSerializer = new(); + private readonly EventToDeltaEventMapper _mapper; + + private readonly ConcurrentDictionary _knownClients = []; + private int _nextParticipationId = 0; + + private HttpListener? _listener; + + public WebSocketServer(LionWebVersions lionWebVersion) + { + LionWebVersion = lionWebVersion; + _mapper = new(new PartitionEventToDeltaEventMapper(new ExceptionParticipationIdProvider(), lionWebVersion)); + } + + /// + public event EventHandler> Receive; + + public void StartServer(string ipAddress, int port) + { + _listener = new HttpListener(); + _listener.Prefixes.Add($"http://{ipAddress}:{port}/"); + _listener.Start(); + + Console.WriteLine(ServerStartedMessage + " Waiting for connections..."); + + // do NOT await! + Task.Run(async () => + { + while (true) + { + HttpListenerContext context = await _listener.GetContextAsync(); + if (context.Request.IsWebSocketRequest) + { + // do NOT await! + ProcessWebSocketRequest(context); + } + else + { + context.Response.StatusCode = 400; + context.Response.Close(); + } + } + }); + } + + public void Stop() + { + if (_listener == null) + return; + + _listener.Stop(); + } + + /// + public async Task SendAll(IDeltaContent content) + { + foreach ((var clientInfo, System.Net.WebSockets.WebSocket socket) in _knownClients) + { + var encoded = Encode(_deltaSerializer.Serialize(UpdateSequenceNumber(content, clientInfo))); + // Debug.WriteLine($"XXServer: sending to {clientInfo} message: {content.GetType()}"); + await socket.SendAsync(encoded, WebSocketMessageType.Text, true, CancellationToken.None); + } + } + + private static IDeltaContent UpdateSequenceNumber(IDeltaContent content, IClientInfo clientInfo) + { + if (content is IDeltaEvent ev) + { + ev.SequenceNumber = clientInfo.GetAndIncrementSequenceNumber(); + } + + return content; + } + + /// + public IDeltaContent Convert(IEvent internalEvent) => + _mapper.Map(internalEvent); + + private static byte[] Encode(string msg) => + Encoding.UTF8.GetBytes(msg); + + + /// + public async Task Send(IClientInfo clientInfo, IDeltaContent content) => + await Send(clientInfo, _deltaSerializer.Serialize(UpdateSequenceNumber(content, clientInfo))); + + private async Task Send(IClientInfo clientInfo, string msg) + { + if (_knownClients.TryGetValue(clientInfo, out var socket)) + { + var encoded = Encode(msg); + await socket.SendAsync(encoded, WebSocketMessageType.Text, true, CancellationToken.None); + } + } + + private async Task ProcessWebSocketRequest(HttpListenerContext context) + { + HttpListenerWebSocketContext webSocketContext = await context.AcceptWebSocketAsync(null); + System.Net.WebSockets.WebSocket socket = webSocketContext.WebSocket; + var clientInfo = new ClientInfo() { ParticipationId = GetNextParticipationId() }; + _knownClients.TryAdd(clientInfo, socket); + + Debug.WriteLine($"WebSocket connection accepted: {context.Request.RemoteEndPoint}"); + + // Handle incoming messages + byte[] buffer = new byte[BUFFER_SIZE]; + while (socket.State == WebSocketState.Open) + { + WebSocketReceiveResult result = + await socket.ReceiveAsync(new ArraySegment(buffer), CancellationToken.None); + switch (result.MessageType) + { + case WebSocketMessageType.Text: + { + string receivedMessage = Encoding.UTF8.GetString(buffer, 0, result.Count); + Receive?.Invoke(this, + new DeltaMessageContext(clientInfo, + _deltaSerializer.Deserialize(receivedMessage))); + break; + } + case WebSocketMessageType.Close: + await socket.CloseAsync(WebSocketCloseStatus.NormalClosure, "", + CancellationToken.None); + _knownClients.TryRemove(clientInfo, out _); + break; + } + } + + _knownClients.TryRemove(clientInfo, out _); + } + + private string GetNextParticipationId() + { + lock (this) + { + return "participation" + _nextParticipationId++; + } + } +} \ No newline at end of file diff --git a/src/cs/LionWeb.Integration.WebSocket.Tests/Client/AnnotationClientTests.cs b/src/cs/LionWeb.Integration.WebSocket.Tests/Client/AnnotationClientTests.cs new file mode 100644 index 0000000..d4b9b23 --- /dev/null +++ b/src/cs/LionWeb.Integration.WebSocket.Tests/Client/AnnotationClientTests.cs @@ -0,0 +1,92 @@ +// Copyright 2024 TRUMPF Laser GmbH +// +// Licensed 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. +// +// SPDX-FileCopyrightText: 2024 TRUMPF Laser GmbH +// SPDX-License-Identifier: Apache-2.0 + +using LionWeb.Integration.Languages.Generated.V2023_1.TestLanguage.M2; + +namespace LionWeb.Integration.WebSocket.Tests.Client; + +[TestClass] +public class AnnotationClientTests : LinkClientTestBase +{ + [TestMethod] + public void AddAnnotation() => Timeout(() => + { + aPartition.AddAnnotations([new TestAnnotation("annotation")]); + bClient.WaitForReplies(1); + + AssertEquals(aPartition, bPartition); + }); + + [TestMethod] + public void DeleteAnnotation() => Timeout(() => + { + aPartition.AddAnnotations([new TestAnnotation("annotation")]); + bClient.WaitForReplies(1); + + AssertEquals(aPartition, bPartition); + + bPartition.RemoveAnnotations(bPartition.GetAnnotations()); + aClient.WaitForReplies(1); + + AssertEquals(aPartition, bPartition); + }); + + [TestMethod] + public void ReplaceAnnotation() => Timeout(() => + { + aPartition.AddAnnotations([new TestAnnotation("annotation")]); + bClient.WaitForReplies(1); + + AssertEquals(aPartition, bPartition); + + Assert.Fail("no way to replace annotation"); +// bPartition.annContainment_0_1 = new LinkTestConcept("replacedChild") { Name = "replaced" }; + aClient.WaitForReplies(1); + + AssertEquals(aPartition, bPartition); + }); + + [TestMethod] + public void MoveAnnotationFromOtherParent() => Timeout(() => + { + aPartition.Containment_0_1 = new LinkTestConcept("subHost"); + aPartition.Containment_0_1.AddAnnotations([new TestAnnotation("annotation")]); + bClient.WaitForReplies(2); + + AssertEquals(aPartition, bPartition); + + bPartition.AddAnnotations(bPartition.Containment_0_1.GetAnnotations()); + aClient.WaitForReplies(1); + + AssertEquals(aPartition, bPartition); + }); + + [TestMethod] + public void MoveAnnotationInSameParent() => Timeout( () => + + { + aPartition.AddAnnotations([new TestAnnotation("annotation0"), new TestAnnotation("annotation1")]); + bClient.WaitForReplies(2); + + AssertEquals(aPartition, bPartition); + + bPartition.InsertAnnotations(0, [bPartition.GetAnnotations().Last()]); + aClient.WaitForReplies(1); + + AssertEquals(aPartition, bPartition); + }); +} \ No newline at end of file diff --git a/src/cs/LionWeb.Integration.WebSocket.Tests/Client/ContainmentClientTests.cs b/src/cs/LionWeb.Integration.WebSocket.Tests/Client/ContainmentClientTests.cs new file mode 100644 index 0000000..bab977b --- /dev/null +++ b/src/cs/LionWeb.Integration.WebSocket.Tests/Client/ContainmentClientTests.cs @@ -0,0 +1,103 @@ +// Copyright 2024 TRUMPF Laser GmbH +// +// Licensed 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. +// +// SPDX-FileCopyrightText: 2024 TRUMPF Laser GmbH +// SPDX-License-Identifier: Apache-2.0 + +using LionWeb.Integration.Languages.Generated.V2023_1.TestLanguage.M2; + +namespace LionWeb.Integration.WebSocket.Tests.Client; + +[TestClass] +public class ContainmentClientTests : LinkClientTestBase +{ + [TestMethod] + public void AddChild() => Timeout(() => + { + aPartition.Containment_0_1 = new LinkTestConcept("child"); + bClient.WaitForReplies(1); + + AssertEquals(aPartition, bPartition); + }); + + [TestMethod] + public void DeleteChild() => Timeout(() => + { + aPartition.Containment_0_1 = new LinkTestConcept("child"); + bClient.WaitForReplies(1); + + AssertEquals(aPartition, bPartition); + + bPartition.Containment_0_1 = null; + aClient.WaitForReplies(1); + + AssertEquals(aPartition, bPartition); + }); + + [TestMethod] + public void ReplaceChild() => Timeout(() => + { + aPartition.Containment_0_1 = new LinkTestConcept("child"); + bClient.WaitForReplies(1); + + AssertEquals(aPartition, bPartition); + + bPartition.Containment_0_1 = new LinkTestConcept("replacedChild") { Name = "replaced" }; + aClient.WaitForReplies(1); + + AssertEquals(aPartition, bPartition); + }); + + [TestMethod] + public void MoveChildFromOtherContainment() => Timeout(() => + { + aPartition.Containment_0_1 = new LinkTestConcept("subHost") { Containment_0_1 = new LinkTestConcept("child") }; + bClient.WaitForReplies(1); + + AssertEquals(aPartition, bPartition); + + bPartition.Containment_1 = bPartition.Containment_0_1.Containment_0_1; + aClient.WaitForReplies(1); + + AssertEquals(aPartition, bPartition); + }); + + [TestMethod] + public void MoveChildFromOtherContainmentInSameParent() => Timeout(() => + { + aPartition.Containment_0_1 = new LinkTestConcept("child"); + bClient.WaitForReplies(1); + + AssertEquals(aPartition, bPartition); + + bPartition.Containment_1 = bPartition.Containment_0_1; + aClient.WaitForReplies(1); + + AssertEquals(aPartition, bPartition); + }); + + [TestMethod] + public void MoveChildInSameContainment() => Timeout(() => + { + aPartition.AddContainment_0_n([new LinkTestConcept("child0"), new LinkTestConcept("child1")]); + bClient.WaitForReplies(2); + + AssertEquals(aPartition, bPartition); + + bPartition.InsertContainment_0_n(0, [bPartition.Containment_0_n.Last()]); + aClient.WaitForReplies(1); + + AssertEquals(aPartition, bPartition); + }); +} \ No newline at end of file diff --git a/src/cs/LionWeb.Integration.WebSocket.Tests/Client/LinkClientTestBase.cs b/src/cs/LionWeb.Integration.WebSocket.Tests/Client/LinkClientTestBase.cs new file mode 100644 index 0000000..1ee80cb --- /dev/null +++ b/src/cs/LionWeb.Integration.WebSocket.Tests/Client/LinkClientTestBase.cs @@ -0,0 +1,43 @@ +// Copyright 2024 TRUMPF Laser GmbH +// +// Licensed 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. +// +// SPDX-FileCopyrightText: 2024 TRUMPF Laser GmbH +// SPDX-License-Identifier: Apache-2.0 + +using LionWeb.Core; +using LionWeb.Integration.Languages.Generated.V2023_1.TestLanguage.M2; +using LionWeb.Protocol.Delta.Client; + +namespace LionWeb.Integration.WebSocket.Tests.Client; + +public abstract class LinkClientTestBase : WebSocketClientTestBase +{ + protected readonly LinkTestConcept aPartition; + protected readonly LionWebTestClient aClient; + + protected readonly LinkTestConcept bPartition; + protected readonly LionWebTestClient bClient; + + public LinkClientTestBase() : base(LionWebVersions.v2023_1, [TestLanguageLanguage.Instance]) + { + aPartition = new("partition"); + aClient = ConnectWebSocket(aPartition, "A").Result; + + bPartition = new("partition"); + bClient = ConnectWebSocket(bPartition, "B").Result; + } + + protected override string AdditionalServerParameters() => + TestLanguageLanguage.Instance.LinkTestConcept.Key; +} \ No newline at end of file diff --git a/src/cs/LionWeb.Integration.WebSocket.Tests/Client/PropertyClientTests.cs b/src/cs/LionWeb.Integration.WebSocket.Tests/Client/PropertyClientTests.cs new file mode 100644 index 0000000..66f591d --- /dev/null +++ b/src/cs/LionWeb.Integration.WebSocket.Tests/Client/PropertyClientTests.cs @@ -0,0 +1,81 @@ +// Copyright 2024 TRUMPF Laser GmbH +// +// Licensed 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. +// +// SPDX-FileCopyrightText: 2024 TRUMPF Laser GmbH +// SPDX-License-Identifier: Apache-2.0 + +using LionWeb.Core; +using LionWeb.Integration.Languages.Generated.V2023_1.TestLanguage.M2; +using LionWeb.Protocol.Delta.Client; + +namespace LionWeb.Integration.WebSocket.Tests.Client; + +[TestClass] +public class PropertyClientTests : WebSocketClientTestBase +{ + private readonly DataTypeTestConcept aPartition; + private readonly LionWebTestClient aClient; + + private readonly DataTypeTestConcept bPartition; + private readonly LionWebTestClient bClient; + + public PropertyClientTests() : base(LionWebVersions.v2023_1, [TestLanguageLanguage.Instance]) + { + aPartition = new("partition"); + aClient = ConnectWebSocket(aPartition, "A").Result; + + bPartition = new("partition"); + bClient = ConnectWebSocket(bPartition, "B").Result; + } + + /// + protected override string AdditionalServerParameters() => + TestLanguageLanguage.Instance.DataTypeTestConcept.Key; + + [TestMethod] + public void AddProperty() => Timeout(() => + { + aPartition.StringValue_0_1 = "new property"; + bClient.WaitForReplies(1); + + AssertEquals(aPartition, bPartition); + }); + + [TestMethod] + public void ChangeProperty() => Timeout(() => + { + aPartition.StringValue_0_1 = "new property"; + bClient.WaitForReplies(1); + + bPartition.StringValue_0_1 = "changed property"; + aClient.WaitForReplies(1); + + AssertEquals(aPartition, bPartition); + }); + + [TestMethod] + + public void DeleteProperty() => Timeout(() => + { + aPartition.StringValue_0_1 = "new property"; + bClient.WaitForReplies(1); + + AssertEquals(aPartition, bPartition); + + bPartition.StringValue_0_1 = null; + aClient.WaitForReplies(1); + + AssertEquals(aPartition, bPartition); + }); +} \ No newline at end of file diff --git a/src/cs/LionWeb.Integration.WebSocket.Tests/Client/ReferenceClientTests.cs b/src/cs/LionWeb.Integration.WebSocket.Tests/Client/ReferenceClientTests.cs new file mode 100644 index 0000000..9c27ea7 --- /dev/null +++ b/src/cs/LionWeb.Integration.WebSocket.Tests/Client/ReferenceClientTests.cs @@ -0,0 +1,107 @@ +// Copyright 2024 TRUMPF Laser GmbH +// +// Licensed 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. +// +// SPDX-FileCopyrightText: 2024 TRUMPF Laser GmbH +// SPDX-License-Identifier: Apache-2.0 + +using LionWeb.Integration.Languages.Generated.V2023_1.TestLanguage.M2; + +namespace LionWeb.Integration.WebSocket.Tests.Client; + +[TestClass] +public class ReferenceClientTests : LinkClientTestBase +{ + [TestMethod] + public void AddReference() => Timeout(() => + { + aPartition.Containment_0_1 = new LinkTestConcept("child"); + aPartition.Reference_0_1 = aPartition.Containment_0_1; + bClient.WaitForReplies(2); + + AssertEquals(aPartition, bPartition); + }); + + [TestMethod] + public void DeleteReference() => Timeout(() => + { + aPartition.Containment_0_1 = new LinkTestConcept("child"); + aPartition.Reference_0_1 = aPartition.Containment_0_1; + bClient.WaitForReplies(2); + + AssertEquals(aPartition, bPartition); + + bPartition.Reference_0_1 = null; + aClient.WaitForReplies(1); + + AssertEquals(aPartition, bPartition); + }); + + [TestMethod] + public void ChangeReference() => Timeout(() => + { + aPartition.Containment_0_1 = new LinkTestConcept("childA"); + aPartition.Containment_1 = new LinkTestConcept("childB"); + aPartition.Reference_0_1 = aPartition.Containment_0_1; + bClient.WaitForReplies(3); + + AssertEquals(aPartition, bPartition); + + bPartition.Reference_0_1 = bPartition.Containment_0_1; + aClient.WaitForReplies(1); + + AssertEquals(aPartition, bPartition); + }); + + [TestMethod] + public void MoveEntryFromOtherReference() => Timeout(() => + { + aPartition.Containment_0_1 = new LinkTestConcept("subHost") { Containment_0_1 = new LinkTestConcept("child") }; + bClient.WaitForReplies(1); + + AssertEquals(aPartition, bPartition); + + Assert.Fail("no way to move reference"); + aClient.WaitForReplies(1); + + AssertEquals(aPartition, bPartition); + }); + + [TestMethod] + public void MoveEntryFromOtherReferenceInSameParent() => Timeout(() => + { + aPartition.Containment_0_1 = new LinkTestConcept("child"); + bClient.WaitForReplies(1); + + AssertEquals(aPartition, bPartition); + + Assert.Fail("no way to move reference"); + aClient.WaitForReplies(1); + + AssertEquals(aPartition, bPartition); + }); + + [TestMethod] + public void MoveEntryInSameReference() => Timeout(() => + { + aPartition.AddContainment_0_n([new LinkTestConcept("child0"), new LinkTestConcept("child1")]); + bClient.WaitForReplies(2); + + AssertEquals(aPartition, bPartition); + + Assert.Fail("no way to move reference"); + aClient.WaitForReplies(1); + + AssertEquals(aPartition, bPartition); + }); +} \ No newline at end of file diff --git a/src/cs/LionWeb.Integration.WebSocket.Tests/Globals.cs b/src/cs/LionWeb.Integration.WebSocket.Tests/Globals.cs new file mode 100644 index 0000000..326a512 --- /dev/null +++ b/src/cs/LionWeb.Integration.WebSocket.Tests/Globals.cs @@ -0,0 +1,20 @@ +// Copyright 2024 TRUMPF Laser GmbH +// +// Licensed 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. +// +// SPDX-FileCopyrightText: 2024 TRUMPF Laser GmbH +// SPDX-License-Identifier: Apache-2.0 + +global using Microsoft.VisualStudio.TestTools.UnitTesting; + +[assembly: DoNotParallelize] diff --git a/src/cs/LionWeb.Integration.WebSocket.Tests/LionWeb.Integration.WebSocket.Tests.csproj b/src/cs/LionWeb.Integration.WebSocket.Tests/LionWeb.Integration.WebSocket.Tests.csproj new file mode 100644 index 0000000..0ae7801 --- /dev/null +++ b/src/cs/LionWeb.Integration.WebSocket.Tests/LionWeb.Integration.WebSocket.Tests.csproj @@ -0,0 +1,23 @@ + + + LionWeb.Integration.WebSocket.Tests + true + + + + + + + + + + + + + + + + + + + diff --git a/src/cs/LionWeb.Integration.WebSocket.Tests/WebSocketClientTestBase.cs b/src/cs/LionWeb.Integration.WebSocket.Tests/WebSocketClientTestBase.cs new file mode 100644 index 0000000..8a72299 --- /dev/null +++ b/src/cs/LionWeb.Integration.WebSocket.Tests/WebSocketClientTestBase.cs @@ -0,0 +1,110 @@ +// Copyright 2025 LionWeb Project +// +// Licensed 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. +// +// SPDX-FileCopyrightText: 2025 LionWeb Project +// SPDX-License-Identifier: Apache-2.0 + +using System.Diagnostics; +using LionWeb.Core; +using LionWeb.Core.M3; +using LionWeb.Core.Utilities; +using LionWeb.Integration.WebSocket.Client; +using LionWeb.Integration.WebSocket.Server; +using LionWeb.Protocol.Delta.Client; +using LionWeb.Protocol.Delta.Message.Query; + +namespace LionWeb.Integration.WebSocket.Tests; + +[TestClass] +public abstract class WebSocketClientTestBase : WebSocketTestBase, IDisposable +{ + private Process _process; + + protected WebSocketClientTestBase(LionWebVersions? lionWebVersion = null, List? languages = null) : base(lionWebVersion, languages) + { + Debug.WriteLine(Directory.GetCurrentDirectory()); + StartServer(); + } + + private void StartServer() + { + _process = new Process(); + _process.StartInfo.FileName = "dotnet"; + _process.StartInfo.WorkingDirectory = + $"{Directory.GetCurrentDirectory()}/../../../../LionWeb.Integration.WebSocket.Server"; + _process.StartInfo.Arguments = $""" + run + -v q + --property WarningLevel=0 + --property NoWarn=NU1507 + {AdditionalServerParameters()} + """.ReplaceLineEndings(" "); + _process.StartInfo.UseShellExecute = false; + _process.StartInfo.RedirectStandardError = true; + _process.StartInfo.RedirectStandardInput = true; + _process.StartInfo.RedirectStandardOutput = true; + + var serverStarted = false; + + _process.OutputDataReceived += (sender, args) => + { + if (args.Data?.Contains(WebSocketServer.ServerStartedMessage) ?? false) + serverStarted = true; + Console.WriteLine(args.Data); + }; + _process.ErrorDataReceived += (sender, args) => Console.Error.WriteLine(args.Data); + + Assert.IsTrue(_process.Start()); + _process.BeginErrorReadLine(); + _process.BeginOutputReadLine(); + + while (!serverStarted) + { + Thread.Sleep(100); + } + + Assert.IsFalse(_process.HasExited); + } + + protected virtual string AdditionalServerParameters() => + ""; + + /// + [TestCleanup()] + [ClassCleanup(InheritanceBehavior.BeforeEachDerivedClass, ClassCleanupBehavior.EndOfClass)] + public void Dispose() + { + if (_process == null || _process.HasExited) + return; + + try + { + TestContext.WriteLine($"Killing WebSocket Server {_process.ProcessName}"); + _process.Kill(); + } + catch (Exception e) + { + TestContext.WriteLine("Dispose:" + e); + } + } + + protected async Task ConnectWebSocket(IPartitionInstance partition, string name) + { + var webSocket = new WebSocketClient(name); + var lionWeb = new LionWebTestClient(_lionWebVersion, _languages, $"client_{name}", partition, webSocket); + await webSocket.ConnectToServer(IpAddress, Port); + await lionWeb.SignOn(); + return lionWeb; + } +} \ No newline at end of file diff --git a/src/cs/LionWeb.Integration.WebSocket.Tests/WebSocketClientTests.cs b/src/cs/LionWeb.Integration.WebSocket.Tests/WebSocketClientTests.cs new file mode 100644 index 0000000..72ba752 --- /dev/null +++ b/src/cs/LionWeb.Integration.WebSocket.Tests/WebSocketClientTests.cs @@ -0,0 +1,132 @@ +// Copyright 2025 LionWeb Project +// +// Licensed 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. +// +// SPDX-FileCopyrightText: 2025 LionWeb Project +// SPDX-License-Identifier: Apache-2.0 + +using System.Diagnostics; +using System.Text.Json; +using LionWeb.Core.M1.Event; +using LionWeb.Core.Serialization; +using LionWeb.Integration.Languages.Generated.V2023_1.Shapes.M2; +using LionWeb.Integration.WebSocket.Client; +using LionWeb.Protocol.Delta; +using LionWeb.Protocol.Delta.Message; +using LionWeb.Protocol.Delta.Message.Event; + +namespace LionWeb.Integration.WebSocket.Tests; + +[TestClass] +public class WebSocketClientTests : WebSocketClientTestBase +{ + [TestMethod] + public void bla() => Timeout(() => + { + var childAdded = new ChildAdded( + "parent", + new DeltaSerializationChunk([ + new SerializedNode() + { + Id = "documentation", + Classifier = new MetaPointer("key-Shapes", "1", "key-Documentation"), + Properties = + [ + new SerializedProperty() + { + Property = new MetaPointer("key-Shapes", "1", "key-technical"), + Value = null + }, + new SerializedProperty() + { + Property = new MetaPointer("key-Shapes", "1", "key-text"), + Value = null + }, + ], + Containments = [], + References = [], + Annotations = [], + Parent = "a" + } + ]), + new MetaPointer("lang", "ver", "key"), 3, + [new CommandSource("participationId", "commandId")], + []); + + Console.WriteLine(childAdded); + + var jsonSerializerOptions = new JsonSerializerOptions + { + PropertyNamingPolicy = JsonNamingPolicy.CamelCase, + WriteIndented = true, + TypeInfoResolver = new DeltaProtocolTypeResolver() + }; + var serialized = JsonSerializer.Serialize(childAdded, jsonSerializerOptions); + + Console.WriteLine(serialized); + + var deltaEvent = JsonSerializer.Deserialize(serialized, jsonSerializerOptions); + Console.WriteLine(deltaEvent); + Console.WriteLine((deltaEvent as ChildAdded)?.NewChild.Nodes.First()); + }); + + [TestMethod, Timeout(3000)] + public async Task Communication() + { + var clientA = new WebSocketClient("A"); + clientA.Receive += (sender, msg) => Console.WriteLine($"client A received: {msg}"); + + var clientB = new WebSocketClient("B"); + clientB.Receive += (sender, msg) => Console.WriteLine($"client B received: {msg}"); + + var ipAddress = "localhost"; + var port = 42424; + await clientA.ConnectToServer(ipAddress, port); + await clientB.ConnectToServer(ipAddress, port); + await clientA.Send("hello from client A"); + Thread.Sleep(100); + } + + [TestMethod, Timeout(16000)] + public async Task Model() + { + var serverNode = new Geometry("a"); + + var aPartition = SameIdCloner.Clone(serverNode); + var aClient = await ConnectWebSocket(aPartition, "A"); + + var bPartition = SameIdCloner.Clone(serverNode); + var bClient = await ConnectWebSocket(bPartition, "B"); + + Debug.WriteLine($"{nameof(aPartition)}: Partition {aPartition.PrintIdentity()}"); + Debug.WriteLine($"{nameof(bPartition)}: Partition {bPartition.PrintIdentity()}"); + + bPartition.Documentation = new Documentation("documentation"); + Debug.WriteLine($"clientB Documentation {bPartition.Documentation.PrintIdentity()}"); + + aClient.WaitForReplies(1); + + Debug.WriteLine($"clientA Documentation {aPartition.Documentation.PrintIdentity()}"); + aPartition.Documentation.Text = "hello there"; + + bClient.WaitForReplies(2); + + Debug.WriteLine($"clientA Documentation {aPartition.Documentation.PrintIdentity()}"); + Debug.WriteLine($"clientB Documentation {bPartition.Documentation.PrintIdentity()}"); + + bPartition.Documentation.Text = "bye there"; + aClient.WaitForReplies(2); + + AssertEquals(aPartition, bPartition); + } +} \ No newline at end of file diff --git a/src/cs/LionWeb.Integration.WebSocket.Tests/WebSocketServerTestBase.cs b/src/cs/LionWeb.Integration.WebSocket.Tests/WebSocketServerTestBase.cs new file mode 100644 index 0000000..cc2d4a8 --- /dev/null +++ b/src/cs/LionWeb.Integration.WebSocket.Tests/WebSocketServerTestBase.cs @@ -0,0 +1,103 @@ +// Copyright 2025 LionWeb Project +// +// Licensed 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. +// +// SPDX-FileCopyrightText: 2025 LionWeb Project +// SPDX-License-Identifier: Apache-2.0 + +using System.Diagnostics; +using LionWeb.Core; +using LionWeb.Core.M3; +using LionWeb.Integration.WebSocket.Client; +using LionWeb.Integration.WebSocket.Server; + +namespace LionWeb.Integration.WebSocket.Tests; + +[TestClass] +public abstract class WebSocketServerTestBase : WebSocketTestBase, IDisposable +{ + private readonly List _processes = []; + + protected WebSocketServer _webSocketServer; + + protected WebSocketServerTestBase(LionWebVersions? lionWebVersion = null, List? languages = null) : base(lionWebVersion, languages) + { + Debug.WriteLine(Directory.GetCurrentDirectory()); + } + + protected void StartClient(string name, params string[] tasks) + { + var process = new Process(); + process.StartInfo.FileName = "dotnet"; + process.StartInfo.WorkingDirectory = + $"{Directory.GetCurrentDirectory()}/../../../../LionWeb.Integration.WebSocket.Client"; + process.StartInfo.Arguments = $""" + run + -v q + --property WarningLevel=0 + --property NoWarn=NU1507 + -- + {name} + {IpAddress} + {Port} + {string.Join(",", tasks)} + """.ReplaceLineEndings(" "); + process.StartInfo.UseShellExecute = false; + process.StartInfo.RedirectStandardError = true; + process.StartInfo.RedirectStandardInput = true; + process.StartInfo.RedirectStandardOutput = true; + + var clientStarted = false; + + process.OutputDataReceived += (sender, args) => + { + if (args.Data?.Contains(WebSocketClient.ClientStartedMessage) ?? false) + clientStarted = true; + Console.WriteLine(args.Data); + }; + process.ErrorDataReceived += (sender, args) => Console.Error.WriteLine(args.Data); + + Assert.IsTrue(process.Start()); + process.BeginErrorReadLine(); + process.BeginOutputReadLine(); + + while (!clientStarted) + { + Thread.Sleep(100); + } + + Assert.IsFalse(process.HasExited); + + _processes.Add(process); + } + + /// + [TestCleanup] + [ClassCleanup] + public void Dispose() + { + foreach (var process in _processes) + { + if (process.HasExited) + continue; + + TestContext.WriteLine($"Killing WebSocket Client {process.ProcessName}"); + process.Kill(); + } + + if (_webSocketServer != null) + { + _webSocketServer.Stop(); + } + } +} \ No newline at end of file diff --git a/src/cs/LionWeb.Integration.WebSocket.Tests/WebSocketServerTests.cs b/src/cs/LionWeb.Integration.WebSocket.Tests/WebSocketServerTests.cs new file mode 100644 index 0000000..1a53152 --- /dev/null +++ b/src/cs/LionWeb.Integration.WebSocket.Tests/WebSocketServerTests.cs @@ -0,0 +1,91 @@ +// Copyright 2025 LionWeb Project +// +// Licensed 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. +// +// SPDX-FileCopyrightText: 2025 LionWeb Project +// SPDX-License-Identifier: Apache-2.0 + +using System.Diagnostics; +using LionWeb.Core.M1.Event; +using LionWeb.Integration.Languages.Generated.V2023_1.Shapes.M2; +using LionWeb.Integration.WebSocket.Server; +using LionWeb.Protocol.Delta.Repository; + +namespace LionWeb.Integration.WebSocket.Tests; + +[TestClass] +public class WebSocketServerTests : WebSocketServerTestBase +{ + [TestMethod] + public void SignIn_1() => Timeout(() => + { + _webSocketServer = new WebSocketServer(_lionWebVersion) { Languages = _languages }; + _webSocketServer.StartServer(IpAddress, Port); + + var serverPartition = new Geometry("a"); + Debug.WriteLine($"Server partition: {serverPartition.PrintIdentity()}"); + + var lionWebServer = + new LionWebTestRepository(_lionWebVersion, _languages, "server", serverPartition, _webSocketServer); + + StartClient("A", "SignOn"); + + lionWebServer.WaitForReceived(1); + }); + + [TestMethod] + public void SignIn_2() => Timeout(() => + { + _webSocketServer = new WebSocketServer(_lionWebVersion) { Languages = _languages }; + _webSocketServer.StartServer(IpAddress, Port); + + var serverPartition = new Geometry("a"); + Debug.WriteLine($"Server partition: {serverPartition.PrintIdentity()}"); + + var lionWebServer = + new LionWebTestRepository(_lionWebVersion, _languages, "server", serverPartition, _webSocketServer); + + StartClient("A", "SignOn"); + StartClient("B", "SignOn"); + + lionWebServer.WaitForReceived(2); + }); + + [TestMethod] + public void Model() => Timeout(() => + { + _webSocketServer = new WebSocketServer(_lionWebVersion) { Languages = _languages }; + _webSocketServer.StartServer(IpAddress, Port); + + var serverPartition = new Geometry("a"); + // var serverPartition = new DynamicPartitionInstance("a", ShapesLanguage.Instance.Geometry); + // var serverPartition = new LenientPartition("a", webSocketServer.LionWebVersion.BuiltIns.Node); + Debug.WriteLine($"Server partition: {serverPartition.PrintIdentity()}"); + + var lionWebServer = + new LionWebTestRepository(_lionWebVersion, _languages, "server", serverPartition, _webSocketServer); + + StartClient("A", "SignOn,Wait,SetDocsText"); + StartClient("B", "SignOn,AddDocs"); + + lionWebServer.WaitForReceived(4); + + AssertEquals(new Geometry("g") + { + Documentation = new Documentation("d") + { + Text = "hello there" + } + }, serverPartition); + }); +} \ No newline at end of file diff --git a/src/cs/LionWeb.Integration.WebSocket.Tests/WebSocketTestBase.cs b/src/cs/LionWeb.Integration.WebSocket.Tests/WebSocketTestBase.cs new file mode 100644 index 0000000..79d581c --- /dev/null +++ b/src/cs/LionWeb.Integration.WebSocket.Tests/WebSocketTestBase.cs @@ -0,0 +1,92 @@ +// Copyright 2024 TRUMPF Laser GmbH +// +// Licensed 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. +// +// SPDX-FileCopyrightText: 2024 TRUMPF Laser GmbH +// SPDX-License-Identifier: Apache-2.0 + +using System.Diagnostics; +using LionWeb.Core; +using LionWeb.Core.M3; +using LionWeb.Core.Utilities; +using LionWeb.Integration.Languages.Generated.V2023_1.Shapes.M2; + +namespace LionWeb.Integration.WebSocket.Tests; + +public abstract class WebSocketTestBase +{ + private const int TestTimeout = 6000; + protected const string IpAddress = "localhost"; + protected const int Port = 42424; + + protected readonly LionWebVersions _lionWebVersion; + + protected readonly List _languages; + + protected WebSocketTestBase(LionWebVersions? lionWebVersion = null, List? languages = null) + { + _lionWebVersion = lionWebVersion ?? LionWebVersions.v2023_1; + _languages = languages ?? [ShapesLanguage.Instance]; + _languages.AddRange([_lionWebVersion.BuiltIns, _lionWebVersion.LionCore]); + } + + public TestContext TestContext { get; set; } + + /// We cannot use , as it doesn't execute . + protected void Timeout(Action action, int timeout = TestTimeout) + { + try + { + Exception? innerException = null; + var executionTask = Task.Run(() => + { + try + { + action(); + } + catch (Exception ex) + { + innerException = ex; + throw; + } + }); + + // False means execution timed out. + if (!executionTask.Wait(timeout) && !Debugger.IsAttached) + { + Assert.Fail("Method exceeded timeout"); + } + + if (innerException != null) + { + throw innerException; + } + } + catch (AggregateException ex) when (ex.InnerExceptions.Count == 1) + { + var innerException = ex.InnerExceptions[0]; + throw new ArgumentException(innerException.Message, innerException); + } + + } + + protected void AssertEquals(INode? a, INode? b) => + AssertEquals([a], [b]); + + protected void AssertEquals(IEnumerable a, IEnumerable b) + { + List differences = new Comparer(a.ToList(), b.ToList()).Compare().ToList(); + Assert.IsTrue(differences.Count == 0, + differences.DescribeAll(new() { LeftDescription = "a", RightDescription = "b" })); + } +} \ No newline at end of file diff --git a/src/languages/shapes.2023.1.json b/src/languages/shapes.2023.1.json new file mode 100644 index 0000000..0e7964c --- /dev/null +++ b/src/languages/shapes.2023.1.json @@ -0,0 +1 @@ +{"serializationFormatVersion":"2023.1","nodes":[{"id":"id-Shapes","classifier":{"language":"LionCore-M3","version":"2023.1","key":"Language"},"properties":[{"property":{"language":"LionCore-builtins","version":"2023.1","key":"LionCore-builtins-INamed-name"},"value":"Shapes"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"IKeyed-key"},"value":"key-Shapes"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"Language-version"},"value":"1"}],"containments":[{"containment":{"language":"LionCore-M3","version":"2023.1","key":"Language-entities"},"children":["id-Circle","id-Coord","id-Geometry","id-IShape","id-Line","id-OffsetDuplicate","id-Shape","id-CompositeShape","id-ReferenceGeometry","id-Documentation","id-BillOfMaterials","id-MaterialGroup","id-MatterState","id-Time"]},{"containment":{"language":"LionCore-M3","version":"2023.1","key":"Language-dependsOn"},"children":[]}],"references":[{"reference":{"language":"LionCore-M3","version":"2023.1","key":"Language-dependsOn"},"targets":[]}],"annotations":[],"parent":null},{"id":"id-Circle","classifier":{"language":"LionCore-M3","version":"2023.1","key":"Concept"},"properties":[{"property":{"language":"LionCore-builtins","version":"2023.1","key":"LionCore-builtins-INamed-name"},"value":"Circle"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"IKeyed-key"},"value":"key-Circle"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"Concept-abstract"},"value":"false"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"Concept-partition"},"value":"false"}],"containments":[{"containment":{"language":"LionCore-M3","version":"2023.1","key":"Classifier-features"},"children":["id-r","id-center"]},{"containment":{"language":"LionCore-M3","version":"2023.1","key":"Concept-implements"},"children":[]}],"references":[{"reference":{"language":"LionCore-M3","version":"2023.1","key":"Concept-extends"},"targets":[{"resolveInfo":"Shape","reference":"id-Shape"}]},{"reference":{"language":"LionCore-M3","version":"2023.1","key":"Concept-implements"},"targets":[]}],"annotations":[],"parent":"id-Shapes"},{"id":"id-r","classifier":{"language":"LionCore-M3","version":"2023.1","key":"Property"},"properties":[{"property":{"language":"LionCore-builtins","version":"2023.1","key":"LionCore-builtins-INamed-name"},"value":"r"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"IKeyed-key"},"value":"key-r"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"Feature-optional"},"value":"false"}],"containments":[],"references":[{"reference":{"language":"LionCore-M3","version":"2023.1","key":"Property-type"},"targets":[{"resolveInfo":"LionWeb.LionCore_builtins.Integer","reference":null}]}],"annotations":[],"parent":"id-Circle"},{"id":"id-center","classifier":{"language":"LionCore-M3","version":"2023.1","key":"Containment"},"properties":[{"property":{"language":"LionCore-builtins","version":"2023.1","key":"LionCore-builtins-INamed-name"},"value":"center"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"IKeyed-key"},"value":"key-center"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"Feature-optional"},"value":"false"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"Link-multiple"},"value":"false"}],"containments":[],"references":[{"reference":{"language":"LionCore-M3","version":"2023.1","key":"Link-type"},"targets":[{"resolveInfo":"Coord","reference":"id-Coord"}]}],"annotations":[],"parent":"id-Circle"},{"id":"id-Coord","classifier":{"language":"LionCore-M3","version":"2023.1","key":"Concept"},"properties":[{"property":{"language":"LionCore-builtins","version":"2023.1","key":"LionCore-builtins-INamed-name"},"value":"Coord"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"IKeyed-key"},"value":"key-Coord"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"Concept-abstract"},"value":"false"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"Concept-partition"},"value":"false"}],"containments":[{"containment":{"language":"LionCore-M3","version":"2023.1","key":"Classifier-features"},"children":["id-x","id-y","id-z"]},{"containment":{"language":"LionCore-M3","version":"2023.1","key":"Concept-implements"},"children":[]}],"references":[{"reference":{"language":"LionCore-M3","version":"2023.1","key":"Concept-extends"},"targets":[]},{"reference":{"language":"LionCore-M3","version":"2023.1","key":"Concept-implements"},"targets":[]}],"annotations":[],"parent":"id-Shapes"},{"id":"id-x","classifier":{"language":"LionCore-M3","version":"2023.1","key":"Property"},"properties":[{"property":{"language":"LionCore-builtins","version":"2023.1","key":"LionCore-builtins-INamed-name"},"value":"x"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"IKeyed-key"},"value":"key-x"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"Feature-optional"},"value":"false"}],"containments":[],"references":[{"reference":{"language":"LionCore-M3","version":"2023.1","key":"Property-type"},"targets":[{"resolveInfo":"LionWeb.LionCore_builtins.Integer","reference":null}]}],"annotations":[],"parent":"id-Coord"},{"id":"id-y","classifier":{"language":"LionCore-M3","version":"2023.1","key":"Property"},"properties":[{"property":{"language":"LionCore-builtins","version":"2023.1","key":"LionCore-builtins-INamed-name"},"value":"y"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"IKeyed-key"},"value":"key-y"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"Feature-optional"},"value":"false"}],"containments":[],"references":[{"reference":{"language":"LionCore-M3","version":"2023.1","key":"Property-type"},"targets":[{"resolveInfo":"LionWeb.LionCore_builtins.Integer","reference":null}]}],"annotations":[],"parent":"id-Coord"},{"id":"id-z","classifier":{"language":"LionCore-M3","version":"2023.1","key":"Property"},"properties":[{"property":{"language":"LionCore-builtins","version":"2023.1","key":"LionCore-builtins-INamed-name"},"value":"z"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"IKeyed-key"},"value":"key-z"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"Feature-optional"},"value":"false"}],"containments":[],"references":[{"reference":{"language":"LionCore-M3","version":"2023.1","key":"Property-type"},"targets":[{"resolveInfo":"LionWeb.LionCore_builtins.Integer","reference":null}]}],"annotations":[],"parent":"id-Coord"},{"id":"id-Geometry","classifier":{"language":"LionCore-M3","version":"2023.1","key":"Concept"},"properties":[{"property":{"language":"LionCore-builtins","version":"2023.1","key":"LionCore-builtins-INamed-name"},"value":"Geometry"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"IKeyed-key"},"value":"key-Geometry"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"Concept-abstract"},"value":"false"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"Concept-partition"},"value":"true"}],"containments":[{"containment":{"language":"LionCore-M3","version":"2023.1","key":"Classifier-features"},"children":["id-shapes","id-documentation"]},{"containment":{"language":"LionCore-M3","version":"2023.1","key":"Concept-implements"},"children":[]}],"references":[{"reference":{"language":"LionCore-M3","version":"2023.1","key":"Concept-extends"},"targets":[]},{"reference":{"language":"LionCore-M3","version":"2023.1","key":"Concept-implements"},"targets":[]}],"annotations":[],"parent":"id-Shapes"},{"id":"id-shapes","classifier":{"language":"LionCore-M3","version":"2023.1","key":"Containment"},"properties":[{"property":{"language":"LionCore-builtins","version":"2023.1","key":"LionCore-builtins-INamed-name"},"value":"shapes"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"IKeyed-key"},"value":"key-shapes"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"Feature-optional"},"value":"true"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"Link-multiple"},"value":"true"}],"containments":[],"references":[{"reference":{"language":"LionCore-M3","version":"2023.1","key":"Link-type"},"targets":[{"resolveInfo":"IShape","reference":"id-IShape"}]}],"annotations":[],"parent":"id-Geometry"},{"id":"id-documentation","classifier":{"language":"LionCore-M3","version":"2023.1","key":"Containment"},"properties":[{"property":{"language":"LionCore-builtins","version":"2023.1","key":"LionCore-builtins-INamed-name"},"value":"documentation"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"IKeyed-key"},"value":"key-documentation"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"Feature-optional"},"value":"true"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"Link-multiple"},"value":"false"}],"containments":[],"references":[{"reference":{"language":"LionCore-M3","version":"2023.1","key":"Link-type"},"targets":[{"resolveInfo":"Documentation","reference":"id-Documentation"}]}],"annotations":[],"parent":"id-Geometry"},{"id":"id-IShape","classifier":{"language":"LionCore-M3","version":"2023.1","key":"Interface"},"properties":[{"property":{"language":"LionCore-builtins","version":"2023.1","key":"LionCore-builtins-INamed-name"},"value":"IShape"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"IKeyed-key"},"value":"key-IShape"}],"containments":[{"containment":{"language":"LionCore-M3","version":"2023.1","key":"Classifier-features"},"children":["id-uuid","id-fixpoints"]},{"containment":{"language":"LionCore-M3","version":"2023.1","key":"Interface-extends"},"children":[]}],"references":[{"reference":{"language":"LionCore-M3","version":"2023.1","key":"Interface-extends"},"targets":[]}],"annotations":[],"parent":"id-Shapes"},{"id":"id-uuid","classifier":{"language":"LionCore-M3","version":"2023.1","key":"Property"},"properties":[{"property":{"language":"LionCore-builtins","version":"2023.1","key":"LionCore-builtins-INamed-name"},"value":"uuid"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"IKeyed-key"},"value":"key-uuid"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"Feature-optional"},"value":"false"}],"containments":[],"references":[{"reference":{"language":"LionCore-M3","version":"2023.1","key":"Property-type"},"targets":[{"resolveInfo":"LionWeb.LionCore_builtins.String","reference":null}]}],"annotations":[],"parent":"id-IShape"},{"id":"id-fixpoints","classifier":{"language":"LionCore-M3","version":"2023.1","key":"Containment"},"properties":[{"property":{"language":"LionCore-builtins","version":"2023.1","key":"LionCore-builtins-INamed-name"},"value":"fixpoints"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"IKeyed-key"},"value":"key-fixpoints"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"Feature-optional"},"value":"true"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"Link-multiple"},"value":"true"}],"containments":[],"references":[{"reference":{"language":"LionCore-M3","version":"2023.1","key":"Link-type"},"targets":[{"resolveInfo":"Coord","reference":"id-Coord"}]}],"annotations":[],"parent":"id-IShape"},{"id":"id-Line","classifier":{"language":"LionCore-M3","version":"2023.1","key":"Concept"},"properties":[{"property":{"language":"LionCore-builtins","version":"2023.1","key":"LionCore-builtins-INamed-name"},"value":"Line"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"IKeyed-key"},"value":"key-Line"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"Concept-abstract"},"value":"false"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"Concept-partition"},"value":"false"}],"containments":[{"containment":{"language":"LionCore-M3","version":"2023.1","key":"Classifier-features"},"children":["id-start","id-end"]}],"references":[{"reference":{"language":"LionCore-M3","version":"2023.1","key":"Concept-extends"},"targets":[{"resolveInfo":"Shape","reference":"id-Shape"}]},{"reference":{"language":"LionCore-M3","version":"2023.1","key":"Concept-implements"},"targets":[{"resolveInfo":"LionWeb.LionCore_builtins.INamed","reference":null}]}],"annotations":[],"parent":"id-Shapes"},{"id":"id-start","classifier":{"language":"LionCore-M3","version":"2023.1","key":"Containment"},"properties":[{"property":{"language":"LionCore-builtins","version":"2023.1","key":"LionCore-builtins-INamed-name"},"value":"start"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"IKeyed-key"},"value":"key-start"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"Feature-optional"},"value":"false"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"Link-multiple"},"value":"false"}],"containments":[],"references":[{"reference":{"language":"LionCore-M3","version":"2023.1","key":"Link-type"},"targets":[{"resolveInfo":"Coord","reference":"id-Coord"}]}],"annotations":[],"parent":"id-Line"},{"id":"id-end","classifier":{"language":"LionCore-M3","version":"2023.1","key":"Containment"},"properties":[{"property":{"language":"LionCore-builtins","version":"2023.1","key":"LionCore-builtins-INamed-name"},"value":"end"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"IKeyed-key"},"value":"key-end"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"Feature-optional"},"value":"false"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"Link-multiple"},"value":"false"}],"containments":[],"references":[{"reference":{"language":"LionCore-M3","version":"2023.1","key":"Link-type"},"targets":[{"resolveInfo":"Coord","reference":"id-Coord"}]}],"annotations":[],"parent":"id-Line"},{"id":"id-OffsetDuplicate","classifier":{"language":"LionCore-M3","version":"2023.1","key":"Concept"},"properties":[{"property":{"language":"LionCore-builtins","version":"2023.1","key":"LionCore-builtins-INamed-name"},"value":"OffsetDuplicate"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"IKeyed-key"},"value":"key-OffsetDuplicate"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"Concept-abstract"},"value":"false"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"Concept-partition"},"value":"false"}],"containments":[{"containment":{"language":"LionCore-M3","version":"2023.1","key":"Classifier-features"},"children":["id-offset","id-source","id-alt-source","id-docs","id-secret-docs"]},{"containment":{"language":"LionCore-M3","version":"2023.1","key":"Concept-implements"},"children":[]}],"references":[{"reference":{"language":"LionCore-M3","version":"2023.1","key":"Concept-extends"},"targets":[{"resolveInfo":"Shape","reference":"id-Shape"}]},{"reference":{"language":"LionCore-M3","version":"2023.1","key":"Concept-implements"},"targets":[]}],"annotations":[],"parent":"id-Shapes"},{"id":"id-offset","classifier":{"language":"LionCore-M3","version":"2023.1","key":"Containment"},"properties":[{"property":{"language":"LionCore-builtins","version":"2023.1","key":"LionCore-builtins-INamed-name"},"value":"offset"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"IKeyed-key"},"value":"key-offset"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"Feature-optional"},"value":"false"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"Link-multiple"},"value":"false"}],"containments":[],"references":[{"reference":{"language":"LionCore-M3","version":"2023.1","key":"Link-type"},"targets":[{"resolveInfo":"Coord","reference":"id-Coord"}]}],"annotations":[],"parent":"id-OffsetDuplicate"},{"id":"id-source","classifier":{"language":"LionCore-M3","version":"2023.1","key":"Reference"},"properties":[{"property":{"language":"LionCore-builtins","version":"2023.1","key":"LionCore-builtins-INamed-name"},"value":"source"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"IKeyed-key"},"value":"key-source"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"Feature-optional"},"value":"false"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"Link-multiple"},"value":"false"}],"containments":[],"references":[{"reference":{"language":"LionCore-M3","version":"2023.1","key":"Link-type"},"targets":[{"resolveInfo":"Shape","reference":"id-Shape"}]}],"annotations":[],"parent":"id-OffsetDuplicate"},{"id":"id-alt-source","classifier":{"language":"LionCore-M3","version":"2023.1","key":"Reference"},"properties":[{"property":{"language":"LionCore-builtins","version":"2023.1","key":"LionCore-builtins-INamed-name"},"value":"altSource"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"IKeyed-key"},"value":"key-alt-source"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"Feature-optional"},"value":"true"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"Link-multiple"},"value":"false"}],"containments":[],"references":[{"reference":{"language":"LionCore-M3","version":"2023.1","key":"Link-type"},"targets":[{"resolveInfo":"Shape","reference":"id-Shape"}]}],"annotations":[],"parent":"id-OffsetDuplicate"},{"id":"id-docs","classifier":{"language":"LionCore-M3","version":"2023.1","key":"Containment"},"properties":[{"property":{"language":"LionCore-builtins","version":"2023.1","key":"LionCore-builtins-INamed-name"},"value":"docs"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"IKeyed-key"},"value":"key-docs"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"Feature-optional"},"value":"true"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"Link-multiple"},"value":"false"}],"containments":[],"references":[{"reference":{"language":"LionCore-M3","version":"2023.1","key":"Link-type"},"targets":[{"resolveInfo":"Documentation","reference":"id-Documentation"}]}],"annotations":[],"parent":"id-OffsetDuplicate"},{"id":"id-secret-docs","classifier":{"language":"LionCore-M3","version":"2023.1","key":"Containment"},"properties":[{"property":{"language":"LionCore-builtins","version":"2023.1","key":"LionCore-builtins-INamed-name"},"value":"secretDocs"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"IKeyed-key"},"value":"key-secret-docs"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"Feature-optional"},"value":"true"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"Link-multiple"},"value":"false"}],"containments":[],"references":[{"reference":{"language":"LionCore-M3","version":"2023.1","key":"Link-type"},"targets":[{"resolveInfo":"Documentation","reference":"id-Documentation"}]}],"annotations":[],"parent":"id-OffsetDuplicate"},{"id":"id-Shape","classifier":{"language":"LionCore-M3","version":"2023.1","key":"Concept"},"properties":[{"property":{"language":"LionCore-builtins","version":"2023.1","key":"LionCore-builtins-INamed-name"},"value":"Shape"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"IKeyed-key"},"value":"key-Shape"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"Concept-abstract"},"value":"true"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"Concept-partition"},"value":"false"}],"containments":[{"containment":{"language":"LionCore-M3","version":"2023.1","key":"Classifier-features"},"children":["id-shape-docs"]}],"references":[{"reference":{"language":"LionCore-M3","version":"2023.1","key":"Concept-extends"},"targets":[]},{"reference":{"language":"LionCore-M3","version":"2023.1","key":"Concept-implements"},"targets":[{"resolveInfo":"LionWeb.LionCore_builtins.INamed","reference":null},{"resolveInfo":"IShape","reference":"id-IShape"}]}],"annotations":[],"parent":"id-Shapes"},{"id":"id-shape-docs","classifier":{"language":"LionCore-M3","version":"2023.1","key":"Containment"},"properties":[{"property":{"language":"LionCore-builtins","version":"2023.1","key":"LionCore-builtins-INamed-name"},"value":"shapeDocs"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"IKeyed-key"},"value":"key-shape-docs"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"Feature-optional"},"value":"true"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"Link-multiple"},"value":"false"}],"containments":[],"references":[{"reference":{"language":"LionCore-M3","version":"2023.1","key":"Link-type"},"targets":[{"resolveInfo":"Documentation","reference":"id-Documentation"}]}],"annotations":[],"parent":"id-Shape"},{"id":"id-CompositeShape","classifier":{"language":"LionCore-M3","version":"2023.1","key":"Concept"},"properties":[{"property":{"language":"LionCore-builtins","version":"2023.1","key":"LionCore-builtins-INamed-name"},"value":"CompositeShape"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"IKeyed-key"},"value":"key-CompositeShape"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"Concept-abstract"},"value":"false"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"Concept-partition"},"value":"false"}],"containments":[{"containment":{"language":"LionCore-M3","version":"2023.1","key":"Classifier-features"},"children":["id-parts","id-disabled-parts","id-evil-part"]},{"containment":{"language":"LionCore-M3","version":"2023.1","key":"Concept-implements"},"children":[]}],"references":[{"reference":{"language":"LionCore-M3","version":"2023.1","key":"Concept-extends"},"targets":[{"resolveInfo":"Shape","reference":"id-Shape"}]},{"reference":{"language":"LionCore-M3","version":"2023.1","key":"Concept-implements"},"targets":[]}],"annotations":[],"parent":"id-Shapes"},{"id":"id-parts","classifier":{"language":"LionCore-M3","version":"2023.1","key":"Containment"},"properties":[{"property":{"language":"LionCore-builtins","version":"2023.1","key":"LionCore-builtins-INamed-name"},"value":"parts"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"IKeyed-key"},"value":"key-parts"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"Feature-optional"},"value":"false"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"Link-multiple"},"value":"true"}],"containments":[],"references":[{"reference":{"language":"LionCore-M3","version":"2023.1","key":"Link-type"},"targets":[{"resolveInfo":"IShape","reference":"id-IShape"}]}],"annotations":[],"parent":"id-CompositeShape"},{"id":"id-disabled-parts","classifier":{"language":"LionCore-M3","version":"2023.1","key":"Containment"},"properties":[{"property":{"language":"LionCore-builtins","version":"2023.1","key":"LionCore-builtins-INamed-name"},"value":"disabledParts"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"IKeyed-key"},"value":"key-disabled-parts"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"Feature-optional"},"value":"false"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"Link-multiple"},"value":"true"}],"containments":[],"references":[{"reference":{"language":"LionCore-M3","version":"2023.1","key":"Link-type"},"targets":[{"resolveInfo":"IShape","reference":"id-IShape"}]}],"annotations":[],"parent":"id-CompositeShape"},{"id":"id-evil-part","classifier":{"language":"LionCore-M3","version":"2023.1","key":"Containment"},"properties":[{"property":{"language":"LionCore-builtins","version":"2023.1","key":"LionCore-builtins-INamed-name"},"value":"evilPart"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"IKeyed-key"},"value":"key-evil-part"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"Feature-optional"},"value":"false"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"Link-multiple"},"value":"false"}],"containments":[],"references":[{"reference":{"language":"LionCore-M3","version":"2023.1","key":"Link-type"},"targets":[{"resolveInfo":"IShape","reference":"id-IShape"}]}],"annotations":[],"parent":"id-CompositeShape"},{"id":"id-ReferenceGeometry","classifier":{"language":"LionCore-M3","version":"2023.1","key":"Concept"},"properties":[{"property":{"language":"LionCore-builtins","version":"2023.1","key":"LionCore-builtins-INamed-name"},"value":"ReferenceGeometry"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"IKeyed-key"},"value":"key-ReferenceGeometry"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"Concept-abstract"},"value":"false"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"Concept-partition"},"value":"true"}],"containments":[{"containment":{"language":"LionCore-M3","version":"2023.1","key":"Classifier-features"},"children":["id-shape-references"]},{"containment":{"language":"LionCore-M3","version":"2023.1","key":"Concept-implements"},"children":[]}],"references":[{"reference":{"language":"LionCore-M3","version":"2023.1","key":"Concept-extends"},"targets":[]},{"reference":{"language":"LionCore-M3","version":"2023.1","key":"Concept-implements"},"targets":[]}],"annotations":[],"parent":"id-Shapes"},{"id":"id-shape-references","classifier":{"language":"LionCore-M3","version":"2023.1","key":"Reference"},"properties":[{"property":{"language":"LionCore-builtins","version":"2023.1","key":"LionCore-builtins-INamed-name"},"value":"shapes"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"IKeyed-key"},"value":"key-shapes-references"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"Feature-optional"},"value":"true"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"Link-multiple"},"value":"true"}],"containments":[],"references":[{"reference":{"language":"LionCore-M3","version":"2023.1","key":"Link-type"},"targets":[{"resolveInfo":"IShape","reference":"id-IShape"}]}],"annotations":[],"parent":"id-ReferenceGeometry"},{"id":"id-Documentation","classifier":{"language":"LionCore-M3","version":"2023.1","key":"Annotation"},"properties":[{"property":{"language":"LionCore-builtins","version":"2023.1","key":"LionCore-builtins-INamed-name"},"value":"Documentation"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"IKeyed-key"},"value":"key-Documentation"}],"containments":[{"containment":{"language":"LionCore-M3","version":"2023.1","key":"Classifier-features"},"children":["id-text","id-technical"]},{"containment":{"language":"LionCore-M3","version":"2023.1","key":"Annotation-implements"},"children":[]}],"references":[{"reference":{"language":"LionCore-M3","version":"2023.1","key":"Annotation-annotates"},"targets":[{"resolveInfo":"Shape","reference":"id-Shape"}]},{"reference":{"language":"LionCore-M3","version":"2023.1","key":"Annotation-extends"},"targets":[]},{"reference":{"language":"LionCore-M3","version":"2023.1","key":"Annotation-implements"},"targets":[]}],"annotations":[],"parent":"id-Shapes"},{"id":"id-text","classifier":{"language":"LionCore-M3","version":"2023.1","key":"Property"},"properties":[{"property":{"language":"LionCore-builtins","version":"2023.1","key":"LionCore-builtins-INamed-name"},"value":"text"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"IKeyed-key"},"value":"key-text"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"Feature-optional"},"value":"true"}],"containments":[],"references":[{"reference":{"language":"LionCore-M3","version":"2023.1","key":"Property-type"},"targets":[{"resolveInfo":"LionWeb.LionCore_builtins.String","reference":null}]}],"annotations":[],"parent":"id-Documentation"},{"id":"id-technical","classifier":{"language":"LionCore-M3","version":"2023.1","key":"Property"},"properties":[{"property":{"language":"LionCore-builtins","version":"2023.1","key":"LionCore-builtins-INamed-name"},"value":"technical"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"IKeyed-key"},"value":"key-technical"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"Feature-optional"},"value":"true"}],"containments":[],"references":[{"reference":{"language":"LionCore-M3","version":"2023.1","key":"Property-type"},"targets":[{"resolveInfo":"LionWeb.LionCore_builtins.Boolean","reference":null}]}],"annotations":[],"parent":"id-Documentation"},{"id":"id-BillOfMaterials","classifier":{"language":"LionCore-M3","version":"2023.1","key":"Annotation"},"properties":[{"property":{"language":"LionCore-builtins","version":"2023.1","key":"LionCore-builtins-INamed-name"},"value":"BillOfMaterials"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"IKeyed-key"},"value":"key-BillOfMaterials"}],"containments":[{"containment":{"language":"LionCore-M3","version":"2023.1","key":"Classifier-features"},"children":["id-materials","id-groups","id-alt-groups","id-default-group"]},{"containment":{"language":"LionCore-M3","version":"2023.1","key":"Annotation-implements"},"children":[]}],"references":[{"reference":{"language":"LionCore-M3","version":"2023.1","key":"Annotation-annotates"},"targets":[{"resolveInfo":"LionWeb.LionCore_builtins.Node","reference":null}]},{"reference":{"language":"LionCore-M3","version":"2023.1","key":"Annotation-extends"},"targets":[]},{"reference":{"language":"LionCore-M3","version":"2023.1","key":"Annotation-implements"},"targets":[]}],"annotations":[],"parent":"id-Shapes"},{"id":"id-materials","classifier":{"language":"LionCore-M3","version":"2023.1","key":"Reference"},"properties":[{"property":{"language":"LionCore-builtins","version":"2023.1","key":"LionCore-builtins-INamed-name"},"value":"materials"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"IKeyed-key"},"value":"key-materials"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"Feature-optional"},"value":"true"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"Link-multiple"},"value":"true"}],"containments":[],"references":[{"reference":{"language":"LionCore-M3","version":"2023.1","key":"Link-type"},"targets":[{"resolveInfo":"IShape","reference":"id-IShape"}]}],"annotations":[],"parent":"id-BillOfMaterials"},{"id":"id-groups","classifier":{"language":"LionCore-M3","version":"2023.1","key":"Containment"},"properties":[{"property":{"language":"LionCore-builtins","version":"2023.1","key":"LionCore-builtins-INamed-name"},"value":"groups"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"IKeyed-key"},"value":"key-groups"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"Feature-optional"},"value":"true"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"Link-multiple"},"value":"true"}],"containments":[],"references":[{"reference":{"language":"LionCore-M3","version":"2023.1","key":"Link-type"},"targets":[{"resolveInfo":"MaterialGroup","reference":"id-MaterialGroup"}]}],"annotations":[],"parent":"id-BillOfMaterials"},{"id":"id-alt-groups","classifier":{"language":"LionCore-M3","version":"2023.1","key":"Containment"},"properties":[{"property":{"language":"LionCore-builtins","version":"2023.1","key":"LionCore-builtins-INamed-name"},"value":"altGroups"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"IKeyed-key"},"value":"key-alt-groups"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"Feature-optional"},"value":"true"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"Link-multiple"},"value":"true"}],"containments":[],"references":[{"reference":{"language":"LionCore-M3","version":"2023.1","key":"Link-type"},"targets":[{"resolveInfo":"MaterialGroup","reference":"id-MaterialGroup"}]}],"annotations":[],"parent":"id-BillOfMaterials"},{"id":"id-default-group","classifier":{"language":"LionCore-M3","version":"2023.1","key":"Containment"},"properties":[{"property":{"language":"LionCore-builtins","version":"2023.1","key":"LionCore-builtins-INamed-name"},"value":"defaultGroup"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"IKeyed-key"},"value":"key-default-group"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"Feature-optional"},"value":"true"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"Link-multiple"},"value":"false"}],"containments":[],"references":[{"reference":{"language":"LionCore-M3","version":"2023.1","key":"Link-type"},"targets":[{"resolveInfo":"MaterialGroup","reference":"id-MaterialGroup"}]}],"annotations":[],"parent":"id-BillOfMaterials"},{"id":"id-MaterialGroup","classifier":{"language":"LionCore-M3","version":"2023.1","key":"Concept"},"properties":[{"property":{"language":"LionCore-builtins","version":"2023.1","key":"LionCore-builtins-INamed-name"},"value":"MaterialGroup"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"IKeyed-key"},"value":"key-MaterialGroup"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"Concept-abstract"},"value":"false"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"Concept-partition"},"value":"false"}],"containments":[{"containment":{"language":"LionCore-M3","version":"2023.1","key":"Classifier-features"},"children":["id-matter-state","id-group-materials","id-default-shape"]},{"containment":{"language":"LionCore-M3","version":"2023.1","key":"Concept-implements"},"children":[]}],"references":[{"reference":{"language":"LionCore-M3","version":"2023.1","key":"Concept-extends"},"targets":[]},{"reference":{"language":"LionCore-M3","version":"2023.1","key":"Concept-implements"},"targets":[]}],"annotations":[],"parent":"id-Shapes"},{"id":"id-matter-state","classifier":{"language":"LionCore-M3","version":"2023.1","key":"Property"},"properties":[{"property":{"language":"LionCore-builtins","version":"2023.1","key":"LionCore-builtins-INamed-name"},"value":"matterState"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"IKeyed-key"},"value":"key-matter-state"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"Feature-optional"},"value":"true"}],"containments":[],"references":[{"reference":{"language":"LionCore-M3","version":"2023.1","key":"Property-type"},"targets":[{"resolveInfo":"MatterState","reference":"id-MatterState"}]}],"annotations":[],"parent":"id-MaterialGroup"},{"id":"id-group-materials","classifier":{"language":"LionCore-M3","version":"2023.1","key":"Reference"},"properties":[{"property":{"language":"LionCore-builtins","version":"2023.1","key":"LionCore-builtins-INamed-name"},"value":"materials"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"IKeyed-key"},"value":"key-group-materials"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"Feature-optional"},"value":"false"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"Link-multiple"},"value":"true"}],"containments":[],"references":[{"reference":{"language":"LionCore-M3","version":"2023.1","key":"Link-type"},"targets":[{"resolveInfo":"IShape","reference":"id-IShape"}]}],"annotations":[],"parent":"id-MaterialGroup"},{"id":"id-default-shape","classifier":{"language":"LionCore-M3","version":"2023.1","key":"Containment"},"properties":[{"property":{"language":"LionCore-builtins","version":"2023.1","key":"LionCore-builtins-INamed-name"},"value":"defaultShape"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"IKeyed-key"},"value":"key-default-shape"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"Feature-optional"},"value":"true"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"Link-multiple"},"value":"false"}],"containments":[],"references":[{"reference":{"language":"LionCore-M3","version":"2023.1","key":"Link-type"},"targets":[{"resolveInfo":"IShape","reference":"id-IShape"}]}],"annotations":[],"parent":"id-MaterialGroup"},{"id":"id-MatterState","classifier":{"language":"LionCore-M3","version":"2023.1","key":"Enumeration"},"properties":[{"property":{"language":"LionCore-builtins","version":"2023.1","key":"LionCore-builtins-INamed-name"},"value":"MatterState"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"IKeyed-key"},"value":"key-MatterState"}],"containments":[{"containment":{"language":"LionCore-M3","version":"2023.1","key":"Enumeration-literals"},"children":["id-solid","id-liquid","id-gas"]}],"references":[],"annotations":[],"parent":"id-Shapes"},{"id":"id-solid","classifier":{"language":"LionCore-M3","version":"2023.1","key":"EnumerationLiteral"},"properties":[{"property":{"language":"LionCore-builtins","version":"2023.1","key":"LionCore-builtins-INamed-name"},"value":"solid"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"IKeyed-key"},"value":"key-solid"}],"containments":[],"references":[],"annotations":[],"parent":"id-MatterState"},{"id":"id-liquid","classifier":{"language":"LionCore-M3","version":"2023.1","key":"EnumerationLiteral"},"properties":[{"property":{"language":"LionCore-builtins","version":"2023.1","key":"LionCore-builtins-INamed-name"},"value":"liquid"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"IKeyed-key"},"value":"key-liquid"}],"containments":[],"references":[],"annotations":[],"parent":"id-MatterState"},{"id":"id-gas","classifier":{"language":"LionCore-M3","version":"2023.1","key":"EnumerationLiteral"},"properties":[{"property":{"language":"LionCore-builtins","version":"2023.1","key":"LionCore-builtins-INamed-name"},"value":"gas"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"IKeyed-key"},"value":"key-gas"}],"containments":[],"references":[],"annotations":[],"parent":"id-MatterState"},{"id":"id-Time","classifier":{"language":"LionCore-M3","version":"2023.1","key":"PrimitiveType"},"properties":[{"property":{"language":"LionCore-builtins","version":"2023.1","key":"LionCore-builtins-INamed-name"},"value":"Time"},{"property":{"language":"LionCore-M3","version":"2023.1","key":"IKeyed-key"},"value":"key-Time"}],"containments":[],"references":[],"annotations":[],"parent":"id-Shapes"}],"languages":[{"key":"LionCore-M3","version":"2023.1"}]} \ No newline at end of file diff --git a/src/languages/shapes.2024.1.json b/src/languages/shapes.2024.1.json new file mode 100644 index 0000000..275478f --- /dev/null +++ b/src/languages/shapes.2024.1.json @@ -0,0 +1,2979 @@ +{ + "serializationFormatVersion": "2024.1", + "nodes": [ + { + "id": "id-Shapes", + "classifier": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Language" + }, + "properties": [ + { + "property": { + "language": "LionCore-builtins", + "version": "2024.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "Shapes" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "IKeyed-key" + }, + "value": "key-Shapes" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Language-version" + }, + "value": "1" + } + ], + "containments": [ + { + "containment": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Language-entities" + }, + "children": [ + "id-Circle", + "id-Coord", + "id-Geometry", + "id-IShape", + "id-Line", + "id-OffsetDuplicate", + "id-Shape", + "id-CompositeShape", + "id-ReferenceGeometry", + "id-Documentation", + "id-BillOfMaterials", + "id-MaterialGroup", + "id-MatterState", + "id-Time" + ] + }, + { + "containment": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Language-dependsOn" + }, + "children": [] + } + ], + "references": [ + { + "reference": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Language-dependsOn" + }, + "targets": [] + } + ], + "annotations": [], + "parent": null + }, + { + "id": "id-Circle", + "classifier": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Concept" + }, + "properties": [ + { + "property": { + "language": "LionCore-builtins", + "version": "2024.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "Circle" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "IKeyed-key" + }, + "value": "key-Circle" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Concept-abstract" + }, + "value": "false" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Concept-partition" + }, + "value": "false" + } + ], + "containments": [ + { + "containment": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Classifier-features" + }, + "children": [ + "id-r", + "id-center" + ] + }, + { + "containment": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Concept-implements" + }, + "children": [] + } + ], + "references": [ + { + "reference": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Concept-extends" + }, + "targets": [ + { + "resolveInfo": "Shape", + "reference": "id-Shape" + } + ] + }, + { + "reference": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Concept-implements" + }, + "targets": [] + } + ], + "annotations": [], + "parent": "id-Shapes" + }, + { + "id": "id-r", + "classifier": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Property" + }, + "properties": [ + { + "property": { + "language": "LionCore-builtins", + "version": "2024.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "r" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "IKeyed-key" + }, + "value": "key-r" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Feature-optional" + }, + "value": "false" + } + ], + "containments": [], + "references": [ + { + "reference": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Property-type" + }, + "targets": [ + { + "resolveInfo": "LionWeb.LionCore_builtins.Integer", + "reference": null + } + ] + } + ], + "annotations": [], + "parent": "id-Circle" + }, + { + "id": "id-center", + "classifier": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Containment" + }, + "properties": [ + { + "property": { + "language": "LionCore-builtins", + "version": "2024.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "center" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "IKeyed-key" + }, + "value": "key-center" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Feature-optional" + }, + "value": "false" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Link-multiple" + }, + "value": "false" + } + ], + "containments": [], + "references": [ + { + "reference": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Link-type" + }, + "targets": [ + { + "resolveInfo": "Coord", + "reference": "id-Coord" + } + ] + } + ], + "annotations": [], + "parent": "id-Circle" + }, + { + "id": "id-Coord", + "classifier": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Concept" + }, + "properties": [ + { + "property": { + "language": "LionCore-builtins", + "version": "2024.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "Coord" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "IKeyed-key" + }, + "value": "key-Coord" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Concept-abstract" + }, + "value": "false" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Concept-partition" + }, + "value": "false" + } + ], + "containments": [ + { + "containment": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Classifier-features" + }, + "children": [ + "id-x", + "id-y", + "id-z" + ] + }, + { + "containment": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Concept-implements" + }, + "children": [] + } + ], + "references": [ + { + "reference": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Concept-extends" + }, + "targets": [] + }, + { + "reference": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Concept-implements" + }, + "targets": [] + } + ], + "annotations": [], + "parent": "id-Shapes" + }, + { + "id": "id-x", + "classifier": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Property" + }, + "properties": [ + { + "property": { + "language": "LionCore-builtins", + "version": "2024.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "x" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "IKeyed-key" + }, + "value": "key-x" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Feature-optional" + }, + "value": "false" + } + ], + "containments": [], + "references": [ + { + "reference": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Property-type" + }, + "targets": [ + { + "resolveInfo": "LionWeb.LionCore_builtins.Integer", + "reference": null + } + ] + } + ], + "annotations": [], + "parent": "id-Coord" + }, + { + "id": "id-y", + "classifier": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Property" + }, + "properties": [ + { + "property": { + "language": "LionCore-builtins", + "version": "2024.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "y" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "IKeyed-key" + }, + "value": "key-y" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Feature-optional" + }, + "value": "false" + } + ], + "containments": [], + "references": [ + { + "reference": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Property-type" + }, + "targets": [ + { + "resolveInfo": "LionWeb.LionCore_builtins.Integer", + "reference": null + } + ] + } + ], + "annotations": [], + "parent": "id-Coord" + }, + { + "id": "id-z", + "classifier": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Property" + }, + "properties": [ + { + "property": { + "language": "LionCore-builtins", + "version": "2024.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "z" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "IKeyed-key" + }, + "value": "key-z" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Feature-optional" + }, + "value": "false" + } + ], + "containments": [], + "references": [ + { + "reference": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Property-type" + }, + "targets": [ + { + "resolveInfo": "LionWeb.LionCore_builtins.Integer", + "reference": null + } + ] + } + ], + "annotations": [], + "parent": "id-Coord" + }, + { + "id": "id-Geometry", + "classifier": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Concept" + }, + "properties": [ + { + "property": { + "language": "LionCore-builtins", + "version": "2024.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "Geometry" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "IKeyed-key" + }, + "value": "key-Geometry" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Concept-abstract" + }, + "value": "false" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Concept-partition" + }, + "value": "true" + } + ], + "containments": [ + { + "containment": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Classifier-features" + }, + "children": [ + "id-shapes", + "id-documentation" + ] + }, + { + "containment": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Concept-implements" + }, + "children": [] + } + ], + "references": [ + { + "reference": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Concept-extends" + }, + "targets": [] + }, + { + "reference": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Concept-implements" + }, + "targets": [] + } + ], + "annotations": [], + "parent": "id-Shapes" + }, + { + "id": "id-shapes", + "classifier": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Containment" + }, + "properties": [ + { + "property": { + "language": "LionCore-builtins", + "version": "2024.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "shapes" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "IKeyed-key" + }, + "value": "key-shapes" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Feature-optional" + }, + "value": "true" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Link-multiple" + }, + "value": "true" + } + ], + "containments": [], + "references": [ + { + "reference": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Link-type" + }, + "targets": [ + { + "resolveInfo": "IShape", + "reference": "id-IShape" + } + ] + } + ], + "annotations": [], + "parent": "id-Geometry" + }, + { + "id": "id-documentation", + "classifier": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Containment" + }, + "properties": [ + { + "property": { + "language": "LionCore-builtins", + "version": "2024.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "documentation" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "IKeyed-key" + }, + "value": "key-documentation" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Feature-optional" + }, + "value": "true" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Link-multiple" + }, + "value": "false" + } + ], + "containments": [], + "references": [ + { + "reference": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Link-type" + }, + "targets": [ + { + "resolveInfo": "Documentation", + "reference": "id-Documentation" + } + ] + } + ], + "annotations": [], + "parent": "id-Geometry" + }, + { + "id": "id-IShape", + "classifier": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Interface" + }, + "properties": [ + { + "property": { + "language": "LionCore-builtins", + "version": "2024.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "IShape" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "IKeyed-key" + }, + "value": "key-IShape" + } + ], + "containments": [ + { + "containment": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Classifier-features" + }, + "children": [ + "id-uuid", + "id-fixpoints" + ] + }, + { + "containment": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Interface-extends" + }, + "children": [] + } + ], + "references": [ + { + "reference": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Interface-extends" + }, + "targets": [] + } + ], + "annotations": [], + "parent": "id-Shapes" + }, + { + "id": "id-uuid", + "classifier": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Property" + }, + "properties": [ + { + "property": { + "language": "LionCore-builtins", + "version": "2024.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "uuid" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "IKeyed-key" + }, + "value": "key-uuid" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Feature-optional" + }, + "value": "false" + } + ], + "containments": [], + "references": [ + { + "reference": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Property-type" + }, + "targets": [ + { + "resolveInfo": "LionWeb.LionCore_builtins.String", + "reference": null + } + ] + } + ], + "annotations": [], + "parent": "id-IShape" + }, + { + "id": "id-fixpoints", + "classifier": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Containment" + }, + "properties": [ + { + "property": { + "language": "LionCore-builtins", + "version": "2024.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "fixpoints" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "IKeyed-key" + }, + "value": "key-fixpoints" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Feature-optional" + }, + "value": "true" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Link-multiple" + }, + "value": "true" + } + ], + "containments": [], + "references": [ + { + "reference": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Link-type" + }, + "targets": [ + { + "resolveInfo": "Coord", + "reference": "id-Coord" + } + ] + } + ], + "annotations": [], + "parent": "id-IShape" + }, + { + "id": "id-Line", + "classifier": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Concept" + }, + "properties": [ + { + "property": { + "language": "LionCore-builtins", + "version": "2024.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "Line" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "IKeyed-key" + }, + "value": "key-Line" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Concept-abstract" + }, + "value": "false" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Concept-partition" + }, + "value": "false" + } + ], + "containments": [ + { + "containment": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Classifier-features" + }, + "children": [ + "id-start", + "id-end" + ] + } + ], + "references": [ + { + "reference": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Concept-extends" + }, + "targets": [ + { + "resolveInfo": "Shape", + "reference": "id-Shape" + } + ] + }, + { + "reference": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Concept-implements" + }, + "targets": [ + { + "resolveInfo": "LionWeb.LionCore_builtins.INamed", + "reference": null + } + ] + } + ], + "annotations": [], + "parent": "id-Shapes" + }, + { + "id": "id-start", + "classifier": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Containment" + }, + "properties": [ + { + "property": { + "language": "LionCore-builtins", + "version": "2024.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "start" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "IKeyed-key" + }, + "value": "key-start" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Feature-optional" + }, + "value": "false" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Link-multiple" + }, + "value": "false" + } + ], + "containments": [], + "references": [ + { + "reference": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Link-type" + }, + "targets": [ + { + "resolveInfo": "Coord", + "reference": "id-Coord" + } + ] + } + ], + "annotations": [], + "parent": "id-Line" + }, + { + "id": "id-end", + "classifier": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Containment" + }, + "properties": [ + { + "property": { + "language": "LionCore-builtins", + "version": "2024.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "end" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "IKeyed-key" + }, + "value": "key-end" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Feature-optional" + }, + "value": "false" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Link-multiple" + }, + "value": "false" + } + ], + "containments": [], + "references": [ + { + "reference": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Link-type" + }, + "targets": [ + { + "resolveInfo": "Coord", + "reference": "id-Coord" + } + ] + } + ], + "annotations": [], + "parent": "id-Line" + }, + { + "id": "id-OffsetDuplicate", + "classifier": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Concept" + }, + "properties": [ + { + "property": { + "language": "LionCore-builtins", + "version": "2024.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "OffsetDuplicate" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "IKeyed-key" + }, + "value": "key-OffsetDuplicate" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Concept-abstract" + }, + "value": "false" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Concept-partition" + }, + "value": "false" + } + ], + "containments": [ + { + "containment": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Classifier-features" + }, + "children": [ + "id-offset", + "id-source", + "id-alt-source", + "id-docs", + "id-secret-docs" + ] + }, + { + "containment": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Concept-implements" + }, + "children": [] + } + ], + "references": [ + { + "reference": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Concept-extends" + }, + "targets": [ + { + "resolveInfo": "Shape", + "reference": "id-Shape" + } + ] + }, + { + "reference": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Concept-implements" + }, + "targets": [] + } + ], + "annotations": [], + "parent": "id-Shapes" + }, + { + "id": "id-offset", + "classifier": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Containment" + }, + "properties": [ + { + "property": { + "language": "LionCore-builtins", + "version": "2024.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "offset" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "IKeyed-key" + }, + "value": "key-offset" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Feature-optional" + }, + "value": "false" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Link-multiple" + }, + "value": "false" + } + ], + "containments": [], + "references": [ + { + "reference": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Link-type" + }, + "targets": [ + { + "resolveInfo": "Coord", + "reference": "id-Coord" + } + ] + } + ], + "annotations": [], + "parent": "id-OffsetDuplicate" + }, + { + "id": "id-source", + "classifier": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Reference" + }, + "properties": [ + { + "property": { + "language": "LionCore-builtins", + "version": "2024.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "source" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "IKeyed-key" + }, + "value": "key-source" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Feature-optional" + }, + "value": "false" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Link-multiple" + }, + "value": "false" + } + ], + "containments": [], + "references": [ + { + "reference": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Link-type" + }, + "targets": [ + { + "resolveInfo": "Shape", + "reference": "id-Shape" + } + ] + } + ], + "annotations": [], + "parent": "id-OffsetDuplicate" + }, + { + "id": "id-alt-source", + "classifier": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Reference" + }, + "properties": [ + { + "property": { + "language": "LionCore-builtins", + "version": "2024.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "altSource" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "IKeyed-key" + }, + "value": "key-alt-source" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Feature-optional" + }, + "value": "true" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Link-multiple" + }, + "value": "false" + } + ], + "containments": [], + "references": [ + { + "reference": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Link-type" + }, + "targets": [ + { + "resolveInfo": "Shape", + "reference": "id-Shape" + } + ] + } + ], + "annotations": [], + "parent": "id-OffsetDuplicate" + }, + { + "id": "id-docs", + "classifier": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Containment" + }, + "properties": [ + { + "property": { + "language": "LionCore-builtins", + "version": "2024.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "docs" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "IKeyed-key" + }, + "value": "key-docs" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Feature-optional" + }, + "value": "true" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Link-multiple" + }, + "value": "false" + } + ], + "containments": [], + "references": [ + { + "reference": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Link-type" + }, + "targets": [ + { + "resolveInfo": "Documentation", + "reference": "id-Documentation" + } + ] + } + ], + "annotations": [], + "parent": "id-OffsetDuplicate" + }, + { + "id": "id-secret-docs", + "classifier": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Containment" + }, + "properties": [ + { + "property": { + "language": "LionCore-builtins", + "version": "2024.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "secretDocs" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "IKeyed-key" + }, + "value": "key-secret-docs" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Feature-optional" + }, + "value": "true" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Link-multiple" + }, + "value": "false" + } + ], + "containments": [], + "references": [ + { + "reference": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Link-type" + }, + "targets": [ + { + "resolveInfo": "Documentation", + "reference": "id-Documentation" + } + ] + } + ], + "annotations": [], + "parent": "id-OffsetDuplicate" + }, + { + "id": "id-Shape", + "classifier": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Concept" + }, + "properties": [ + { + "property": { + "language": "LionCore-builtins", + "version": "2024.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "Shape" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "IKeyed-key" + }, + "value": "key-Shape" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Concept-abstract" + }, + "value": "true" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Concept-partition" + }, + "value": "false" + } + ], + "containments": [ + { + "containment": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Classifier-features" + }, + "children": [ + "id-shape-docs" + ] + } + ], + "references": [ + { + "reference": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Concept-extends" + }, + "targets": [] + }, + { + "reference": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Concept-implements" + }, + "targets": [ + { + "resolveInfo": "LionWeb.LionCore_builtins.INamed", + "reference": null + }, + { + "resolveInfo": "IShape", + "reference": "id-IShape" + } + ] + } + ], + "annotations": [], + "parent": "id-Shapes" + }, + { + "id": "id-shape-docs", + "classifier": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Containment" + }, + "properties": [ + { + "property": { + "language": "LionCore-builtins", + "version": "2024.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "shapeDocs" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "IKeyed-key" + }, + "value": "key-shape-docs" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Feature-optional" + }, + "value": "true" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Link-multiple" + }, + "value": "false" + } + ], + "containments": [], + "references": [ + { + "reference": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Link-type" + }, + "targets": [ + { + "resolveInfo": "Documentation", + "reference": "id-Documentation" + } + ] + } + ], + "annotations": [], + "parent": "id-Shape" + }, + { + "id": "id-CompositeShape", + "classifier": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Concept" + }, + "properties": [ + { + "property": { + "language": "LionCore-builtins", + "version": "2024.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "CompositeShape" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "IKeyed-key" + }, + "value": "key-CompositeShape" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Concept-abstract" + }, + "value": "false" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Concept-partition" + }, + "value": "false" + } + ], + "containments": [ + { + "containment": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Classifier-features" + }, + "children": [ + "id-parts", + "id-disabled-parts", + "id-evil-part" + ] + }, + { + "containment": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Concept-implements" + }, + "children": [] + } + ], + "references": [ + { + "reference": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Concept-extends" + }, + "targets": [ + { + "resolveInfo": "Shape", + "reference": "id-Shape" + } + ] + }, + { + "reference": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Concept-implements" + }, + "targets": [] + } + ], + "annotations": [], + "parent": "id-Shapes" + }, + { + "id": "id-parts", + "classifier": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Containment" + }, + "properties": [ + { + "property": { + "language": "LionCore-builtins", + "version": "2024.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "parts" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "IKeyed-key" + }, + "value": "key-parts" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Feature-optional" + }, + "value": "false" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Link-multiple" + }, + "value": "true" + } + ], + "containments": [], + "references": [ + { + "reference": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Link-type" + }, + "targets": [ + { + "resolveInfo": "IShape", + "reference": "id-IShape" + } + ] + } + ], + "annotations": [], + "parent": "id-CompositeShape" + }, + { + "id": "id-disabled-parts", + "classifier": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Containment" + }, + "properties": [ + { + "property": { + "language": "LionCore-builtins", + "version": "2024.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "disabledParts" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "IKeyed-key" + }, + "value": "key-disabled-parts" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Feature-optional" + }, + "value": "false" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Link-multiple" + }, + "value": "true" + } + ], + "containments": [], + "references": [ + { + "reference": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Link-type" + }, + "targets": [ + { + "resolveInfo": "IShape", + "reference": "id-IShape" + } + ] + } + ], + "annotations": [], + "parent": "id-CompositeShape" + }, + { + "id": "id-evil-part", + "classifier": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Containment" + }, + "properties": [ + { + "property": { + "language": "LionCore-builtins", + "version": "2024.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "evilPart" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "IKeyed-key" + }, + "value": "key-evil-part" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Feature-optional" + }, + "value": "false" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Link-multiple" + }, + "value": "false" + } + ], + "containments": [], + "references": [ + { + "reference": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Link-type" + }, + "targets": [ + { + "resolveInfo": "IShape", + "reference": "id-IShape" + } + ] + } + ], + "annotations": [], + "parent": "id-CompositeShape" + }, + { + "id": "id-ReferenceGeometry", + "classifier": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Concept" + }, + "properties": [ + { + "property": { + "language": "LionCore-builtins", + "version": "2024.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "ReferenceGeometry" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "IKeyed-key" + }, + "value": "key-ReferenceGeometry" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Concept-abstract" + }, + "value": "false" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Concept-partition" + }, + "value": "true" + } + ], + "containments": [ + { + "containment": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Classifier-features" + }, + "children": [ + "id-shape-references" + ] + }, + { + "containment": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Concept-implements" + }, + "children": [] + } + ], + "references": [ + { + "reference": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Concept-extends" + }, + "targets": [] + }, + { + "reference": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Concept-implements" + }, + "targets": [] + } + ], + "annotations": [], + "parent": "id-Shapes" + }, + { + "id": "id-shape-references", + "classifier": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Reference" + }, + "properties": [ + { + "property": { + "language": "LionCore-builtins", + "version": "2024.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "shapes" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "IKeyed-key" + }, + "value": "key-shapes-references" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Feature-optional" + }, + "value": "true" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Link-multiple" + }, + "value": "true" + } + ], + "containments": [], + "references": [ + { + "reference": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Link-type" + }, + "targets": [ + { + "resolveInfo": "IShape", + "reference": "id-IShape" + } + ] + } + ], + "annotations": [], + "parent": "id-ReferenceGeometry" + }, + { + "id": "id-Documentation", + "classifier": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Annotation" + }, + "properties": [ + { + "property": { + "language": "LionCore-builtins", + "version": "2024.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "Documentation" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "IKeyed-key" + }, + "value": "key-Documentation" + } + ], + "containments": [ + { + "containment": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Classifier-features" + }, + "children": [ + "id-text", + "id-technical" + ] + }, + { + "containment": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Annotation-implements" + }, + "children": [] + } + ], + "references": [ + { + "reference": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Annotation-annotates" + }, + "targets": [ + { + "resolveInfo": "Shape", + "reference": "id-Shape" + } + ] + }, + { + "reference": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Annotation-extends" + }, + "targets": [] + }, + { + "reference": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Annotation-implements" + }, + "targets": [] + } + ], + "annotations": [], + "parent": "id-Shapes" + }, + { + "id": "id-text", + "classifier": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Property" + }, + "properties": [ + { + "property": { + "language": "LionCore-builtins", + "version": "2024.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "text" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "IKeyed-key" + }, + "value": "key-text" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Feature-optional" + }, + "value": "true" + } + ], + "containments": [], + "references": [ + { + "reference": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Property-type" + }, + "targets": [ + { + "resolveInfo": "LionWeb.LionCore_builtins.String", + "reference": null + } + ] + } + ], + "annotations": [], + "parent": "id-Documentation" + }, + { + "id": "id-technical", + "classifier": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Property" + }, + "properties": [ + { + "property": { + "language": "LionCore-builtins", + "version": "2024.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "technical" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "IKeyed-key" + }, + "value": "key-technical" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Feature-optional" + }, + "value": "true" + } + ], + "containments": [], + "references": [ + { + "reference": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Property-type" + }, + "targets": [ + { + "resolveInfo": "LionWeb.LionCore_builtins.Boolean", + "reference": null + } + ] + } + ], + "annotations": [], + "parent": "id-Documentation" + }, + { + "id": "id-BillOfMaterials", + "classifier": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Annotation" + }, + "properties": [ + { + "property": { + "language": "LionCore-builtins", + "version": "2024.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "BillOfMaterials" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "IKeyed-key" + }, + "value": "key-BillOfMaterials" + } + ], + "containments": [ + { + "containment": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Classifier-features" + }, + "children": [ + "id-materials", + "id-groups", + "id-alt-groups", + "id-default-group" + ] + }, + { + "containment": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Annotation-implements" + }, + "children": [] + } + ], + "references": [ + { + "reference": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Annotation-annotates" + }, + "targets": [ + { + "resolveInfo": "LionWeb.LionCore_builtins.Node", + "reference": null + } + ] + }, + { + "reference": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Annotation-extends" + }, + "targets": [] + }, + { + "reference": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Annotation-implements" + }, + "targets": [] + } + ], + "annotations": [], + "parent": "id-Shapes" + }, + { + "id": "id-materials", + "classifier": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Reference" + }, + "properties": [ + { + "property": { + "language": "LionCore-builtins", + "version": "2024.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "materials" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "IKeyed-key" + }, + "value": "key-materials" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Feature-optional" + }, + "value": "true" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Link-multiple" + }, + "value": "true" + } + ], + "containments": [], + "references": [ + { + "reference": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Link-type" + }, + "targets": [ + { + "resolveInfo": "IShape", + "reference": "id-IShape" + } + ] + } + ], + "annotations": [], + "parent": "id-BillOfMaterials" + }, + { + "id": "id-groups", + "classifier": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Containment" + }, + "properties": [ + { + "property": { + "language": "LionCore-builtins", + "version": "2024.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "groups" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "IKeyed-key" + }, + "value": "key-groups" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Feature-optional" + }, + "value": "true" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Link-multiple" + }, + "value": "true" + } + ], + "containments": [], + "references": [ + { + "reference": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Link-type" + }, + "targets": [ + { + "resolveInfo": "MaterialGroup", + "reference": "id-MaterialGroup" + } + ] + } + ], + "annotations": [], + "parent": "id-BillOfMaterials" + }, + { + "id": "id-alt-groups", + "classifier": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Containment" + }, + "properties": [ + { + "property": { + "language": "LionCore-builtins", + "version": "2024.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "altGroups" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "IKeyed-key" + }, + "value": "key-alt-groups" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Feature-optional" + }, + "value": "true" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Link-multiple" + }, + "value": "true" + } + ], + "containments": [], + "references": [ + { + "reference": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Link-type" + }, + "targets": [ + { + "resolveInfo": "MaterialGroup", + "reference": "id-MaterialGroup" + } + ] + } + ], + "annotations": [], + "parent": "id-BillOfMaterials" + }, + { + "id": "id-default-group", + "classifier": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Containment" + }, + "properties": [ + { + "property": { + "language": "LionCore-builtins", + "version": "2024.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "defaultGroup" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "IKeyed-key" + }, + "value": "key-default-group" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Feature-optional" + }, + "value": "true" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Link-multiple" + }, + "value": "false" + } + ], + "containments": [], + "references": [ + { + "reference": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Link-type" + }, + "targets": [ + { + "resolveInfo": "MaterialGroup", + "reference": "id-MaterialGroup" + } + ] + } + ], + "annotations": [], + "parent": "id-BillOfMaterials" + }, + { + "id": "id-MaterialGroup", + "classifier": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Concept" + }, + "properties": [ + { + "property": { + "language": "LionCore-builtins", + "version": "2024.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "MaterialGroup" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "IKeyed-key" + }, + "value": "key-MaterialGroup" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Concept-abstract" + }, + "value": "false" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Concept-partition" + }, + "value": "false" + } + ], + "containments": [ + { + "containment": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Classifier-features" + }, + "children": [ + "id-matter-state", + "id-group-materials", + "id-default-shape" + ] + }, + { + "containment": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Concept-implements" + }, + "children": [] + } + ], + "references": [ + { + "reference": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Concept-extends" + }, + "targets": [] + }, + { + "reference": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Concept-implements" + }, + "targets": [] + } + ], + "annotations": [], + "parent": "id-Shapes" + }, + { + "id": "id-matter-state", + "classifier": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Property" + }, + "properties": [ + { + "property": { + "language": "LionCore-builtins", + "version": "2024.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "matterState" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "IKeyed-key" + }, + "value": "key-matter-state" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Feature-optional" + }, + "value": "true" + } + ], + "containments": [], + "references": [ + { + "reference": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Property-type" + }, + "targets": [ + { + "resolveInfo": "MatterState", + "reference": "id-MatterState" + } + ] + } + ], + "annotations": [], + "parent": "id-MaterialGroup" + }, + { + "id": "id-group-materials", + "classifier": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Reference" + }, + "properties": [ + { + "property": { + "language": "LionCore-builtins", + "version": "2024.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "materials" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "IKeyed-key" + }, + "value": "key-group-materials" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Feature-optional" + }, + "value": "false" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Link-multiple" + }, + "value": "true" + } + ], + "containments": [], + "references": [ + { + "reference": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Link-type" + }, + "targets": [ + { + "resolveInfo": "IShape", + "reference": "id-IShape" + } + ] + } + ], + "annotations": [], + "parent": "id-MaterialGroup" + }, + { + "id": "id-default-shape", + "classifier": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Containment" + }, + "properties": [ + { + "property": { + "language": "LionCore-builtins", + "version": "2024.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "defaultShape" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "IKeyed-key" + }, + "value": "key-default-shape" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Feature-optional" + }, + "value": "true" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Link-multiple" + }, + "value": "false" + } + ], + "containments": [], + "references": [ + { + "reference": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Link-type" + }, + "targets": [ + { + "resolveInfo": "IShape", + "reference": "id-IShape" + } + ] + } + ], + "annotations": [], + "parent": "id-MaterialGroup" + }, + { + "id": "id-MatterState", + "classifier": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Enumeration" + }, + "properties": [ + { + "property": { + "language": "LionCore-builtins", + "version": "2024.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "MatterState" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "IKeyed-key" + }, + "value": "key-MatterState" + } + ], + "containments": [ + { + "containment": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Enumeration-literals" + }, + "children": [ + "id-solid", + "id-liquid", + "id-gas" + ] + } + ], + "references": [], + "annotations": [], + "parent": "id-Shapes" + }, + { + "id": "id-solid", + "classifier": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "EnumerationLiteral" + }, + "properties": [ + { + "property": { + "language": "LionCore-builtins", + "version": "2024.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "solid" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "IKeyed-key" + }, + "value": "key-solid" + } + ], + "containments": [], + "references": [], + "annotations": [], + "parent": "id-MatterState" + }, + { + "id": "id-liquid", + "classifier": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "EnumerationLiteral" + }, + "properties": [ + { + "property": { + "language": "LionCore-builtins", + "version": "2024.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "liquid" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "IKeyed-key" + }, + "value": "key-liquid" + } + ], + "containments": [], + "references": [], + "annotations": [], + "parent": "id-MatterState" + }, + { + "id": "id-gas", + "classifier": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "EnumerationLiteral" + }, + "properties": [ + { + "property": { + "language": "LionCore-builtins", + "version": "2024.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "gas" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "IKeyed-key" + }, + "value": "key-gas" + } + ], + "containments": [], + "references": [], + "annotations": [], + "parent": "id-MatterState" + }, + { + "id": "id-Time", + "classifier": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "PrimitiveType" + }, + "properties": [ + { + "property": { + "language": "LionCore-builtins", + "version": "2024.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "Time" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "IKeyed-key" + }, + "value": "key-Time" + } + ], + "containments": [], + "references": [], + "annotations": [], + "parent": "id-Shapes" + } + ], + "languages": [ + { + "key": "LionCore-M3", + "version": "2024.1" + } + ] +} \ No newline at end of file diff --git a/src/languages/testLanguage.2023.1.json b/src/languages/testLanguage.2023.1.json new file mode 100644 index 0000000..24d98b8 --- /dev/null +++ b/src/languages/testLanguage.2023.1.json @@ -0,0 +1,1475 @@ +{ + "serializationFormatVersion": "2023.1", + "languages": [ + { + "key": "LionCore-M3", + "version": "2023.1" + }, + { + "key": "LionCore-builtins", + "version": "2023.1" + } + ], + "nodes": [ + { + "id": "TestLanguage", + "classifier": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "Language" + }, + "properties": [ + { + "property": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "Language-version" + }, + "value": "0" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "IKeyed-key" + }, + "value": "TestLanguage" + }, + { + "property": { + "language": "LionCore-builtins", + "version": "2023.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "TestLanguage" + } + ], + "containments": [ + { + "containment": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "Language-entities" + }, + "children": [ + "TestEnumeration", + "SecondTestEnumeration", + "DataTypeTestConcept", + "LinkTestConcept", + "TestAnnotation" + ] + } + ], + "references": [ + { + "reference": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "Language-dependsOn" + }, + "targets": [] + } + ], + "annotations": [], + "parent": null + }, + { + "id": "TestEnumeration", + "classifier": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "Enumeration" + }, + "properties": [ + { + "property": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "IKeyed-key" + }, + "value": "TestEnumeration" + }, + { + "property": { + "language": "LionCore-builtins", + "version": "2023.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "TestEnumeration" + } + ], + "containments": [ + { + "containment": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "Enumeration-literals" + }, + "children": [ + "TestEnumeration-literal1", + "TestEnumeration-literal2", + "TestEnumeration-literal3" + ] + } + ], + "references": [], + "annotations": [], + "parent": "TestLanguage" + }, + { + "id": "TestEnumeration-literal1", + "classifier": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "EnumerationLiteral" + }, + "properties": [ + { + "property": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "IKeyed-key" + }, + "value": "TestEnumeration-literal1" + }, + { + "property": { + "language": "LionCore-builtins", + "version": "2023.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "literal1" + } + ], + "containments": [], + "references": [], + "annotations": [], + "parent": "TestEnumeration" + }, + { + "id": "TestEnumeration-literal2", + "classifier": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "EnumerationLiteral" + }, + "properties": [ + { + "property": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "IKeyed-key" + }, + "value": "TestEnumeration-literal2" + }, + { + "property": { + "language": "LionCore-builtins", + "version": "2023.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "literal2" + } + ], + "containments": [], + "references": [], + "annotations": [], + "parent": "TestEnumeration" + }, + { + "id": "TestEnumeration-literal3", + "classifier": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "EnumerationLiteral" + }, + "properties": [ + { + "property": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "IKeyed-key" + }, + "value": "TestEnumeration-literal3" + }, + { + "property": { + "language": "LionCore-builtins", + "version": "2023.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "literal3" + } + ], + "containments": [], + "references": [], + "annotations": [], + "parent": "TestEnumeration" + }, + { + "id": "SecondTestEnumeration", + "classifier": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "Enumeration" + }, + "properties": [ + { + "property": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "IKeyed-key" + }, + "value": "SecondTestEnumeration" + }, + { + "property": { + "language": "LionCore-builtins", + "version": "2023.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "SecondTestEnumeration" + } + ], + "containments": [ + { + "containment": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "Enumeration-literals" + }, + "children": [ + "SecondTestEnumeration-literal1", + "SecondTestEnumeration-literal2", + "SecondTestEnumeration-literal3" + ] + } + ], + "references": [], + "annotations": [], + "parent": "TestLanguage" + }, + { + "id": "SecondTestEnumeration-literal1", + "classifier": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "EnumerationLiteral" + }, + "properties": [ + { + "property": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "IKeyed-key" + }, + "value": "SecondTestEnumeration-literal1" + }, + { + "property": { + "language": "LionCore-builtins", + "version": "2023.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "literal1" + } + ], + "containments": [], + "references": [], + "annotations": [], + "parent": "SecondTestEnumeration" + }, + { + "id": "SecondTestEnumeration-literal2", + "classifier": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "EnumerationLiteral" + }, + "properties": [ + { + "property": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "IKeyed-key" + }, + "value": "SecondTestEnumeration-literal2" + }, + { + "property": { + "language": "LionCore-builtins", + "version": "2023.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "literal2" + } + ], + "containments": [], + "references": [], + "annotations": [], + "parent": "SecondTestEnumeration" + }, + { + "id": "SecondTestEnumeration-literal3", + "classifier": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "EnumerationLiteral" + }, + "properties": [ + { + "property": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "IKeyed-key" + }, + "value": "SecondTestEnumeration-literal3" + }, + { + "property": { + "language": "LionCore-builtins", + "version": "2023.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "literal3" + } + ], + "containments": [], + "references": [], + "annotations": [], + "parent": "SecondTestEnumeration" + }, + { + "id": "DataTypeTestConcept", + "classifier": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "Concept" + }, + "properties": [ + { + "property": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "Concept-abstract" + }, + "value": "false" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "Concept-partition" + }, + "value": "true" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "IKeyed-key" + }, + "value": "DataTypeTestConcept" + }, + { + "property": { + "language": "LionCore-builtins", + "version": "2023.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "DataTypeTestConcept" + } + ], + "containments": [ + { + "containment": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "Classifier-features" + }, + "children": [ + "DataTypeTestConcept-booleanValue_1", + "DataTypeTestConcept-integerValue_1", + "DataTypeTestConcept-stringValue_1", + "DataTypeTestConcept-enumValue_1", + "DataTypeTestConcept-booleanValue_0_1", + "DataTypeTestConcept-integerValue_0_1", + "DataTypeTestConcept-stringValue_0_1", + "DataTypeTestConcept-enumValue_0_1" + ] + } + ], + "references": [ + { + "reference": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "Concept-extends" + }, + "targets": [] + }, + { + "reference": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "Concept-implements" + }, + "targets": [] + } + ], + "annotations": [], + "parent": "TestLanguage" + }, + { + "id": "DataTypeTestConcept-booleanValue_1", + "classifier": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "Property" + }, + "properties": [ + { + "property": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "Feature-optional" + }, + "value": "false" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "IKeyed-key" + }, + "value": "DataTypeTestConcept-booleanValue_1" + }, + { + "property": { + "language": "LionCore-builtins", + "version": "2023.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "booleanValue_1" + } + ], + "containments": [], + "references": [ + { + "reference": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "Property-type" + }, + "targets": [ + { + "resolveInfo": "Boolean", + "reference": "LionCore-builtins-Boolean" + } + ] + } + ], + "annotations": [], + "parent": "DataTypeTestConcept" + }, + { + "id": "DataTypeTestConcept-integerValue_1", + "classifier": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "Property" + }, + "properties": [ + { + "property": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "Feature-optional" + }, + "value": "false" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "IKeyed-key" + }, + "value": "DataTypeTestConcept-integerValue_1" + }, + { + "property": { + "language": "LionCore-builtins", + "version": "2023.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "integerValue_1" + } + ], + "containments": [], + "references": [ + { + "reference": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "Property-type" + }, + "targets": [ + { + "resolveInfo": "Integer", + "reference": "LionCore-builtins-Integer" + } + ] + } + ], + "annotations": [], + "parent": "DataTypeTestConcept" + }, + { + "id": "DataTypeTestConcept-stringValue_1", + "classifier": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "Property" + }, + "properties": [ + { + "property": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "Feature-optional" + }, + "value": "false" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "IKeyed-key" + }, + "value": "DataTypeTestConcept-stringValue_1" + }, + { + "property": { + "language": "LionCore-builtins", + "version": "2023.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "stringValue_1" + } + ], + "containments": [], + "references": [ + { + "reference": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "Property-type" + }, + "targets": [ + { + "resolveInfo": "String", + "reference": "LionCore-builtins-String" + } + ] + } + ], + "annotations": [], + "parent": "DataTypeTestConcept" + }, + { + "id": "DataTypeTestConcept-enumValue_1", + "classifier": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "Property" + }, + "properties": [ + { + "property": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "Feature-optional" + }, + "value": "false" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "IKeyed-key" + }, + "value": "DataTypeTestConcept-enumValue_1" + }, + { + "property": { + "language": "LionCore-builtins", + "version": "2023.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "enumValue_1" + } + ], + "containments": [], + "references": [ + { + "reference": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "Property-type" + }, + "targets": [ + { + "resolveInfo": "TestEnumeration", + "reference": "TestEnumeration" + } + ] + } + ], + "annotations": [], + "parent": "DataTypeTestConcept" + }, + { + "id": "DataTypeTestConcept-booleanValue_0_1", + "classifier": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "Property" + }, + "properties": [ + { + "property": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "Feature-optional" + }, + "value": "true" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "IKeyed-key" + }, + "value": "DataTypeTestConcept-booleanValue_0_1" + }, + { + "property": { + "language": "LionCore-builtins", + "version": "2023.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "booleanValue_0_1" + } + ], + "containments": [], + "references": [ + { + "reference": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "Property-type" + }, + "targets": [ + { + "resolveInfo": "Boolean", + "reference": "LionCore-builtins-Boolean" + } + ] + } + ], + "annotations": [], + "parent": "DataTypeTestConcept" + }, + { + "id": "DataTypeTestConcept-integerValue_0_1", + "classifier": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "Property" + }, + "properties": [ + { + "property": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "Feature-optional" + }, + "value": "true" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "IKeyed-key" + }, + "value": "DataTypeTestConcept-integerValue_0_1" + }, + { + "property": { + "language": "LionCore-builtins", + "version": "2023.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "integerValue_0_1" + } + ], + "containments": [], + "references": [ + { + "reference": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "Property-type" + }, + "targets": [ + { + "resolveInfo": "Integer", + "reference": "LionCore-builtins-Integer" + } + ] + } + ], + "annotations": [], + "parent": "DataTypeTestConcept" + }, + { + "id": "DataTypeTestConcept-stringValue_0_1", + "classifier": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "Property" + }, + "properties": [ + { + "property": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "Feature-optional" + }, + "value": "true" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "IKeyed-key" + }, + "value": "DataTypeTestConcept-stringValue_0_1" + }, + { + "property": { + "language": "LionCore-builtins", + "version": "2023.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "stringValue_0_1" + } + ], + "containments": [], + "references": [ + { + "reference": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "Property-type" + }, + "targets": [ + { + "resolveInfo": "String", + "reference": "LionCore-builtins-String" + } + ] + } + ], + "annotations": [], + "parent": "DataTypeTestConcept" + }, + { + "id": "DataTypeTestConcept-enumValue_0_1", + "classifier": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "Property" + }, + "properties": [ + { + "property": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "Feature-optional" + }, + "value": "true" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "IKeyed-key" + }, + "value": "DataTypeTestConcept-enumValue_0_1" + }, + { + "property": { + "language": "LionCore-builtins", + "version": "2023.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "enumValue_0_1" + } + ], + "containments": [], + "references": [ + { + "reference": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "Property-type" + }, + "targets": [ + { + "resolveInfo": "TestEnumeration", + "reference": "TestEnumeration" + } + ] + } + ], + "annotations": [], + "parent": "DataTypeTestConcept" + }, + { + "id": "LinkTestConcept", + "classifier": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "Concept" + }, + "properties": [ + { + "property": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "Concept-abstract" + }, + "value": "false" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "Concept-partition" + }, + "value": "true" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "IKeyed-key" + }, + "value": "LinkTestConcept" + }, + { + "property": { + "language": "LionCore-builtins", + "version": "2023.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "LinkTestConcept" + } + ], + "containments": [ + { + "containment": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "Classifier-features" + }, + "children": [ + "LinkTestConcept-containment_0_1", + "LinkTestConcept-containment_1", + "LinkTestConcept-containment_0_n", + "LinkTestConcept-containment_1_n", + "LinkTestConcept-reference_0_1", + "LinkTestConcept-reference_1", + "LinkTestConcept-reference_0_n", + "LinkTestConcept-reference_1_n" + ] + } + ], + "references": [ + { + "reference": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "Concept-extends" + }, + "targets": [] + }, + { + "reference": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "Concept-implements" + }, + "targets": [ + { + "resolveInfo": "INamed", + "reference": "LionCore-builtins-INamed" + } + ] + } + ], + "annotations": [], + "parent": "TestLanguage" + }, + { + "id": "LinkTestConcept-containment_0_1", + "classifier": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "Containment" + }, + "properties": [ + { + "property": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "Link-multiple" + }, + "value": "false" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "Feature-optional" + }, + "value": "true" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "IKeyed-key" + }, + "value": "LinkTestConcept-containment_0_1" + }, + { + "property": { + "language": "LionCore-builtins", + "version": "2023.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "containment_0_1" + } + ], + "containments": [], + "references": [ + { + "reference": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "Link-type" + }, + "targets": [ + { + "resolveInfo": "LinkTestConcept", + "reference": "LinkTestConcept" + } + ] + } + ], + "annotations": [], + "parent": "LinkTestConcept" + }, + { + "id": "LinkTestConcept-containment_1", + "classifier": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "Containment" + }, + "properties": [ + { + "property": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "Link-multiple" + }, + "value": "false" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "Feature-optional" + }, + "value": "false" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "IKeyed-key" + }, + "value": "LinkTestConcept-containment_1" + }, + { + "property": { + "language": "LionCore-builtins", + "version": "2023.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "containment_1" + } + ], + "containments": [], + "references": [ + { + "reference": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "Link-type" + }, + "targets": [ + { + "resolveInfo": "LinkTestConcept", + "reference": "LinkTestConcept" + } + ] + } + ], + "annotations": [], + "parent": "LinkTestConcept" + }, + { + "id": "LinkTestConcept-containment_0_n", + "classifier": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "Containment" + }, + "properties": [ + { + "property": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "Link-multiple" + }, + "value": "true" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "Feature-optional" + }, + "value": "true" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "IKeyed-key" + }, + "value": "LinkTestConcept-containment_0_n" + }, + { + "property": { + "language": "LionCore-builtins", + "version": "2023.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "containment_0_n" + } + ], + "containments": [], + "references": [ + { + "reference": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "Link-type" + }, + "targets": [ + { + "resolveInfo": "LinkTestConcept", + "reference": "LinkTestConcept" + } + ] + } + ], + "annotations": [], + "parent": "LinkTestConcept" + }, + { + "id": "LinkTestConcept-containment_1_n", + "classifier": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "Containment" + }, + "properties": [ + { + "property": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "Link-multiple" + }, + "value": "true" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "Feature-optional" + }, + "value": "false" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "IKeyed-key" + }, + "value": "LinkTestConcept-containment_1_n" + }, + { + "property": { + "language": "LionCore-builtins", + "version": "2023.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "containment_1_n" + } + ], + "containments": [], + "references": [ + { + "reference": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "Link-type" + }, + "targets": [ + { + "resolveInfo": "LinkTestConcept", + "reference": "LinkTestConcept" + } + ] + } + ], + "annotations": [], + "parent": "LinkTestConcept" + }, + { + "id": "LinkTestConcept-reference_0_1", + "classifier": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "Reference" + }, + "properties": [ + { + "property": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "Link-multiple" + }, + "value": "false" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "Feature-optional" + }, + "value": "true" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "IKeyed-key" + }, + "value": "LinkTestConcept-reference_0_1" + }, + { + "property": { + "language": "LionCore-builtins", + "version": "2023.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "reference_0_1" + } + ], + "containments": [], + "references": [ + { + "reference": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "Link-type" + }, + "targets": [ + { + "resolveInfo": "LinkTestConcept", + "reference": "LinkTestConcept" + } + ] + } + ], + "annotations": [], + "parent": "LinkTestConcept" + }, + { + "id": "LinkTestConcept-reference_1", + "classifier": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "Reference" + }, + "properties": [ + { + "property": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "Link-multiple" + }, + "value": "false" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "Feature-optional" + }, + "value": "false" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "IKeyed-key" + }, + "value": "LinkTestConcept-reference_1" + }, + { + "property": { + "language": "LionCore-builtins", + "version": "2023.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "reference_1" + } + ], + "containments": [], + "references": [ + { + "reference": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "Link-type" + }, + "targets": [ + { + "resolveInfo": "LinkTestConcept", + "reference": "LinkTestConcept" + } + ] + } + ], + "annotations": [], + "parent": "LinkTestConcept" + }, + { + "id": "LinkTestConcept-reference_0_n", + "classifier": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "Reference" + }, + "properties": [ + { + "property": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "Link-multiple" + }, + "value": "true" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "Feature-optional" + }, + "value": "true" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "IKeyed-key" + }, + "value": "LinkTestConcept-reference_0_n" + }, + { + "property": { + "language": "LionCore-builtins", + "version": "2023.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "reference_0_n" + } + ], + "containments": [], + "references": [ + { + "reference": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "Link-type" + }, + "targets": [ + { + "resolveInfo": "LinkTestConcept", + "reference": "LinkTestConcept" + } + ] + } + ], + "annotations": [], + "parent": "LinkTestConcept" + }, + { + "id": "LinkTestConcept-reference_1_n", + "classifier": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "Reference" + }, + "properties": [ + { + "property": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "Link-multiple" + }, + "value": "true" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "Feature-optional" + }, + "value": "false" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "IKeyed-key" + }, + "value": "LinkTestConcept-reference_1_n" + }, + { + "property": { + "language": "LionCore-builtins", + "version": "2023.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "reference_1_n" + } + ], + "containments": [], + "references": [ + { + "reference": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "Link-type" + }, + "targets": [ + { + "resolveInfo": "LinkTestConcept", + "reference": "LinkTestConcept" + } + ] + } + ], + "annotations": [], + "parent": "LinkTestConcept" + }, + { + "id": "TestAnnotation", + "classifier": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "Annotation" + }, + "properties": [ + { + "property": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "IKeyed-key" + }, + "value": "TestAnnotation" + }, + { + "property": { + "language": "LionCore-builtins", + "version": "2023.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "TestAnnotation" + } + ], + "containments": [ + { + "containment": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "Classifier-features" + }, + "children": [] + } + ], + "references": [ + { + "reference": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "Annotation-annotates" + }, + "targets": [ + { + "resolveInfo": "Node", + "reference": "LionCore-builtins-Node" + } + ] + }, + { + "reference": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "Annotation-extends" + }, + "targets": [] + }, + { + "reference": { + "language": "LionCore-M3", + "version": "2023.1", + "key": "Annotation-implements" + }, + "targets": [] + } + ], + "annotations": [], + "parent": "TestLanguage" + } + ] +} \ No newline at end of file diff --git a/src/languages/testLanguage.2024.1.json b/src/languages/testLanguage.2024.1.json new file mode 100644 index 0000000..4bbc9f9 --- /dev/null +++ b/src/languages/testLanguage.2024.1.json @@ -0,0 +1,1475 @@ +{ + "serializationFormatVersion": "2024.1", + "languages": [ + { + "key": "LionCore-M3", + "version": "2024.1" + }, + { + "key": "LionCore-builtins", + "version": "2024.1" + } + ], + "nodes": [ + { + "id": "TestLanguage", + "classifier": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Language" + }, + "properties": [ + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Language-version" + }, + "value": "0" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "IKeyed-key" + }, + "value": "TestLanguage" + }, + { + "property": { + "language": "LionCore-builtins", + "version": "2024.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "TestLanguage" + } + ], + "containments": [ + { + "containment": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Language-entities" + }, + "children": [ + "TestEnumeration", + "SecondTestEnumeration", + "DataTypeTestConcept", + "LinkTestConcept", + "TestAnnotation" + ] + } + ], + "references": [ + { + "reference": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Language-dependsOn" + }, + "targets": [] + } + ], + "annotations": [], + "parent": null + }, + { + "id": "TestEnumeration", + "classifier": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Enumeration" + }, + "properties": [ + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "IKeyed-key" + }, + "value": "TestEnumeration" + }, + { + "property": { + "language": "LionCore-builtins", + "version": "2024.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "TestEnumeration" + } + ], + "containments": [ + { + "containment": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Enumeration-literals" + }, + "children": [ + "TestEnumeration-literal1", + "TestEnumeration-literal2", + "TestEnumeration-literal3" + ] + } + ], + "references": [], + "annotations": [], + "parent": "TestLanguage" + }, + { + "id": "TestEnumeration-literal1", + "classifier": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "EnumerationLiteral" + }, + "properties": [ + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "IKeyed-key" + }, + "value": "TestEnumeration-literal1" + }, + { + "property": { + "language": "LionCore-builtins", + "version": "2024.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "literal1" + } + ], + "containments": [], + "references": [], + "annotations": [], + "parent": "TestEnumeration" + }, + { + "id": "TestEnumeration-literal2", + "classifier": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "EnumerationLiteral" + }, + "properties": [ + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "IKeyed-key" + }, + "value": "TestEnumeration-literal2" + }, + { + "property": { + "language": "LionCore-builtins", + "version": "2024.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "literal2" + } + ], + "containments": [], + "references": [], + "annotations": [], + "parent": "TestEnumeration" + }, + { + "id": "TestEnumeration-literal3", + "classifier": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "EnumerationLiteral" + }, + "properties": [ + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "IKeyed-key" + }, + "value": "TestEnumeration-literal3" + }, + { + "property": { + "language": "LionCore-builtins", + "version": "2024.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "literal3" + } + ], + "containments": [], + "references": [], + "annotations": [], + "parent": "TestEnumeration" + }, + { + "id": "SecondTestEnumeration", + "classifier": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Enumeration" + }, + "properties": [ + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "IKeyed-key" + }, + "value": "SecondTestEnumeration" + }, + { + "property": { + "language": "LionCore-builtins", + "version": "2024.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "SecondTestEnumeration" + } + ], + "containments": [ + { + "containment": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Enumeration-literals" + }, + "children": [ + "SecondTestEnumeration-literal1", + "SecondTestEnumeration-literal2", + "SecondTestEnumeration-literal3" + ] + } + ], + "references": [], + "annotations": [], + "parent": "TestLanguage" + }, + { + "id": "SecondTestEnumeration-literal1", + "classifier": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "EnumerationLiteral" + }, + "properties": [ + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "IKeyed-key" + }, + "value": "SecondTestEnumeration-literal1" + }, + { + "property": { + "language": "LionCore-builtins", + "version": "2024.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "literal1" + } + ], + "containments": [], + "references": [], + "annotations": [], + "parent": "SecondTestEnumeration" + }, + { + "id": "SecondTestEnumeration-literal2", + "classifier": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "EnumerationLiteral" + }, + "properties": [ + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "IKeyed-key" + }, + "value": "SecondTestEnumeration-literal2" + }, + { + "property": { + "language": "LionCore-builtins", + "version": "2024.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "literal2" + } + ], + "containments": [], + "references": [], + "annotations": [], + "parent": "SecondTestEnumeration" + }, + { + "id": "SecondTestEnumeration-literal3", + "classifier": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "EnumerationLiteral" + }, + "properties": [ + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "IKeyed-key" + }, + "value": "SecondTestEnumeration-literal3" + }, + { + "property": { + "language": "LionCore-builtins", + "version": "2024.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "literal3" + } + ], + "containments": [], + "references": [], + "annotations": [], + "parent": "SecondTestEnumeration" + }, + { + "id": "DataTypeTestConcept", + "classifier": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Concept" + }, + "properties": [ + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Concept-abstract" + }, + "value": "false" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Concept-partition" + }, + "value": "true" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "IKeyed-key" + }, + "value": "DataTypeTestConcept" + }, + { + "property": { + "language": "LionCore-builtins", + "version": "2024.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "DataTypeTestConcept" + } + ], + "containments": [ + { + "containment": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Classifier-features" + }, + "children": [ + "DataTypeTestConcept-booleanValue_1", + "DataTypeTestConcept-integerValue_1", + "DataTypeTestConcept-stringValue_1", + "DataTypeTestConcept-enumValue_1", + "DataTypeTestConcept-booleanValue_0_1", + "DataTypeTestConcept-integerValue_0_1", + "DataTypeTestConcept-stringValue_0_1", + "DataTypeTestConcept-enumValue_0_1" + ] + } + ], + "references": [ + { + "reference": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Concept-extends" + }, + "targets": [] + }, + { + "reference": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Concept-implements" + }, + "targets": [] + } + ], + "annotations": [], + "parent": "TestLanguage" + }, + { + "id": "DataTypeTestConcept-booleanValue_1", + "classifier": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Property" + }, + "properties": [ + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Feature-optional" + }, + "value": "false" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "IKeyed-key" + }, + "value": "DataTypeTestConcept-booleanValue_1" + }, + { + "property": { + "language": "LionCore-builtins", + "version": "2024.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "booleanValue_1" + } + ], + "containments": [], + "references": [ + { + "reference": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Property-type" + }, + "targets": [ + { + "resolveInfo": "LionWeb.LionCore_builtins.Boolean", + "reference": null + } + ] + } + ], + "annotations": [], + "parent": "DataTypeTestConcept" + }, + { + "id": "DataTypeTestConcept-integerValue_1", + "classifier": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Property" + }, + "properties": [ + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Feature-optional" + }, + "value": "false" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "IKeyed-key" + }, + "value": "DataTypeTestConcept-integerValue_1" + }, + { + "property": { + "language": "LionCore-builtins", + "version": "2024.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "integerValue_1" + } + ], + "containments": [], + "references": [ + { + "reference": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Property-type" + }, + "targets": [ + { + "resolveInfo": "LionWeb.LionCore_builtins.Integer", + "reference": null + } + ] + } + ], + "annotations": [], + "parent": "DataTypeTestConcept" + }, + { + "id": "DataTypeTestConcept-stringValue_1", + "classifier": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Property" + }, + "properties": [ + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Feature-optional" + }, + "value": "false" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "IKeyed-key" + }, + "value": "DataTypeTestConcept-stringValue_1" + }, + { + "property": { + "language": "LionCore-builtins", + "version": "2024.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "stringValue_1" + } + ], + "containments": [], + "references": [ + { + "reference": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Property-type" + }, + "targets": [ + { + "resolveInfo": "LionWeb.LionCore_builtins.String", + "reference": null + } + ] + } + ], + "annotations": [], + "parent": "DataTypeTestConcept" + }, + { + "id": "DataTypeTestConcept-enumValue_1", + "classifier": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Property" + }, + "properties": [ + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Feature-optional" + }, + "value": "false" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "IKeyed-key" + }, + "value": "DataTypeTestConcept-enumValue_1" + }, + { + "property": { + "language": "LionCore-builtins", + "version": "2024.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "enumValue_1" + } + ], + "containments": [], + "references": [ + { + "reference": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Property-type" + }, + "targets": [ + { + "resolveInfo": "TestEnumeration", + "reference": "TestEnumeration" + } + ] + } + ], + "annotations": [], + "parent": "DataTypeTestConcept" + }, + { + "id": "DataTypeTestConcept-booleanValue_0_1", + "classifier": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Property" + }, + "properties": [ + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Feature-optional" + }, + "value": "true" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "IKeyed-key" + }, + "value": "DataTypeTestConcept-booleanValue_0_1" + }, + { + "property": { + "language": "LionCore-builtins", + "version": "2024.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "booleanValue_0_1" + } + ], + "containments": [], + "references": [ + { + "reference": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Property-type" + }, + "targets": [ + { + "resolveInfo": "LionWeb.LionCore_builtins.Boolean", + "reference": null + } + ] + } + ], + "annotations": [], + "parent": "DataTypeTestConcept" + }, + { + "id": "DataTypeTestConcept-integerValue_0_1", + "classifier": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Property" + }, + "properties": [ + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Feature-optional" + }, + "value": "true" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "IKeyed-key" + }, + "value": "DataTypeTestConcept-integerValue_0_1" + }, + { + "property": { + "language": "LionCore-builtins", + "version": "2024.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "integerValue_0_1" + } + ], + "containments": [], + "references": [ + { + "reference": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Property-type" + }, + "targets": [ + { + "resolveInfo": "LionWeb.LionCore_builtins.Integer", + "reference": null + } + ] + } + ], + "annotations": [], + "parent": "DataTypeTestConcept" + }, + { + "id": "DataTypeTestConcept-stringValue_0_1", + "classifier": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Property" + }, + "properties": [ + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Feature-optional" + }, + "value": "true" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "IKeyed-key" + }, + "value": "DataTypeTestConcept-stringValue_0_1" + }, + { + "property": { + "language": "LionCore-builtins", + "version": "2024.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "stringValue_0_1" + } + ], + "containments": [], + "references": [ + { + "reference": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Property-type" + }, + "targets": [ + { + "resolveInfo": "LionWeb.LionCore_builtins.String", + "reference": null + } + ] + } + ], + "annotations": [], + "parent": "DataTypeTestConcept" + }, + { + "id": "DataTypeTestConcept-enumValue_0_1", + "classifier": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Property" + }, + "properties": [ + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Feature-optional" + }, + "value": "true" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "IKeyed-key" + }, + "value": "DataTypeTestConcept-enumValue_0_1" + }, + { + "property": { + "language": "LionCore-builtins", + "version": "2024.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "enumValue_0_1" + } + ], + "containments": [], + "references": [ + { + "reference": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Property-type" + }, + "targets": [ + { + "resolveInfo": "TestEnumeration", + "reference": "TestEnumeration" + } + ] + } + ], + "annotations": [], + "parent": "DataTypeTestConcept" + }, + { + "id": "LinkTestConcept", + "classifier": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Concept" + }, + "properties": [ + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Concept-abstract" + }, + "value": "false" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Concept-partition" + }, + "value": "true" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "IKeyed-key" + }, + "value": "LinkTestConcept" + }, + { + "property": { + "language": "LionCore-builtins", + "version": "2024.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "LinkTestConcept" + } + ], + "containments": [ + { + "containment": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Classifier-features" + }, + "children": [ + "LinkTestConcept-containment_0_1", + "LinkTestConcept-containment_1", + "LinkTestConcept-containment_0_n", + "LinkTestConcept-containment_1_n", + "LinkTestConcept-reference_0_1", + "LinkTestConcept-reference_1", + "LinkTestConcept-reference_0_n", + "LinkTestConcept-reference_1_n" + ] + } + ], + "references": [ + { + "reference": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Concept-extends" + }, + "targets": [] + }, + { + "reference": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Concept-implements" + }, + "targets": [ + { + "resolveInfo": "LionWeb.LionCore_builtins.INamed", + "reference": null + } + ] + } + ], + "annotations": [], + "parent": "TestLanguage" + }, + { + "id": "LinkTestConcept-containment_0_1", + "classifier": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Containment" + }, + "properties": [ + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Link-multiple" + }, + "value": "false" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Feature-optional" + }, + "value": "true" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "IKeyed-key" + }, + "value": "LinkTestConcept-containment_0_1" + }, + { + "property": { + "language": "LionCore-builtins", + "version": "2024.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "containment_0_1" + } + ], + "containments": [], + "references": [ + { + "reference": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Link-type" + }, + "targets": [ + { + "resolveInfo": "LinkTestConcept", + "reference": "LinkTestConcept" + } + ] + } + ], + "annotations": [], + "parent": "LinkTestConcept" + }, + { + "id": "LinkTestConcept-containment_1", + "classifier": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Containment" + }, + "properties": [ + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Link-multiple" + }, + "value": "false" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Feature-optional" + }, + "value": "false" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "IKeyed-key" + }, + "value": "LinkTestConcept-containment_1" + }, + { + "property": { + "language": "LionCore-builtins", + "version": "2024.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "containment_1" + } + ], + "containments": [], + "references": [ + { + "reference": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Link-type" + }, + "targets": [ + { + "resolveInfo": "LinkTestConcept", + "reference": "LinkTestConcept" + } + ] + } + ], + "annotations": [], + "parent": "LinkTestConcept" + }, + { + "id": "LinkTestConcept-containment_0_n", + "classifier": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Containment" + }, + "properties": [ + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Link-multiple" + }, + "value": "true" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Feature-optional" + }, + "value": "true" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "IKeyed-key" + }, + "value": "LinkTestConcept-containment_0_n" + }, + { + "property": { + "language": "LionCore-builtins", + "version": "2024.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "containment_0_n" + } + ], + "containments": [], + "references": [ + { + "reference": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Link-type" + }, + "targets": [ + { + "resolveInfo": "LinkTestConcept", + "reference": "LinkTestConcept" + } + ] + } + ], + "annotations": [], + "parent": "LinkTestConcept" + }, + { + "id": "LinkTestConcept-containment_1_n", + "classifier": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Containment" + }, + "properties": [ + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Link-multiple" + }, + "value": "true" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Feature-optional" + }, + "value": "false" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "IKeyed-key" + }, + "value": "LinkTestConcept-containment_1_n" + }, + { + "property": { + "language": "LionCore-builtins", + "version": "2024.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "containment_1_n" + } + ], + "containments": [], + "references": [ + { + "reference": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Link-type" + }, + "targets": [ + { + "resolveInfo": "LinkTestConcept", + "reference": "LinkTestConcept" + } + ] + } + ], + "annotations": [], + "parent": "LinkTestConcept" + }, + { + "id": "LinkTestConcept-reference_0_1", + "classifier": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Reference" + }, + "properties": [ + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Link-multiple" + }, + "value": "false" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Feature-optional" + }, + "value": "true" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "IKeyed-key" + }, + "value": "LinkTestConcept-reference_0_1" + }, + { + "property": { + "language": "LionCore-builtins", + "version": "2024.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "reference_0_1" + } + ], + "containments": [], + "references": [ + { + "reference": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Link-type" + }, + "targets": [ + { + "resolveInfo": "LinkTestConcept", + "reference": "LinkTestConcept" + } + ] + } + ], + "annotations": [], + "parent": "LinkTestConcept" + }, + { + "id": "LinkTestConcept-reference_1", + "classifier": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Reference" + }, + "properties": [ + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Link-multiple" + }, + "value": "false" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Feature-optional" + }, + "value": "false" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "IKeyed-key" + }, + "value": "LinkTestConcept-reference_1" + }, + { + "property": { + "language": "LionCore-builtins", + "version": "2024.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "reference_1" + } + ], + "containments": [], + "references": [ + { + "reference": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Link-type" + }, + "targets": [ + { + "resolveInfo": "LinkTestConcept", + "reference": "LinkTestConcept" + } + ] + } + ], + "annotations": [], + "parent": "LinkTestConcept" + }, + { + "id": "LinkTestConcept-reference_0_n", + "classifier": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Reference" + }, + "properties": [ + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Link-multiple" + }, + "value": "true" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Feature-optional" + }, + "value": "true" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "IKeyed-key" + }, + "value": "LinkTestConcept-reference_0_n" + }, + { + "property": { + "language": "LionCore-builtins", + "version": "2024.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "reference_0_n" + } + ], + "containments": [], + "references": [ + { + "reference": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Link-type" + }, + "targets": [ + { + "resolveInfo": "LinkTestConcept", + "reference": "LinkTestConcept" + } + ] + } + ], + "annotations": [], + "parent": "LinkTestConcept" + }, + { + "id": "LinkTestConcept-reference_1_n", + "classifier": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Reference" + }, + "properties": [ + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Link-multiple" + }, + "value": "true" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Feature-optional" + }, + "value": "false" + }, + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "IKeyed-key" + }, + "value": "LinkTestConcept-reference_1_n" + }, + { + "property": { + "language": "LionCore-builtins", + "version": "2024.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "reference_1_n" + } + ], + "containments": [], + "references": [ + { + "reference": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Link-type" + }, + "targets": [ + { + "resolveInfo": "LinkTestConcept", + "reference": "LinkTestConcept" + } + ] + } + ], + "annotations": [], + "parent": "LinkTestConcept" + }, + { + "id": "TestAnnotation", + "classifier": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Annotation" + }, + "properties": [ + { + "property": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "IKeyed-key" + }, + "value": "TestAnnotation" + }, + { + "property": { + "language": "LionCore-builtins", + "version": "2024.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "TestAnnotation" + } + ], + "containments": [ + { + "containment": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Classifier-features" + }, + "children": [] + } + ], + "references": [ + { + "reference": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Annotation-annotates" + }, + "targets": [ + { + "resolveInfo": "Node", + "reference": "LionCore-builtins-Node" + } + ] + }, + { + "reference": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Annotation-extends" + }, + "targets": [] + }, + { + "reference": { + "language": "LionCore-M3", + "version": "2024.1", + "key": "Annotation-implements" + }, + "targets": [] + } + ], + "annotations": [], + "parent": "TestLanguage" + } + ] +} \ No newline at end of file diff --git a/testchanges/data/add-new-annotation/Delta-AddAnnotation.json b/testchanges/data/add-new-annotation/Delta-AddAnnotation.json new file mode 100644 index 0000000..b49ef3a --- /dev/null +++ b/testchanges/data/add-new-annotation/Delta-AddAnnotation.json @@ -0,0 +1,24 @@ +{ + "messageKind": "AddAnnotation", + "parent": "ID-7", + "index": 1, + "commandId": "SomeId", + "protocolMessages": [], + "newAnnotation": { + "nodes": [ + { + "id": "ANN-2", + "classifier": { + "language": "-default-key-FileSystem", + "version": "2023.1", + "key": "Folder-key" + }, + "properties": [], + "containments": [], + "references": [], + "annotations": [], + "parent": "ID-7" + } + ] + } +} diff --git a/testchanges/data/add-new-nodes/Delta-AddChild.json b/testchanges/data/add-new-nodes/Delta-AddChild.json new file mode 100644 index 0000000..8dd1656 --- /dev/null +++ b/testchanges/data/add-new-nodes/Delta-AddChild.json @@ -0,0 +1,47 @@ +{ + "messageKind": "AddChild", + "parent": "ANN-1", + "containment": { + "language": "-default-key-FileSystem", + "version": "2023.1", + "key": "Folder-listing-key" + }, + "index": 0, + "commandId": "command-12", + "protocolMessages": [], + "newChild": { + "nodes": [ + { + "id": "ID-20", + "classifier": { + "language": "-default-key-FileSystem", + "version": "2023.1", + "key": "Folder-key" + }, + "properties": [ + { + "property": { + "language": "LionCore-builtins", + "version": "2023.1", + "key": "LionCore-builtins-INamed-name" + }, + "value": "folder-20" + } + ], + "containments": [ + { + "containment": { + "language": "-default-key-FileSystem", + "version": "2023.1", + "key": "Folder-listing-key" + }, + "children": [] + } + ], + "references": [], + "annotations": [], + "parent": "ANN-1" + } + ] + } +} diff --git a/testchanges/data/add-new-property-with-value/Delta-AddProperty.json b/testchanges/data/add-new-property-with-value/Delta-AddProperty.json new file mode 100644 index 0000000..478253c --- /dev/null +++ b/testchanges/data/add-new-property-with-value/Delta-AddProperty.json @@ -0,0 +1,12 @@ +{ + "messageKind": "AddProperty", + "node": "ID-2", + "property": { + "language": "-default-key-FileSystem", + "version": "2023.1", + "key": "FileSystem-virtual-key" + }, + "newValue": "true", + "commandId": "command-001", + "protocolMessages": [] +}