Skip to content

Commit 0337432

Browse files
committed
Add attribute 'revisionAware' to cas:Link
1 parent 472b350 commit 0337432

6 files changed

Lines changed: 30 additions & 4 deletions

File tree

design/CASCaRA-Reference-Implementation/1_Source/CASCaRA-Reference-Implementation.archimate

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1255,5 +1255,12 @@ Major requirements (capabilities and characteristics) must be satisfied:
12551255
- Extend the software using a documented, if possible standardized plug-in mechanism.
12561256

12571257
This model is authored with [Archi](https://www.archimatetool.com/) using the ArchiMate 3.2 notation, then transformed to [SpecIF](https://specif.de) via ArchiMate Open Exchange file format and then transformed to HTML. The CASCaRA App will support a similar workflow (among others) for the source data formats chosen.
1258+

1259+
The [ArchiMate notation](https://www.opengroup.org/sites/default/files/docs/downloads/n221p.pdf) uses the following background colors per model element:
1260+
- **Motivation** level: light violet for stakeholders, goals, outcomes etc.
1261+
- **Strategy** level: beige for competencies, course of action, value streams etc.
1262+
- **Business** level: light yellow for roles, business functions and processes etc.
1263+
- **Application** level: light blue for applications, data objects etc.
1264+
- **Technology** level: light green for operating resources etc.
12581265
</purpose>
12591266
</archimate:model>

design/CASCaRA-Reference-Implementation/1_Source/CASCaRA-Reference-Implementation.archimate.bak

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1179,10 +1179,10 @@ Subject to validation:&#xD;
11791179
<sourceConnection xsi:type="archimate:Connection" id="id-0ab77cac46bc43e7983e3fefee837b46" source="id-8cc0074b463f4f88a18267283aad6c53" target="id-d6149b2c7eee47628c886d8e16fe69b6" archimateRelationship="id-99bca21995b44ac69efe740eb45e3f8f"/>
11801180
<sourceConnection xsi:type="archimate:Connection" id="id-5d56e776a24f49e388212edf1eac0ea3" source="id-8cc0074b463f4f88a18267283aad6c53" target="id-fc4f087f0c51477b819afe8a9d36b7a4" archimateRelationship="id-5c87f59b40c44dc587feaff9eae59077"/>
11811181
<child xsi:type="archimate:DiagramObject" id="id-d6149b2c7eee47628c886d8e16fe69b6" targetConnections="id-0ab77cac46bc43e7983e3fefee837b46" textPosition="1" archimateElement="id-8b0a9929440147a2b4aa7b8d4e6cdd40">
1182-
<bounds x="16" y="144" width="120" height="37"/>
1182+
<bounds x="36" y="144" width="120" height="37"/>
11831183
</child>
11841184
<child xsi:type="archimate:DiagramObject" id="id-fc4f087f0c51477b819afe8a9d36b7a4" targetConnections="id-5d56e776a24f49e388212edf1eac0ea3" textPosition="1" archimateElement="id-d6d5d5dd3f5647fc96608825d21ed329">
1185-
<bounds x="16" y="192" width="120" height="37"/>
1185+
<bounds x="36" y="192" width="120" height="37"/>
11861186
</child>
11871187
</child>
11881188
<child xsi:type="archimate:DiagramObject" id="id-a6a9637228594a229c2a179aea290f38" font="1|Segoe UI|12.0|0|WINDOWS|1|-16|0|0|0|400|0|0|0|0|3|2|1|34|Segoe UI" textPosition="1" archimateElement="id-38c956c5b33947c88f70acd9dd92acf9">
@@ -1255,5 +1255,12 @@ Major requirements (capabilities and characteristics) must be satisfied:&#xD;
12551255
- Extend the software using a documented, if possible standardized plug-in mechanism.&#xD;
12561256
&#xD;
12571257
This model is authored with [Archi](https://www.archimatetool.com/) using the ArchiMate 3.2 notation, then transformed to [SpecIF](https://specif.de) via ArchiMate Open Exchange file format and then transformed to HTML. The CASCaRA App will support a similar workflow (among others) for the source data formats chosen.&#xD;
1258+
&#xD;
1259+
The [ArchiMate notation](https://www.opengroup.org/sites/default/files/docs/downloads/n190p_5.pdf) uses the following background colors per model element:&#xD;
1260+
- **Motivation** level: light violet for stakeholders, goals, outcomes etc.&#xD;
1261+
- **Strategy** level: beige for competencies, course of action, value streams etc.&#xD;
1262+
- **Business** level: light yellow for roles, business functions and processes etc.&#xD;
1263+
- **Application** level: light blue for applications, data objects etc.&#xD;
1264+
- **Technology** level: light green for operating resources etc.&#xD;
12581265
</purpose>
12591266
</archimate:model>

public/assets/jsonld/Link.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,10 @@
7777
"$ref": "#/$defs/idObject"
7878
}
7979
},
80+
"cas:revisionAware": {
81+
"type": "boolean",
82+
"description": "Indicates whether the link is version-aware. If true, instances must specify identifier and revision of the endpoints."
83+
},
8084
"sh:minCount": {
8185
"type": "integer",
8286
"minimum": 0

src/common/schema/pig/json/pig-schemata.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,7 @@ class PigSchemaFactory {
256256
minItems: 1,
257257
items: { $ref: '#/$defs/idString' }
258258
},
259+
revisionAware: { type: 'boolean' },
259260
minCount: { type: 'integer', minimum: 0 },
260261
maxCount: { type: 'integer', minimum: 1 },
261262
revision: { type: 'string' },

src/common/schema/pig/ts/pig-metaclasses.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@
4141
* - Programming errors result in exceptions, data errors in IMsg return values.
4242
* - The namespace prefixes are defined in definitions.ts and used consistently in the code; it was initially 'pig:'
4343
* and is now pfxNsMeta: 'cas:' for the metamodel and pfxNsSemi: 'cas:' for the semantic infrastructure.
44-
* - CASCaRA (PIG) classes (as derived from the ontology) get version information it their URL path.
45-
* - All others must at least specify the 'modified' attribute to capture the version history of the item;
44+
* - CASCaRA (PIG) classes (as derived from the ontology) get revision information it their URL path.
45+
* - All others must at least specify the 'modified' attribute to capture the revision history of the item;
4646
* it is recommended to maintain revision and priorRevision as well for better configuration management and traceability.
4747
*
4848
* @ToDo:
@@ -51,6 +51,8 @@
5151
* - allow packages to be nested
5252
* - implement 'composes' (formerly composedProperty) for Property and aProperty
5353
* - implement the inheritance of enumeratedProperty, enumeratedSourceLink, enumeratedTargetLink and enumeratedEndpoint
54+
* ✅ implement 'revisionAware' for Link.
55+
* - Consequently aSourceLink and aTargetLink must specify the endpoints by identifier and revision, if their class specifies revisionAware=true.
5456
* - Check use of PigItem.normalizeId() in the setJSONLD() thread
5557
* PigItem.normalizeId() shortly before validate() in set() ?
5658
* ✅ Check the result of PigItem.normalizeId in the setXML() thread in case of enumerated values
@@ -1133,11 +1135,13 @@ export class Property extends Identifiable implements IProperty {
11331135
}
11341136
export interface ILink extends IIdentifiable {
11351137
enumeratedEndpoint: TPigId[]; // must be URI of an Entity or Relationship (class)
1138+
revisionAware?: boolean; // optional, default is false
11361139
minCount?: number;
11371140
maxCount?: number;
11381141
}
11391142
export class Link extends Identifiable implements ILink {
11401143
enumeratedEndpoint!: TPigId[];
1144+
revisionAware?: boolean;
11411145
minCount?: number;
11421146
maxCount?: number;
11431147
constructor() {
@@ -1172,6 +1176,7 @@ export class Link extends Identifiable implements ILink {
11721176
if (this.lastStatus.ok) {
11731177
super.set(_itm);
11741178
this.enumeratedEndpoint = _itm.enumeratedEndpoint;
1179+
this.revisionAware = _itm.revisionAware;
11751180
this.minCount = _itm.minCount;
11761181
this.maxCount = _itm.maxCount;
11771182
}
@@ -1181,6 +1186,7 @@ export class Link extends Identifiable implements ILink {
11811186
return LIB.stripUndefinedAndNull({
11821187
...super.get(),
11831188
enumeratedEndpoint: this.enumeratedEndpoint,
1189+
revisionAware: this.revisionAware,
11841190
minCount: this.minCount,
11851191
maxCount: this.maxCount
11861192
}) as ILink;

src/common/schema/pig/ts/pig-package-constraints.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
* - a subClass has all properties and links of its superClass
4646
* enumeratedProperty references
4747
* Link endpoint compliance
48+
* aLink must specify identifier and revision of the endpoints, if its class has revisionAware set to true
4849
* Phase 3 (useful):
4950
* No cyclic composition of properties
5051
* Relationship structure

0 commit comments

Comments
 (0)