Skip to content

Commit 56e4fe7

Browse files
ZANDx1Leon HuangLeon HuangLeon Huang
authored
Update constraint documentation (#74)
This updates the constraint documentation for version 3.1.2. Replace "needs to" with "shall" ([AASd-006](https://industrialdigitaltwin.io/aas-specifications/IDTA-01001/v3.1.2/changelog.html#:~:text=AASd%2D006,-Update), [AASd-007](https://industrialdigitaltwin.io/aas-specifications/IDTA-01001/v3.1.2/changelog.html#:~:text=AASd%2D007,-Update), [AASd-021](https://industrialdigitaltwin.io/aas-specifications/IDTA-01001/v3.1.2/changelog.html#:~:text=AASd%2D021,-Update), [AASd-077](https://industrialdigitaltwin.io/aas-specifications/IDTA-01001/v3.1.2/changelog.html#:~:text=AASd%2D077,-Update)) in Docstrings. Update documentation for [AASd-116](https://industrialdigitaltwin.io/aas-specifications/IDTA-01001/v3.1.2/changelog.html#:~:text=AASd%2D116,-Update). --------- Co-authored-by: Leon Huang <hleon@151-020.eduroam.rwth-aachen.de> Co-authored-by: Leon Huang <hleon@157-023.eduroam.rwth-aachen.de> Co-authored-by: Leon Huang <hleon@174-165.eduroam.rwth-aachen.de>
1 parent f6bc2ba commit 56e4fe7

3 files changed

Lines changed: 9 additions & 9 deletions

File tree

sdk/basyx/aas/model/base.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,7 @@ class HasExtension(Namespace, metaclass=abc.ABCMeta):
551551
552552
<<abstract>>
553553
554-
**Constraint AASd-077:** The name of an Extension within HasExtensions needs to be unique.
554+
**Constraint AASd-077:** The name of an Extension within HasExtensions shall be unique.
555555
556556
:ivar namespace_element_sets: List of :class:`NamespaceSets <basyx.aas.model.base.NamespaceSet>`
557557
:ivar extension: A :class:`~.NamespaceSet` of :class:`Extensions <.Extension>` of the element.
@@ -1640,8 +1640,8 @@ class Qualifier(HasSemantics):
16401640
"""
16411641
A qualifier is a type-value pair that makes additional statements w.r.t. the value of the element.
16421642
1643-
**Constraint AASd-006:** If both, the value and the valueId of a Qualifier are present, the value needs
1644-
to be identical to the value of the referenced coded value in Qualifier/valueId.
1643+
**Constraint AASd-006:** If both, the value and the valueId of a Qualifier are present, the value shall
1644+
be identical to the value of the referenced coded value in Qualifier/valueId.
16451645
16461646
**Constraint AASd-020:** The value of Qualifier/value shall be consistent with the
16471647
data type as defined in Qualifier/valueType.

sdk/basyx/aas/model/submodel.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ class Property(DataElement):
202202
A property is a :class:`DataElement` that has a single value.
203203
204204
**Constraint AASd-007:** If both, the value and the valueId of a Qualifier are present,
205-
the value needs to be identical to the value of the referenced coded value in Qualifier/valueId.
205+
the value shall be identical to the value of the referenced coded value in Qualifier/valueId.
206206
207207
:ivar id_short: Identifying string of the element within its name space. (inherited from
208208
:class:`~basyx.aas.model.base.Referable`)

sdk/docs/source/constraints.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,22 @@ an :class:`~basyx.aas.model.base.AASConstraintViolation` will be raised
1616

1717
.. |aasd002| replace:: ``idShort`` of ``Referable`` s shall only feature letters, digits, underscore (``_``), hyphen (``-``); starting mandatory with a letter and not ending with a hyphen. I.e. ``^[a-zA-Z]|[a-zA-Z][a-zA-Z0-9_-]*[a-zA-Z0-9_]$``.
1818
.. |aasd005| replace:: If ``AdministrativeInformation/version`` is not specified, ``AdministrativeInformation/revision`` shall also be unspecified. This means that a revision requires a version. If there is no version, there is no revision. Revision is optional.
19-
.. |aasd006| replace:: If both, the ``value`` and the ``valueId`` of a ``Qualifier`` are present, the value needs to be identical to the value of the referenced coded value in ``Qualifier/valueId``.
20-
.. |aasd007| replace:: If both the ``Property/value`` and the ``Property/valueId`` are present, the value of ``Property/value`` needs to be identical to the value of the referenced coded value in ``Property/valueId``.
19+
.. |aasd006| replace:: If both, the ``value`` and the ``valueId`` of a ``Qualifier`` are present, the value shall be identical to the value of the referenced coded value in ``Qualifier/valueId``.
20+
.. |aasd007| replace:: If both the ``Property/value`` and the ``Property/valueId`` are present, the value of ``Property/value`` shall be identical to the value of the referenced coded value in ``Property/valueId``.
2121
.. |aasd012| replace:: if both the ``MultiLanguageProperty/value`` and the ``MultiLanguageProperty/valueId`` are present, the meaning must be the same for each string in a specific language, as specified in ``MultiLanguageProperty/valueId``.
2222
.. |aasd014| replace:: Either the attribute ``globalAssetId`` or ``specificAssetId`` of an ``Entity`` must be set if ``Entity/entityType`` is set to ``SelfManagedEntity``. Otherwise, they do not exist.
2323
.. |aasd020| replace:: The value of ``Qualifier/value`` shall be consistent with the data type as defined in ``Qualifier/valueType``.
24-
.. |aasd021| replace:: Every qualifiable can only have one qualifier with the same ``Qualifier/type``.
24+
.. |aasd021| replace:: Every qualifiable shall only have one qualifier with the same ``Qualifier/type``.
2525
.. |aasd022| replace:: ``idShort`` of non-identifiable referables within the same name space shall be unique (case-sensitive).
26-
.. |aasd077| replace:: The name of an extension (``Extension/name``) within ``HasExtensions`` needs to be unique.
26+
.. |aasd077| replace:: The name of an extension (``Extension/name``) within ``HasExtensions`` shall be unique.
2727
.. |aasd080| replace:: In case ``Key/type`` == ``GlobalReference`` ``idType`` shall not be any LocalKeyType (``IdShort, FragmentId``).
2828
.. |aasd081| replace:: In case ``Key/type`` == ``AssetAdministrationShell`` ``Key/idType`` shall not be any LocalKeyType (``IdShort``, ``FragmentId``).
2929
.. |aasd107| replace:: If a first level child element in a ``SubmodelElementList`` has a semanticId, it shall be identical to ``SubmodelElementList/semanticIdListElement``.
3030
.. |aasd108| replace:: All first level child elements in a ``SubmodelElementList`` shall have the same submodel element type as specified in ``SubmodelElementList/typeValueListElement``.
3131
.. |aasd109| replace:: If ``SubmodelElementList/typeValueListElement`` is equal to ``Property`` or ``Range,`` ``SubmodelElementList/valueTypeListElement`` shall be set and all first level child elements in the ``SubmodelElementList`` shall have the value type as specified in ``SubmodelElementList/valueTypeListElement``.
3232
.. |aasd114| replace:: If two first level child elements in a ``SubmodelElementList`` have a ``semanticId``, they shall be identical.
3333
.. |aasd115| replace:: If a first level child element in a ``SubmodelElementList`` does not specify a ``semanticId``, the value is assumed to be identical to ``SubmodelElementList/semanticIdListElement``.
34-
.. |aasd116| replace:: ``globalAssetId`` (case-insensitive) is a reserved key. If used as value for ``SpecificAssetId/name,`` ``SpecificAssetId/value`` shall be identical to ``AssetInformation/globalAssetId``.
34+
.. |aasd116| replace:: ``globalAssetId`` (case-insensitive) is a reserved key for ``SpecificAssetId/name`` with the semantics as defined in ``:attr:`basyx.aas.model.aas.AssetInformation.global_asset_id``.
3535
.. |aasd117| replace:: ``idShort`` of non-identifiable ``Referables`` not being a direct child of a ``SubmodelElementList`` shall be specified.
3636
.. |aasd118| replace:: If a supplemental semantic ID (``HasSemantics/supplementalSemanticId``) is defined, there shall also be a main semantic ID (``HasSemantics/semanticId``).
3737
.. |aasd119| replace:: If any ``Qualifier/kind`` value of a ``Qualifiable/qualifier`` is equal to ``TemplateQualifier`` and the qualified element inherits from ``HasKind``, the qualified element shall be of kind ``Template`` (``HasKind/kind = Template``).

0 commit comments

Comments
 (0)