From 0a40445a324629060922da6f2a1108463f3b70e2 Mon Sep 17 00:00:00 2001 From: Sebastian Heppner Date: Fri, 11 Aug 2023 14:39:07 +0200 Subject: [PATCH] model.base: Add new attributes to class AdministrativeInformation Version 3.0 of the spec introduces the 2 new attributes - `creator` - `template_id` to class `AdministrativeInformation`. This commit adds them to the class. --- basyx/aas/model/base.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/basyx/aas/model/base.py b/basyx/aas/model/base.py index 9dedc6e91..b592c866a 100644 --- a/basyx/aas/model/base.py +++ b/basyx/aas/model/base.py @@ -1103,6 +1103,17 @@ class AdministrativeInformation(HasDataSpecification): :ivar version: Version of the element. :ivar revision: Revision of the element. + :ivar creator: The subject ID of the subject responsible for making the element + :ivar template_id: Identifier of the template that guided the creation of the element + + *Note:* In case of a submodel, the template ID is the identifier of the submodel template that guided the + creation of the submodel. + + *Note:* The submodel template ID is not relevant for validation. Here, the Submodel/semanticId shall be used + + *Note:* Usage of the template ID is not restricted to submodel instances. + The creation of submodel templates can also be guided by another submodel template. + :ivar embedded_data_specifications: List of Embedded data specification. used by the element. """ @@ -1110,6 +1121,8 @@ class AdministrativeInformation(HasDataSpecification): def __init__(self, version: Optional[VersionType] = None, revision: Optional[RevisionType] = None, + creator: Optional[Reference] = None, + template_id: Optional[Identifier] = None, embedded_data_specifications: Iterable[EmbeddedDataSpecification] = ()): """ Initializer of AdministrativeInformation @@ -1122,6 +1135,8 @@ def __init__(self, self.version: Optional[VersionType] = version self._revision: Optional[RevisionType] self.revision = revision + self.creator: Optional[Reference] = creator + self.template_id: Optional[Identifier] = template_id self.embedded_data_specifications: List[EmbeddedDataSpecification] = list(embedded_data_specifications) def _get_revision(self):