Skip to content

Commit

Permalink
make Operation a Namespace
Browse files Browse the repository at this point in the history
This commit makes `Operation` inherit from
`UniqueIdShortNamespace`, to implement Constraint AASd-134:

For an Operation, the idShort of all inputVariable/value,
outputVariable/value, and inoutputVariable/value shall be unique.

In the DotAAS spec, the attributes `inputVariable`, `outputVariable`
and `inoutputVariable` of `Operation` are defined to be a collection of
`OperationVariable` instances, which themselves just contain a single
`SubmodelElement`. Thus, the `OperationVariable` isn't really required
for `Operation`, as the `Operation` can just contain the
`SubmodelElements` directly, without an unnecessary wrapper. This makes
`Operation` less tedious to use and also allows us to use normal
`NamespaceSets` for the 3 attributes, which together with the
`UniqueIdShortNamespace` ensure, that the `idShort` of all contained
`SubmodelElements` is unique across all 3 attributes.

Aside this, the examples are updated since `SubmodelElements` as
children of an `Operation` are now linked to the parent. This prevents
us from reusing other `SubmodelElements` as `OperationVariables` as it
was done previously, since each `SubmodelElement` can only have one
parent.

Fix eclipse-basyx#146 eclipse-basyx#148
  • Loading branch information
jkhsjdhjs authored and s-heppner committed Nov 14, 2023
1 parent 9b76d24 commit bf52267
Show file tree
Hide file tree
Showing 7 changed files with 130 additions and 128 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -944,7 +944,7 @@
"inputVariables": [
{
"value": {
"idShort": "ExampleProperty",
"idShort": "ExamplePropertyInput",
"displayName": [
{
"language": "en-US",
Expand Down Expand Up @@ -972,7 +972,7 @@
"keys": [
{
"type": "GlobalReference",
"value": "http://acplt.org/Properties/ExampleProperty"
"value": "http://acplt.org/Properties/ExamplePropertyInput"
}
]
},
Expand All @@ -994,7 +994,7 @@
"outputVariables": [
{
"value": {
"idShort": "ExampleProperty",
"idShort": "ExamplePropertyOutput",
"displayName": [
{
"language": "en-US",
Expand Down Expand Up @@ -1022,7 +1022,7 @@
"keys": [
{
"type": "GlobalReference",
"value": "http://acplt.org/Properties/ExampleProperty"
"value": "http://acplt.org/Properties/ExamplePropertyOutput"
}
]
},
Expand All @@ -1044,7 +1044,7 @@
"inoutputVariables": [
{
"value": {
"idShort": "ExampleProperty",
"idShort": "ExamplePropertyInOutput",
"displayName": [
{
"language": "en-US",
Expand Down Expand Up @@ -1072,7 +1072,7 @@
"keys": [
{
"type": "GlobalReference",
"value": "http://acplt.org/Properties/ExampleProperty"
"value": "http://acplt.org/Properties/ExamplePropertyInOutput"
}
]
},
Expand Down Expand Up @@ -1975,7 +1975,7 @@
"inputVariables": [
{
"value": {
"idShort": "ExampleProperty",
"idShort": "ExamplePropertyInput",
"displayName": [
{
"language": "en-US",
Expand Down Expand Up @@ -2003,7 +2003,7 @@
"keys": [
{
"type": "GlobalReference",
"value": "http://acplt.org/Properties/ExampleProperty"
"value": "http://acplt.org/Properties/ExamplePropertyInput"
}
]
},
Expand All @@ -2025,7 +2025,7 @@
"outputVariables": [
{
"value": {
"idShort": "ExampleProperty",
"idShort": "ExamplePropertyOutput",
"displayName": [
{
"language": "en-US",
Expand Down Expand Up @@ -2053,7 +2053,7 @@
"keys": [
{
"type": "GlobalReference",
"value": "http://acplt.org/Properties/ExampleProperty"
"value": "http://acplt.org/Properties/ExamplePropertyOutput"
}
]
},
Expand All @@ -2075,7 +2075,7 @@
"inoutputVariables": [
{
"value": {
"idShort": "ExampleProperty",
"idShort": "ExamplePropertyInOutput",
"displayName": [
{
"language": "en-US",
Expand Down Expand Up @@ -2103,7 +2103,7 @@
"keys": [
{
"type": "GlobalReference",
"value": "http://acplt.org/Properties/ExampleProperty"
"value": "http://acplt.org/Properties/ExamplePropertyInOutput"
}
]
},
Expand Down Expand Up @@ -2567,7 +2567,7 @@
"inputVariables": [
{
"value": {
"idShort": "ExampleProperty",
"idShort": "ExamplePropertyInput",
"category": "CONSTANT",
"description": [
{
Expand All @@ -2585,7 +2585,7 @@
"keys": [
{
"type": "GlobalReference",
"value": "http://acplt.org/Properties/ExampleProperty"
"value": "http://acplt.org/Properties/ExamplePropertyInput"
}
]
},
Expand All @@ -2598,7 +2598,7 @@
"outputVariables": [
{
"value": {
"idShort": "ExampleProperty",
"idShort": "ExamplePropertyOutput",
"category": "CONSTANT",
"description": [
{
Expand All @@ -2616,7 +2616,7 @@
"keys": [
{
"type": "GlobalReference",
"value": "http://acplt.org/Properties/ExampleProperty"
"value": "http://acplt.org/Properties/ExamplePropertyOutput"
}
]
},
Expand All @@ -2629,7 +2629,7 @@
"inoutputVariables": [
{
"value": {
"idShort": "ExampleProperty",
"idShort": "ExamplePropertyInOutput",
"category": "CONSTANT",
"description": [
{
Expand All @@ -2647,7 +2647,7 @@
"keys": [
{
"type": "GlobalReference",
"value": "http://acplt.org/Properties/ExampleProperty"
"value": "http://acplt.org/Properties/ExamplePropertyInOutput"
}
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -827,7 +827,7 @@
<aas:value>
<aas:property>
<aas:category>CONSTANT</aas:category>
<aas:idShort>ExampleProperty</aas:idShort>
<aas:idShort>ExamplePropertyInput</aas:idShort>
<aas:displayName>
<aas:langStringNameType>
<aas:language>en-US</aas:language>
Expand All @@ -854,7 +854,7 @@
<aas:keys>
<aas:key>
<aas:type>GlobalReference</aas:type>
<aas:value>http://acplt.org/Properties/ExampleProperty</aas:value>
<aas:value>http://acplt.org/Properties/ExamplePropertyInput</aas:value>
</aas:key>
</aas:keys>
</aas:semanticId>
Expand All @@ -878,7 +878,7 @@
<aas:value>
<aas:property>
<aas:category>CONSTANT</aas:category>
<aas:idShort>ExampleProperty</aas:idShort>
<aas:idShort>ExamplePropertyOutput</aas:idShort>
<aas:displayName>
<aas:langStringNameType>
<aas:language>en-US</aas:language>
Expand All @@ -905,7 +905,7 @@
<aas:keys>
<aas:key>
<aas:type>GlobalReference</aas:type>
<aas:value>http://acplt.org/Properties/ExampleProperty</aas:value>
<aas:value>http://acplt.org/Properties/ExamplePropertyOutput</aas:value>
</aas:key>
</aas:keys>
</aas:semanticId>
Expand All @@ -929,7 +929,7 @@
<aas:value>
<aas:property>
<aas:category>CONSTANT</aas:category>
<aas:idShort>ExampleProperty</aas:idShort>
<aas:idShort>ExamplePropertyInOutput</aas:idShort>
<aas:displayName>
<aas:langStringNameType>
<aas:language>en-US</aas:language>
Expand All @@ -956,7 +956,7 @@
<aas:keys>
<aas:key>
<aas:type>GlobalReference</aas:type>
<aas:value>http://acplt.org/Properties/ExampleProperty</aas:value>
<aas:value>http://acplt.org/Properties/ExamplePropertyInOutput</aas:value>
</aas:key>
</aas:keys>
</aas:semanticId>
Expand Down Expand Up @@ -1848,7 +1848,7 @@
<aas:value>
<aas:property>
<aas:category>CONSTANT</aas:category>
<aas:idShort>ExampleProperty</aas:idShort>
<aas:idShort>ExamplePropertyInput</aas:idShort>
<aas:displayName>
<aas:langStringNameType>
<aas:language>en-US</aas:language>
Expand All @@ -1875,7 +1875,7 @@
<aas:keys>
<aas:key>
<aas:type>GlobalReference</aas:type>
<aas:value>http://acplt.org/Properties/ExampleProperty</aas:value>
<aas:value>http://acplt.org/Properties/ExamplePropertyInput</aas:value>
</aas:key>
</aas:keys>
</aas:semanticId>
Expand All @@ -1899,7 +1899,7 @@
<aas:value>
<aas:property>
<aas:category>CONSTANT</aas:category>
<aas:idShort>ExampleProperty</aas:idShort>
<aas:idShort>ExamplePropertyOutput</aas:idShort>
<aas:displayName>
<aas:langStringNameType>
<aas:language>en-US</aas:language>
Expand All @@ -1926,7 +1926,7 @@
<aas:keys>
<aas:key>
<aas:type>GlobalReference</aas:type>
<aas:value>http://acplt.org/Properties/ExampleProperty</aas:value>
<aas:value>http://acplt.org/Properties/ExamplePropertyOutput</aas:value>
</aas:key>
</aas:keys>
</aas:semanticId>
Expand All @@ -1950,7 +1950,7 @@
<aas:value>
<aas:property>
<aas:category>CONSTANT</aas:category>
<aas:idShort>ExampleProperty</aas:idShort>
<aas:idShort>ExamplePropertyInOutput</aas:idShort>
<aas:displayName>
<aas:langStringNameType>
<aas:language>en-US</aas:language>
Expand All @@ -1977,7 +1977,7 @@
<aas:keys>
<aas:key>
<aas:type>GlobalReference</aas:type>
<aas:value>http://acplt.org/Properties/ExampleProperty</aas:value>
<aas:value>http://acplt.org/Properties/ExamplePropertyInOutput</aas:value>
</aas:key>
</aas:keys>
</aas:semanticId>
Expand Down Expand Up @@ -2439,7 +2439,7 @@
<aas:value>
<aas:property>
<aas:category>CONSTANT</aas:category>
<aas:idShort>ExampleProperty</aas:idShort>
<aas:idShort>ExamplePropertyInput</aas:idShort>
<aas:description>
<aas:langStringTextType>
<aas:language>en-US</aas:language>
Expand All @@ -2456,7 +2456,7 @@
<aas:keys>
<aas:key>
<aas:type>GlobalReference</aas:type>
<aas:value>http://acplt.org/Properties/ExampleProperty</aas:value>
<aas:value>http://acplt.org/Properties/ExamplePropertyInput</aas:value>
</aas:key>
</aas:keys>
</aas:semanticId>
Expand All @@ -2470,7 +2470,7 @@
<aas:value>
<aas:property>
<aas:category>CONSTANT</aas:category>
<aas:idShort>ExampleProperty</aas:idShort>
<aas:idShort>ExamplePropertyOutput</aas:idShort>
<aas:description>
<aas:langStringTextType>
<aas:language>en-US</aas:language>
Expand All @@ -2487,7 +2487,7 @@
<aas:keys>
<aas:key>
<aas:type>GlobalReference</aas:type>
<aas:value>http://acplt.org/Properties/ExampleProperty</aas:value>
<aas:value>http://acplt.org/Properties/ExamplePropertyOutput</aas:value>
</aas:key>
</aas:keys>
</aas:semanticId>
Expand All @@ -2501,7 +2501,7 @@
<aas:value>
<aas:property>
<aas:category>CONSTANT</aas:category>
<aas:idShort>ExampleProperty</aas:idShort>
<aas:idShort>ExamplePropertyInOutput</aas:idShort>
<aas:description>
<aas:langStringTextType>
<aas:language>en-US</aas:language>
Expand All @@ -2518,7 +2518,7 @@
<aas:keys>
<aas:key>
<aas:type>GlobalReference</aas:type>
<aas:value>http://acplt.org/Properties/ExampleProperty</aas:value>
<aas:value>http://acplt.org/Properties/ExamplePropertyInOutput</aas:value>
</aas:key>
</aas:keys>
</aas:semanticId>
Expand Down
Loading

0 comments on commit bf52267

Please sign in to comment.