eclipse-tractusx / sldt-semantic-models

sldt-semantic-models
Creative Commons Attribution 4.0 International
26 stars 42 forks source link

[New Model]: Shared CatenaX Identifier (UUIDv4) #103

Open jacewski-bosch opened 1 year ago

jacewski-bosch commented 1 year ago

Model Description

A lot of released models reference the CatenaX ID. It would make sense to create a shared aspect for it. For simpler dependency management I would suggest creating a separate model for it. For backward compatibility reasons, it might be necessary to create 2 or 3 versions of it, Since originally the CatenaXId was just added raw and unprefixed, while it has been changed to be prefixed by a UUID URN.

Relevant Standards

https://datatracker.ietf.org/doc/html/rfc4122

Example Data

see the following relevant snippet from an already released model.

...
:catenaXId a bamm:Property;
    bamm:name "catenaXId";
    bamm:preferredName "Catena-X Identifier"@en;
    bamm:description "The fully anonymous Catena-X ID of an object, organization or concept, valid for the Catena-X dataspace."@en;
    bamm:characteristic :CatenaXIdTrait;
    bamm:exampleValue "urn:uuid:580d3adf-1981-44a0-a214-13d6ceed9379".
:CatenaXIdTrait a bamm-c:Trait;
    bamm:name "CatenaXIdTrait";
    bamm:preferredName "Catena-X ID Trait"@en;
    bamm:description "Trait to ensure data format for Catena-X ID"@en;
    bamm-c:constraint :UUIDv4RegularExpression;
    bamm-c:baseCharacteristic :UUIDv4.
:UUIDv4RegularExpression a bamm-c:RegularExpressionConstraint;
    bamm:name "UUIDv4RegularExpression";
    bamm:preferredName "Catena-X Id Regular Expression"@en;
    bamm:description "The provided regular expression ensures that the UUID is composed of five groups of characters separated by hyphens, in the form 8-4-4-4-12 for a total of 36 characters (32 hexadecimal characters and 4 hyphens), optionally prefixed by \"urn:uuid:\" to make it an IRI."@en;
    bamm:value "(^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)|(^urn:uuid:[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)";
    bamm:see <https://datatracker.ietf.org/doc/html/rfc4122>.
:UUIDv4 a bamm:Characteristic;
    bamm:name "UUIDv4";
    bamm:preferredName "UUIDv4"@en;
    bamm:description "A version 4 UUID is a universally unique identifier that is generated using random 32 hexadecimal characters."@en;
    bamm:dataType xsd:string.

MS1 Criteria

ZazraltMagic commented 1 year ago

@bs-jokri MS1 approved

arnoweiss commented 1 year ago

While you're at it - I think there is a general conversation to be had about how closely the models should be tied to Catena-X. There is a general consensus that Submodel Templates generated from SAMM should be proposed in the IDTA. The IDTA will not standardize something that is called "catenaXId". My proposal would be to avoid:

{
  "catenaXId": "foobar"
}

and to encourage something like

{
  "idType": "catenaXId",
  "value": "foobar"
}

Of course this is going to be ugly af when SAMM-properties are mapped to AAS-properties but it's the best I can think of.

BirgitBoss commented 1 year ago

The alternative might be also something like a property "assetId" and a value like urn:dataspace:catena-x:caenaXId:foobar

or two models: one with an abstract identifier and another one derived from it with a catena-x specific ID

abstract id catenaXId inherits from abstract id

arnoweiss commented 1 year ago

@jacewski-bosch - can I assist you with the modeling in any way?