Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce ContainerElement as SubmodelElement interface #420

Open
alexgordtop opened this issue Apr 22, 2024 · 4 comments
Open

Introduce ContainerElement as SubmodelElement interface #420

alexgordtop opened this issue Apr 22, 2024 · 4 comments
Labels
accepted accepted in principle to be fixed ready for approval TF proposes how to resolve the issue. Needs final approval my Workstream requires workstream approval strategic decision proposal needs to be prepared in TF spec team specification impact on specification and thus on xml, json etc., label "aas-core" not set additinally
Milestone

Comments

@alexgordtop
Copy link

Is your feature request related to a problem? Please describe.
In documentation and implementation we often describe special aspects of SubmodelElements, that may contain other SubmodelElements. It would be handsome to define a corresponding interface, so that we can talk about them.

For reference / completeness checks it would be handsome to have that interface, so that a developer could easily identify all SubmodelElements, that require more attention.

Describe the solution you'd like
Introduce an interface "ContainerElement" comparable to DataElement and apply it to AnnotatedRelationshipElement, Entity, SubmodelElementCollection, SubmodelElementList.

Handsome enhancements:

  • Operation "isIdShortRequired" -> returning true for all SubmodelElements except from SubmodelElementList
  • Operation "getContainedElements" -> returning Elements contained (values, statements, annotations, ....)

These operations should be seen as recommendations to SDK implementations, what they could provide as convenience operations.

Interface and operations have no effect on serialization.

@BirgitBoss
Copy link
Collaborator

TF AAS Part 1 2024-05-15

  • Introduction of abstract class "ContainerElement" would be backward compatible
  • it might make Value-Only explanation easier
  • to include operations would break concept of Part 1: there are no operations in classes so far ==> do not add operations here
  • not necessarily impact on existing implementations, only for those who reflect also all abstract classes etc.
    ==> Decision Proposal: accept

@BirgitBoss BirgitBoss added this to the V3.1 milestone May 15, 2024
@BirgitBoss BirgitBoss added requires workstream approval strategic decision proposal needs to be prepared in TF spec team ready for approval TF proposes how to resolve the issue. Needs final approval my Workstream labels May 15, 2024
@BirgitBoss
Copy link
Collaborator

Workstream AAS Spec 2024-06-13
Approved to add an abstract class "ContainerElement". These classes will inherit from this class:

  • AnnotatedRelationshipElement,
  • Entity,
  • SubmodelElementCollection,
  • SubmodelElementList

Operation might need to be reconsidered later to be added as well

@BirgitBoss BirgitBoss added accepted accepted in principle to be fixed and removed requires workstream approval strategic decision proposal needs to be prepared in TF spec team ready for approval TF proposes how to resolve the issue. Needs final approval my Workstream labels Jun 13, 2024
@BirgitBoss BirgitBoss added the specification impact on specification and thus on xml, json etc., label "aas-core" not set additinally label Nov 19, 2024
@BirgitBoss
Copy link
Collaborator

compare to #434: removing abstract class was considered to be risky to change. So I wonder whether introducing a new abstract class has the same effect.

@BirgitBoss BirgitBoss added the requires workstream approval strategic decision proposal needs to be prepared in TF spec team label Nov 19, 2024
@BirgitBoss BirgitBoss added the ready for approval TF proposes how to resolve the issue. Needs final approval my Workstream label Nov 27, 2024
@BirgitBoss
Copy link
Collaborator

BirgitBoss commented Nov 27, 2024

2024-11-27 TF Metamodel
reconfirm that we want to add this abstract class but do not want to remove abstract class HasKind

If users of a SDK use an abstract class it is not backward compatible if the class is removed
Adding a new class is different because those SDKs not supporting the new class users would still be able to create valid models

key type enumeration needs to be extended by the new abstract class (similar to DataElement and SubmodelElement): this could lead to incompatibility. If V3.1 application uses new ContainerElement but a V3.0 application consumes it then the V3.0 application would not be able to handle this and throws serialization error.

The following options:

Solution 3 can also be combined with the other two solutions

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted accepted in principle to be fixed ready for approval TF proposes how to resolve the issue. Needs final approval my Workstream requires workstream approval strategic decision proposal needs to be prepared in TF spec team specification impact on specification and thus on xml, json etc., label "aas-core" not set additinally
Projects
None yet
Development

No branches or pull requests

2 participants