Skip to content

Commit

Permalink
model.base: Add new attributes to class AdministrativeInformation
Browse files Browse the repository at this point in the history
Version 3.0 of the spec introduces the 2 new attributes
- `creator`
- `template_id`
to class `AdministrativeInformation`.
This commit adds them to the class.
  • Loading branch information
s-heppner committed Aug 11, 2023
1 parent 493d5d3 commit 0a40445
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions basyx/aas/model/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1103,13 +1103,26 @@ 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.
"""

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
Expand All @@ -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):
Expand Down

0 comments on commit 0a40445

Please sign in to comment.