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

Update IotSensorDeviceDefinition v.2.0.0 #448

Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
IotSensorDeviceDefinition
Conversion from SAMM to BAMM
Cvetanka-ZF authored Nov 13, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 62dbf695bb344b9eb2b29a0e47d9f2ee53bd89b5
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
#######################################################################
# Copyright (c) 2023 BASF SE
# Copyright (c) 2023 Henkel AG & Co. KGaA
# Copyright (c) 2023 ZF Friedrichshafen AG
# Copyright (c) 2023 Contributors to the Eclipse Foundation
#
# 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.1.0#> .
@prefix samm-c: <urn:samm:org.eclipse.esmf.samm:characteristic:2.1.0#> .
@prefix samm-e: <urn:samm:org.eclipse.esmf.samm:entity:2.1.0#> .
@prefix unit: <urn:samm:org.eclipse.esmf.samm:unit:2.1.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.iot_sensor_device_definition:1.0.0#> .

:IotSensorDeviceDefinition a samm:Aspect ;
samm:preferredName "IoT Sensor Device Definition"@en ;
samm:description "Permanent characteristics of the individual IoT sensor device."@en ;
samm:properties ( :catenaXId :manufacturer :type :serialNumber :ownerID ) ;
samm:operations ( ) ;
samm:events ( ) .

:catenaXId a samm:Property ;
samm:preferredName "Catena-X Identifier"@en ;
samm:description "The fully anonymous Catena-X ID of the serialized part, valid for the Catena-X dataspace."@en ;
samm:characteristic :CatenaXIdTrait ;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here also you can make use of existing characteristic and don't need to define a new one.
For reference: https://github.com/eclipse-tractusx/sldt-semantic-models/pull/405/files#diff-8294717bc9be9d276f548ae9f83e2831503589ef17d4d5bf6f1463cdb397d00eR45

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Thank you for the hint!

samm:exampleValue "urn:uuid:7a6a8376-1783-4926-9be0-5d946622b2e2" .

:manufacturer a samm:Property ;
samm:preferredName "Manufacturer"@en ;
samm:description "Manufacturer of the IoT sensor device."@en ;
samm:see <https://www.wikidata.org/wiki/Q13235160> ;
samm:characteristic :ManufacturerCharacteristic ;
samm:exampleValue "Company X" .

:type a samm:Property ;
samm:preferredName "IoT Sensor Device Type"@en ;
samm:description "The type of the IoT sensor device."@en ;
samm:characteristic :TypeCharacteristic ;
samm:exampleValue "TRACK02839" .

:serialNumber a samm:Property ;
samm:preferredName "IoT Sensor Device Serial Number"@en ;
samm:description "The serial number of the IoT sensor device, as assigned by the manufacturer of the device."@en ;
samm:characteristic :SerialNumberCharacteristic ;
samm:exampleValue "123-0740-3434-A" .

:ownerID a samm:Property ;
samm:preferredName "IoT Sensor Device Owner"@en ;
samm:description "The Catena-X BPNL of the device owner."@en ;
samm:characteristic :OwnerIDCharacteristic ;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if BPNL is the only allowed value, You can make use of existing characteristic and don't need to define a new one.
For reference: https://github.com/eclipse-tractusx/sldt-semantic-models/pull/405/files#diff-8294717bc9be9d276f548ae9f83e2831503589ef17d4d5bf6f1463cdb397d00eR104

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Thank you for the hint!

samm:exampleValue "BPNL00000003ABCD" .

:CatenaXIdTrait a samm-c:Trait ;
samm:preferredName "Catena-X ID Trait"@en ;
samm:description "Trait to ensure data format for Catena-X ID"@en ;
samm-c:baseCharacteristic :UUIDv4 ;
samm-c:constraint :UUIDv4RegularExpression .

:ManufacturerCharacteristic a samm:Characteristic ;
samm:preferredName "IoT Device Manufacturer Name"@en ;
samm:description "Characteristic describing the property manufacturer."@en ;
samm:see <https://www.wikidata.org/wiki/Q184754> ;
samm:dataType xsd:string .

:TypeCharacteristic a samm:Characteristic ;
samm:preferredName "IoT Device Type"@en ;
samm:description "Describes the characteristics of the given type of device."@en ;
samm:dataType xsd:string .

:SerialNumberCharacteristic a samm:Characteristic ;
samm:preferredName "IoT Device Serial Number"@en ;
samm:description "Describes the characteristic of the property serial number."@en ;
samm:dataType xsd:string .

:OwnerIDCharacteristic a samm:Characteristic ;
samm:preferredName "IoT Device Owner Characteristic"@en ;
samm:description "Describes the Characteristic of the property ownerID."@en ;
samm:dataType xsd:string .

:UUIDv4 a samm:Characteristic ;
samm:preferredName "UUIDv4"@en ;
samm:description "A version 4 UUID is a universally unique identifier that is generated using random 32 hexadecimal characters."@en ;
samm:dataType xsd:string .

:UUIDv4RegularExpression a samm-c:RegularExpressionConstraint ;
samm:preferredName "Catena-X Id Regular Expression"@en ;
samm: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 ;
samm:see <https://datatracker.ietf.org/doc/html/rfc4122> ;
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}$)|(^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}$)" .