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

Enforce AASd-108 #230

Open
arnoweiss opened this issue Jan 5, 2024 · 0 comments
Open

Enforce AASd-108 #230

arnoweiss opened this issue Jan 5, 2024 · 0 comments

Comments

@arnoweiss
Copy link
Contributor

arnoweiss commented Jan 5, 2024

As per spec, a SubmodelElementList can only hold a single type of SubmodelElement [1]. AAS4J does currently not technically enforce this. For example, in one of the test-examples, this constraint is violated as a SMEL contains a Property, a MultiLanguageProperty and a Range.

This could for example be done by changing the class signature:

public interface SubmodelElementList<E extends SubmodelElement> extends SubmodelElement{

/*
lots of other stuff
*/

@IRI("https://admin-shell.io/aas/3/0/SubmodelElementList/value")
List<E> getValue();

Con:

  • This would not be generatable.
  • There's no concensus in AAS4J on how to deal with constraints generally.

[1] https://aas-core-works.github.io/aas-core-meta/v3/SubmodelElementList.html#constraint-AASd-108
[2]

.submodelElements(new DefaultSubmodelElementList.Builder()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant