-
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.
Properly document mapping of samm-c:Either to JSON payloads
Changes: - Update documentation; - Add .ttl Model for Either cases. Fixes: #271
- Loading branch information
1 parent
4944a2d
commit b1ac8c8
Showing
3 changed files
with
126 additions
and
4 deletions.
There are no files selected for viewing
52 changes: 52 additions & 0 deletions
52
documentation/modules/ROOT/examples/aspect-with-double-either-characteristic.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,52 @@ | ||
# Copyright (c) 2023 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:com.mycompany.myapplication:1.0.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 xsd: <http://www.w3.org/2001/XMLSchema#> . | ||
|
||
# tag::aspect-with-double-either-characteristic[] | ||
:AspectWithEither a samm:Aspect ; | ||
samm:name "AspectWithEither" ; | ||
samm:properties ( :speedProperty ) ; | ||
samm:operations ( ) . | ||
|
||
:speedProperty a samm:Property ; | ||
samm:name "speedProperty" ; | ||
samm:characteristic :TestEither . | ||
|
||
:TestEither a samm-c:Either ; | ||
samm:name "TestEither" ; | ||
samm:preferredName "Test Either"@en ; | ||
samm:description "This is a test Either."@en ; | ||
samm:see <http://example.com/> ; | ||
samm-c:left :LeftType ; | ||
samm-c:right :IsMoving . | ||
|
||
:LeftType a samm-c:Either ; | ||
samm:name "TestEither" ; | ||
samm:preferredName "Left Either Type"@en ; | ||
samm:description "This is a left Either type."@en ; | ||
samm:see <http://example.com/> ; | ||
samm-c:left :IsMovingLeft ; | ||
samm-c:right :Speed . | ||
|
||
:IsMoving a samm:Characteristic ; | ||
samm:name "isMoving" ; | ||
samm:dataType xsd:boolean . | ||
|
||
:IsMovingLeft a samm:Characteristic ; | ||
samm:name "isMovingLeft" ; | ||
samm:dataType xsd:boolean . | ||
|
||
:Speed a samm:Characteristic ; | ||
samm:name "speed" ; | ||
samm:dataType xsd:integer . |
40 changes: 40 additions & 0 deletions
40
documentation/modules/ROOT/examples/aspect-with-either-characteristic.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,40 @@ | ||
# Copyright (c) 2023 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:com.mycompany.myapplication:1.0.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 xsd: <http://www.w3.org/2001/XMLSchema#> . | ||
|
||
# tag::aspect-with-either-characteristic[] | ||
:AspectWithEither a samm:Aspect ; | ||
samm:name "AspectWithEither" ; | ||
samm:properties ( :speedProperty ) ; | ||
samm:operations ( ) . | ||
|
||
:speedProperty a samm:Property ; | ||
samm:name "speedProperty" ; | ||
samm:characteristic :TestEither . | ||
|
||
:TestEither a samm-c:Either ; | ||
samm:name "TestEither" ; | ||
samm:preferredName "Test Either"@en ; | ||
samm:description "This is a test Either."@en ; | ||
samm:see <http://example.com/> ; | ||
samm-c:left :IsMoving ; | ||
samm-c:right :Speed . | ||
|
||
:IsMoving a samm:Characteristic ; | ||
samm:name "isMoving" ; | ||
samm:dataType xsd:boolean . | ||
|
||
:Speed a samm:Characteristic ; | ||
samm:name "speed" ; | ||
samm:dataType xsd:integer . |
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