Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[New Model] Message Header (Shared Aspect Model) #227

Merged
merged 8 commits into from
Aug 14, 2023
147 changes: 147 additions & 0 deletions io.catenax.shared.message_header/1.0.0/MessageHeaderAspect.ttl
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
##########################################################################################
# Copyright (c) 2023 Bayerische Motoren Werke Aktiengesellschaft
# Copyright (c) 2023 Robert Bosch GmbH
# Copyright (c) 2023 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e. V.
# Copyright (c) 2023 German Edge Cloud GmbH & Co. KG
# Copyright (c) 2023 SAP SE
# Copyright (c) 2023 Siemens AG
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This work is made available under the terms of the
# Creative Commons Attribution 4.0 International (CC-BY-4.0) license,
# which is available at
# https://creativecommons.org/licenses/by/4.0/legalcode.
#
# SPDX-License-Identifier: CC-BY-4.0
##########################################################################################
@prefix samm: <urn:samm:org.eclipse.esmf.samm:meta-model:2.0.0#> .
@prefix samm-c: <urn:samm:org.eclipse.esmf.samm:characteristic:2.0.0#> .
@prefix samm-e: <urn:samm:org.eclipse.esmf.samm:entity:2.0.0#> .
@prefix unit: <urn:samm:org.eclipse.esmf.samm:unit:2.0.0#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix : <urn:samm:io.catenax.shared.message_header:1.0.0#> .

:MessageHeaderAspect a samm:Aspect ;
samm:preferredName "Message Header Aspect"@en ;
samm:description "Aspect model describing the shared message header."@en ;
samm:properties ( :header ) ;
samm:operations ( ) ;
samm:events ( ) .

:header a samm:Property ;
samm:preferredName "Header"@en ;
samm:description "Contains standardized attributes for message processing common across several use cases."@en ;
samm:characteristic :HeaderCharacteristic .

:HeaderCharacteristic a samm:Characteristic ;
samm:preferredName "Header Characteristic"@en ;
samm:description "Characteristic describing the common shared aspect Message Header"@en ;
samm:dataType :MessageHeader .

:MessageHeader a samm:Entity ;
samm:preferredName "Message Header"@en ;
samm:description "The Catena-X Message Header contains standardized attributes for message processing that are common across several use cases. It targets a minimal set of aspects that are needed for overall message handling, and not for the processing of the business related payload part. By standardizing the message header structure, we support a harmonized modelling approach and re-use of concepts. The message header originated from discussions on push notifications but has since then been abstracted for overall message handling – and does not only apply to notification anymore."@en ;
samm:properties ( :messageId :context :sentDateTime :senderBpn :receiverBpn [ samm:property :expectedResponseBy; samm:optional true ] [ samm:property :relatedMessageId; samm:optional true ] :version ) .

:messageId a samm:Property ;
samm:preferredName "Message ID"@en ;
samm:description "Unique ID identifying the message. The purpose of the ID is to uniquely identify a single message, therefore it MUST not be reused."@en ;
samm:characteristic :UuidCharacteristic ;
samm:exampleValue "3b4edc05-e214-47a1-b0c2-1d831cdd9ba9" .

:context a samm:Property ;
samm:preferredName "Context"@en ;
samm:description """Information about the context the message should be considered in.
The value MUST consist of two parts: an identifier of the context (e.g. business domain, etc.) followed by a version number.
Both the identifier and the version number MUST correspond to the content of the message.
If the content of a message is described by an aspect model available in the Catena-X Semantic Hub, then the unique identifier of this semantic model (e.g. urn:samm:io.catenax.<ASPECT-MODEL-NAME>:1.x.x) MUST be used as a value of the context field. This is considered the default case.
In all other cases the value of the context field MUST follow the pattern <domain>-<subdomain>-<object>:<[major] version> (e.g. TRACE-QM-Alert:1.x.x).
Versioning only refers to major versions in both default and fallback cases.
Note: The version of the message's header is specified in the version field."""@en ;
samm:characteristic :ContextCharacteristic ;
samm:exampleValue "urn:samm:io.catenax.<ASPECT-MODEL-NAME>:1.x.x" .

:sentDateTime a samm:Property ;
samm:preferredName "Sent Date Time"@en ;
samm:description "Time zone aware timestamp holding the date and the time the message was sent by the sending party. The value MUST be formatted according to the ISO 8601 standard"@en ;
samm:characteristic samm-c:Timestamp ;
samm:exampleValue "2023-06-19T21:24:00+07:00"^^xsd:dateTime .

:senderBpn a samm:Property ;
samm:preferredName "Sender BPN"@en ;
samm:description "The Business Partner Number of the sending party. The value MUST be a valid BPN. BPNA and BPNS are not allowed. Applicable constraints are defined in the corresponding standard"@en ;
samm:characteristic :BpnCharacteristic ;
samm:exampleValue "BPNL7588787849VQ" .

:receiverBpn a samm:Property ;
samm:preferredName "Receiver BPN"@en ;
samm:description "The Business Partner Number of the receiving party. The value MUST be a valid BPN. BPNA and BPNS are not allowed. Applicable constraints are defined in the corresponding standard."@en ;
samm:characteristic :BpnCharacteristic ;
samm:exampleValue "BPNL6666787765VQ" .

:expectedResponseBy a samm:Property ;
samm:preferredName "Expected Response By"@en ;
samm:description "Time zone aware timestamp holding the date and time by which the sending party expects a certain type of response from the receiving party. The meaning and interpretation of the fields's value are context-bound and MUST therefore be defined by any business domain or platform capability making use of it. The value MUST be formatted according to the ISO 8601 standard"@en ;
samm:characteristic samm-c:Timestamp ;
samm:exampleValue "2023-06-19T21:24:00+07:00"^^xsd:dateTime .

:relatedMessageId a samm:Property ;
samm:preferredName "Related Message ID"@en ;
samm:description "Unique ID identifying a message somehow related to the current one"@en ;
samm:characteristic :UuidCharacteristic ;
samm:exampleValue "d9452f24-3bf3-4134-b3eb-68858f1b2362" .

:version a samm:Property ;
samm:preferredName "Version"@en ;
samm:description "The unique identifier of the aspect model defining the structure and the semantics of the message's header. The version number should reflect the versioning schema of aspect models in Catena-X."@en ;
samm:characteristic :VersionCharacteristic ;
samm:exampleValue "urn:samm:io.catenax.message_header:1.0.0" .

:UuidCharacteristic a samm:Characteristic ;
samm:preferredName "UUID Characteristic"@en ;
samm:description "Structured Value for defining a property which requires an UUID"@en ;
samm:dataType xsd:string .

:ContextCharacteristic a samm:Characteristic ;
samm:preferredName "Context Characteristic"@en ;
samm:description "Defining a string value for the context"@en ;
samm:dataType xsd:string .

:BpnCharacteristic a samm:Characteristic ;
samm:preferredName "BPN Characteristic"@en ;
samm:description "Characteristic for defining BPN values"@en ;
samm:dataType xsd:string .

:VersionCharacteristic a samm:Characteristic ;
samm:preferredName "Version Characteristic"@en ;
samm:description "Characteristic defining the value of version."@en ;
samm:see <https://semver.org> ;
samm:dataType xsd:string .

:UUIDv4 a samm-c:RegularExpressionConstraint ;
samm:preferredName "UUID v4 Constraint"@en ;
samm:description "Constraint for defining a UUID v4 identifier."@en ;
samm: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}$" .

:SemanticVersioningTrait a samm-c:Trait ;
samm:preferredName "Semantic Versioning Trait"@en ;
samm:description "Trait for defining the Semantic Versioning Characteristic to be SemVer.org compliant."@en ;
samm-c:baseCharacteristic :VersionCharacteristic ;
samm-c:constraint :SemVer .

:IdTrait a samm-c:Trait ;
samm:preferredName "ID (Identifier) Trait"@en ;
samm:description "Trait for defining the UuidCharacteristic to be a UUIDv4 compliant property."@en ;
samm-c:baseCharacteristic :UuidCharacteristic ;
samm-c:constraint :UUIDv4 .

:SemVer a samm-c:RegularExpressionConstraint ;
samm:preferredName "Semantic Versioning Constraint"@en ;
samm:description "Constraint for defining a SemVer version."@en ;
samm:value """
^(0|[1-9][0-9]*).(0|[1-9][0-9]*).(0|[1-9][0-9]*)(-(0|[1-9A-Za-z-][0-9A-Za-z-]*)(.[0-9A-Za-z-]+)*)?(+[0-9A-Za-z-]+(.[0-9A-Za-z-]+)*)?$
""" .
1 change: 1 addition & 0 deletions io.catenax.shared.message_header/1.0.0/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{ "status" : "release" }
7 changes: 7 additions & 0 deletions io.catenax.shared.message_header/RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Changelog

All notable changes to this model will be documented in this file.

## [1.0.0] 2023-07-31

- initial version of the aspect model for the Message Header