-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #319 from eclipse-esmf/316-express-relationship-be…
…tween-a-value-property-and-a-corresponding-unit-reference-property Express relationship between a "value" Property and corresponding "unit reference" property
- Loading branch information
Showing
7 changed files
with
136 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
esmf-semantic-aspect-meta-model/src/main/resources/samm/entity/2.2.0/Quantity.ttl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Copyright (c) 2025 Robert Bosch Manufacturing Solutions GmbH | ||
# | ||
# See the AUTHORS file(s) distributed with this work for additional | ||
# information regarding authorship. | ||
# | ||
# This Source Code Form is subject to the terms of the Mozilla Public | ||
# License, v. 2.0. If a copy of the MPL was not distributed with this | ||
# file, You can obtain one at https://mozilla.org/MPL/2.0/. | ||
# | ||
# SPDX-License-Identifier: MPL-2.0 | ||
|
||
@prefix samm: <urn:samm:org.eclipse.esmf.samm:meta-model:2.2.0#> . | ||
@prefix samm-c: <urn:samm:org.eclipse.esmf.samm:characteristic:2.2.0#> . | ||
@prefix samm-e: <urn:samm:org.eclipse.esmf.samm:entity:2.2.0#> . | ||
|
||
samm-e:Quantity a samm:AbstractEntity ; | ||
samm:preferredName "Quantity"@en ; | ||
samm:description "A numeric value and the physical unit of the value."@en ; | ||
samm:properties ( samm-e:value samm-e:unit ) . | ||
|
||
samm-e:unit a samm:Property ; | ||
samm:characteristic samm-c:UnitReference . | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
esmf-semantic-aspect-meta-model/src/test/java/org/eclipse/esmf/samm/QuantityTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package org.eclipse.esmf.samm; | ||
|
||
import org.junit.jupiter.params.ParameterizedTest; | ||
import org.junit.jupiter.params.provider.MethodSource; | ||
|
||
class QuantityTest extends AbstractShapeTest { | ||
|
||
@ParameterizedTest | ||
@MethodSource( value = "versionsStartingWith2_2_0" ) | ||
void testQuantityValidationEntity( final KnownVersion metaModelVersion ) { | ||
checkValidity( "quantity", "QuantityTestEntity", metaModelVersion ); | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
...src/test/resources/samm_2_2_0/quantity/org.eclipse.esmf.test/1.0.0/QuantityTestEntity.ttl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# | ||
# Copyright (c) 2025 Robert Bosch Manufacturing Solutions GmbH | ||
# | ||
# See the AUTHORS file(s) distributed with this work for additional | ||
# information regarding authorship. | ||
# | ||
# This Source Code Form is subject to the terms of the Mozilla Public | ||
# License, v. 2.0. If a copy of the MPL was not distributed with this | ||
# file, You can obtain one at https://mozilla.org/MPL/2.0/. | ||
# | ||
# SPDX-License-Identifier: MPL-2.0 | ||
# | ||
@prefix : <urn:samm:org.eclipse.esmf.samm.test:1.0.0#> . | ||
@prefix samm-c: <urn:samm:org.eclipse.esmf.samm:characteristic:2.2.0#> . | ||
@prefix samm: <urn:samm:org.eclipse.esmf.samm:meta-model:2.2.0#> . | ||
@prefix samm-e: <urn:samm:org.eclipse.esmf.samm:entity:2.2.0#> . | ||
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . | ||
|
||
:Parameter a samm:Entity ; | ||
samm:extends samm-e:Quantity ; | ||
samm:properties ( | ||
[ samm:extends samm-e:value ; samm:characteristic :ParameterValueCharacteristic ] | ||
) . | ||
|
||
:ParameterValueCharacteristic a samm:Characteristic ; | ||
samm:dataType xsd:integer . |